lkml.org 
[lkml]   [2019]   [Mar]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: WARNING: syz-executor still has locks held!
On Wed 20-03-19 20:45:12, Michal Hocko wrote:
> On Wed 20-03-19 18:30:42, Oleg Nesterov wrote:
> > On 03/20, Michal Hocko wrote:
> > >
> > > [Cc Ingo and Chanho Min - the thread starts here
> > > http://lkml.kernel.org/r/0000000000004cdec6058485b2ce@google.com]
> > >
> > > On Wed 20-03-19 16:00:54, Oleg Nesterov wrote:
> > > > On 03/20, Michal Hocko wrote:
> > > > >
> > > > > On Wed 20-03-19 14:24:11, Oleg Nesterov wrote:
> > > > > > On 03/20, Michal Hocko wrote:
> > > > > > >
> > > > > > > Yes we do hold the cgred mutex while calling freezable_schedule but why
> > > > > > > are we getting a warning is not really clear to me. The task should be
> > > > > > > hidden from the freezer so why do we warn at all?
> > > > > >
> > > > > > try_to_freeze() calls debug_check_no_locks_held() and this makes sense.
> > > > >
> > > > > Yes it does. But it already ignores PF_NOFREEZE tasks and I fail to see
> > > > > why is PF_FREEZER_SKIP any different.
> > > >
> > > > But they differ. PF_NOFREEZE is a "sticky" flag for kthreads. Set by default,
> > > > cleared by set_freezable() if you want a freezable kthread.
> > > >
> > > > PF_FREEZER_SKIP means that a sleeping freezable task will call try_to_freeze()
> > > > right after schedule() returns, so try_to_freeze_tasks() can safely count it as
> > > > "already frozen".
> > >
> > > But the fundamental semantic is the same right? Both might be sitting on
> > > locks that might interfere with other tasks and we should be _extra_
> > > careful when using them. In an ideal world, none of them is really
> > > needed.
> >
> > Ah, it seems that we misunderstood each other... see below.
> >
> > > So my question remains. Can we drop the warning for PF_FREEZER_SKIP
> > > tasks as well?
> >
> > But why?
>
> To drop the warning which led to the revert.

Ble, I should have checked the code more closely. freezer_count does
clear the flag before it goes to the fridge. My bad. So we need
freezable_schedule_unsafe unsafe here to workaround the original problem
and do not trigger the warning.
--
Michal Hocko
SUSE Labs

\
 
 \ /
  Last update: 2019-03-20 21:33    [W:1.642 / U:0.220 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site