Re: [PATCH] remove BKL from drivers' release functions

Alan Cox (alan@lxorguk.ukuu.org.uk)
Thu, 29 Nov 2001 01:47:47 +0000 (GMT)


> Does everyone agree that we need to get the BKL out of common areas like
> this? For starters, what about adding a pair of spinlocks for block

Ideally the BKL itself should die.

> devices and character devices to take the place of the BKL in
> serializing opens? Or, should we make it the driver's responsibility
> completely?

It needs to be the drivers job, to be documented as such and to be
implemented properly in some drivers. In paticular there are some extremely
interesting closedown races in existing drivers where it goes

CPU1 CPU2
release
[do slow thing]
open
ioctl
setting stuff up
slow thing done
trash the chip setup
turn the chip off
return
ouch bang splat Oops!!!

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