lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20110911184107.GA23918@redhat.com>
Date:	Sun, 11 Sep 2011 20:41:07 +0200
From:	Oleg Nesterov <oleg@...hat.com>
To:	Tejun Heo <tj@...nel.org>
Cc:	"Rafael J. Wysocki" <rjw@...k.pl>, matthltc@...ibm.com,
	paul@...lmenage.org, containers@...ts.linux-foundation.org,
	linux-pm@...ts.linux-foundation.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/1] freezer: fix wait_event_freezable/__thaw_task races

On 09/11, Oleg Nesterov wrote:
>
> On 09/11, Tejun Heo wrote:
> >
> > On Thu, Sep 08, 2011 at 07:59:26PM +0200, Oleg Nesterov wrote:
> >
> > > > Yeap, with freezable_with_signal gone, this looks correct & simpler to
> > > > me
> > >
> > > I don't really understand this... set_freezable_with_signal() has a
> > > lot of problems, yes... But even if it wasn't removed this fix makes
> > > sense anyway, afaics.
> > >
> > > If freezable_with_signal caller does wait_event_freezable_timeout(),
> > > __retval becomes -ERESTARTSYS after freeze_task(). The next iteration
> > > will return 0 with the KERN_ERR message from schedule_timeout().
> >
> > Hmmm... but with the change, if a kthread gets TIF_SIGPENDING from
> > freezer and then thawed, it would not enter try_to_freeze() and thus
> > won't clear TIF_SIGPENDING.
>
> Ah yes, you are right, thanks. But once again, please note that in this
> case wait_event_freezable_timeout() is broken anyway.

OTOH, I forgot about wait_event_freezable(). It was racy, but mostly
worked. So yes, you are right, without "kill freezable_with_signal"
this patch is wrong.

I missed this, thanks.

Oleg.

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ