lkml.org 
[lkml]   [2018]   [Jun]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] staging: rtl8723bs: Fix two possible sleep-in-atomic-context bugs in translate_scan()
On Wed, Jun 20, 2018 at 06:05:06PM +0800, Jia-Ju Bai wrote:
> > Thanks! It occurs to me that another way to detect this bug is that
> > one of the allocations in this function already uses GFP_ATOMIC. It
> > doesn't normally make sense to mix GFP_ATOMIC and GFP_KERNEL when there
> > isn't any locking in the function.
>
> Yes, this pattern is interesting for bug finding :)
> But to fix the bugs of this pattern, we need to decide whether GFP_ATOMIC or
> GFP_KERNEL should be used here.
>

Sure. But either way it's a bug. Plus this would be the first static
checker warning which warns about using GFP_ATOMIC when it's supposed to
be GFP_KERNEL. #milestone

regards,
dan carpenter

\
 
 \ /
  Last update: 2018-06-20 12:24    [W:0.033 / U:1.016 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site