Re: [PATCH] cgroup: make sure that decisions in __css_put are atomic

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Jun 06, 2012 at 03:31:19PM +0800, Li Zefan wrote:
> Salman Qazi wrote:
> 
> > __css_put is using atomic_dec on the ref count, and then
> > looking at the ref count to make decisions.  This is prone
> > to races, as someone else may decrement ref count between
> > our decrement and our decision.  Instead, we should base our
> > decisions on the value that we decremented the ref count to.
> > 
> > (This results in an actual race on Google's kernel which I
> > haven't been able to reproduce on the upstream kernel.  Having
> > said that, it's still incorrect by inspection).
> > 
> > Signed-off-by: Salman Qazi <sqazi@xxxxxxxxxx>
> 
> 
> Acked-by: Li Zefan <lizefan@xxxxxxxxxx>
> 
> Good catch! This patch should be backported for 3.4.

Applied to for-3.5-fixes w/ stable@ added.

Thanks.

-- 
tejun
--
To unsubscribe from this list: send the line "unsubscribe cgroups" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]     [Monitors]

  Powered by Linux