Re: [PATCH] cgroups: fix probable race with put_css_set[_taskexit] and find_css_set

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Paul Menage
Date: Tuesday, September 9, 2008 - 8:11 pm

On Tue, Sep 9, 2008 at 7:18 PM, Lai Jiangshan <laijs@cn.fujitsu.com> wrote:

Maybe it would be better to do:

if (!memcmp(...) && kref_get_not_zero(&cg->ref))
  return cg;

so that in the event of a race, we carry on looking in the array.

Probably clearer to have a bool return type.

Paul
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: [PATCH] cgroups: fix probable race with put_css_set[_t ..., Paul Menage, (Tue Sep 9, 8:11 pm)