Re: [PATCH RFC] raw: Remove the BKL from raw_open

From: Arnd Bergmann
Date: Mon Oct 19 2009 - 00:27:26 EST


On Sunday 18 October 2009, John Kacur wrote:
> The BKL was pushed into raw_open with
> commit c0bed680f0ca603864375ed5f9fed4296a53aa62
>
> Jonathan's comments were " Put explicit lock_kernel() calls into raw_open(),
> even though the existing locking looks adequate."
>
> I have to agree, the raw_mutex should provide all the protection needed here.

The raw driver uses the BKL in both the ioctl and the llseek function, so
I think you have to look if there is any interaction between those and the
open method, ideally removing it from all of them at the same time.

An unrelated bug I spotted while looking at your patch is that there is no
compat_ioctl method in the raw file_operations, which is really needed here
if you want any of the block ioctls to work on a compat task.

Whatever that tells us...

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