lkml.org 
[lkml]   [2010]   [Apr]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [GIT PULL v2] Preparation for BKL'ed ioctl removal

* Arnd Bergmann <arnd@arndb.de> wrote:

> On Monday 26 April 2010, Ingo Molnar wrote:
> > This could be done all automated for a hundred old drivers if need to be.
> > There would be no bkl_ioctl's left.
>
> I don't think it can be fully automated. [...]

Corner cases are not a problem as long as the risk of them going unnoticed is
lower than the risk of a manual conversion introducing bugs.

> [...] For the majority of the modules, your approach would work fine, but
> there are still the well-known pitfalls in corner cases:
>
> - recursive uses in functions outside of ioctl (possibly none left
> after the TTY layer is done, but who knows)

Not a problem even if there's any such usage left: lockdep will sort those out
very quickly.

> - lock-order problems with other mutexes (see DRM)

This too will be mapped out very quickly via lockdep.

> - code that depends on autorelease to allow one ioctl while another
> is sleeping. (a small number of drivers)

This is a real issue, and in fact it's an unknown: there may be an unknown
number of random sleep points within BKL codepaths that is being relied on in
creative ways.

Note that by introducing a mutex we (in most cases) make the locking
_stricter_, so the biggest risk from that is a lockup - which will be
debuggable via lockdep.

Ingo


\
 
 \ /
  Last update: 2010-04-27 11:29    [W:0.088 / U:0.412 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site