[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190815105225.GA16395@kroah.com>
Date: Thu, 15 Aug 2019 12:52:25 +0200
From: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To: Knut Omang <knut.omang@...cle.com>
Cc: linux-kselftest@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-doc@...r.kernel.org, linux-kbuild@...r.kernel.org,
Shuah Khan <shuah@...nel.org>,
Jonathan Corbet <corbet@....net>,
Masahiro Yamada <yamada.masahiro@...ionext.com>,
Michal Marek <michal.lkml@...kovi.net>,
Shreyans Devendra Doshi <0xinfosect0r@...il.com>,
Alan Maguire <alan.maguire@...cle.com>,
Brendan Higgins <brendanhiggins@...gle.com>,
Kevin Hilman <khilman@...libre.com>,
Hidenori Yamaji <hidenori.yamaji@...y.com>,
Frank Rowand <frowand.list@...il.com>,
Timothy Bird <Tim.Bird@...y.com>,
Luis Chamberlain <mcgrof@...nel.org>,
Theodore Ts'o <tytso@....edu>, Daniel Vetter <daniel@...ll.ch>,
Stephen Boyd <sboyd@...nel.org>
Subject: Re: [RFC 06/19] ktf: A simple debugfs interface to test results
On Thu, Aug 15, 2019 at 12:35:26PM +0200, Knut Omang wrote:
> On Thu, 2019-08-15 at 10:49 +0200, Greg Kroah-Hartman wrote:
> > > I perfectly agree with you that reducing the hole for a race condition
> > > is generally a bad idea, but from the above mail thread
> > > it seems that's the only available choice for older kernels?
> >
> > I have no idea, but please, do not use that pattern of code as it is
> > racy in all kernels, from all of time.
>
> Ok, will remove it :-)
>
> I tried in vain to find the commit from Al Viro that made the code safe,
> to identify which kernels that are safe from this issue,
> but he has a **lot** of commits, do you have a clue for what/where to look?
>
> It will be good to have a mention/comment on this for future reference,
> like the earliest kernel version where this is safe.
Always use a "newer" kernel to be "safe" and you will be fine :)
> Maybe we can even get rid of some more of the remaining of these too..
> (I notice there's 65 cases of 'if (!try_module_get(THIS_MODULE))'
> right now)
Something to put on a TODO list somewhere...
thanks,
greg k-h
Powered by blists - more mailing lists