[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20190319174725.GA69236@devbig004.ftw2.facebook.com>
Date: Tue, 19 Mar 2019 10:47:25 -0700
From: Tejun Heo <tj@...nel.org>
To: Jann Horn <jannh@...gle.com>
Cc: James Morris <jmorris@...ei.org>,
"Serge E. Hallyn" <serge@...lyn.com>,
Li Zefan <lizefan@...wei.com>,
Johannes Weiner <hannes@...xchg.org>,
linux-security-module@...r.kernel.org,
linux-kernel@...r.kernel.org, Aristeu Rozanski <aris@...hat.com>,
"Serge E . Hallyn" <serge.hallyn@...ntu.com>,
Michal Hocko <mhocko@...e.cz>, cgroups@...r.kernel.org
Subject: Re: [PATCH] device_cgroup: fix RCU imbalance in error case
On Tue, Mar 19, 2019 at 02:36:59AM +0100, Jann Horn wrote:
> When dev_exception_add() returns an error (due to a failed memory
> allocation), make sure that we move the RCU preemption count back to where
> it was before we were called. We dropped the RCU read lock inside the loop
> body, so we can't just "break".
>
> sparse complains about this, too:
>
> $ make -s C=2 security/device_cgroup.o
> ./include/linux/rcupdate.h:647:9: warning: context imbalance in
> 'propagate_exception' - unexpected unlock
>
> Fixes: d591fb56618f ("device_cgroup: simplify cgroup tree walk in propagate_exception()")
> Cc: stable@...r.kernel.org
> Signed-off-by: Jann Horn <jannh@...gle.com>
Applied to cgroup/for-5.1-fixes.
Thanks.
--
tejun
Powered by blists - more mailing lists