[xenial, yakkety] [patch] UBUNTU: SAUCE: apparmor: fix sleep in critical section

John Johansen john.johansen at canonical.com
Wed Oct 19 11:17:19 UTC 2016


On 10/19/2016 12:58 PM, Tetsuo Handa wrote:
> Hello.
> 
> John Johansen wrote:
>> UBUNTU: SAUCE: apparmor: fix sleep in critical section
>>
>> path_put() call dput() which might sleep on some paths. When it does
>> sleep from these code paths, the per cpu work buffer may get reused
>> overwriting the data that was just placed in the buffer.
> 
> Excuse me, but I just wondered how path_put() can be called from a
> critical section. OK, get_buffers() calls preempt_disable() and
It shouldn't be, that is what the patch fixes. And yes get_buffers starts
a critical section

> put_buffers() calls preempt_enable(). Then, I think that calling
> kern_path() from between get_buffers() and put_buffers() is also wrong
> because it does a GFP_KERNEL allocation which can sleep.
> Did you already fix it?
> 
kern_path() is not called in the get_buffers()/put_buffers() critical
section on the xenial which this patch is for

other patches for other kernel versions will follow





More information about the kernel-team mailing list