Christoph Hellwig wrote:
>Beeing completly single-threaded also simplifies writing unclean drivers..
>
>BTW, I've attached a patch that fixes the largest input races (against 2.4.6),
>I don't see how to change the total lack of locking for other data structures
>without an API change, though.
>
The removal of the BKL in the input.c's open() was beyond the scope of
what we were trying to do. But, it snuck into the patch anyway. It
probably shouldn't have been there.
In the patch, in the open function, you do this:
if (handler)
new_fops = fops_get(handler->fops);
But, the fops_get() #define already cheecks to make sure handler isn't null:
#define fops_get(fops) \
(((fops) && (fops)->owner) \
? ( try_inc_mod_count((fops)->owner) ? (fops) : NULL ) \
: (fops))
It's nice to be careful, but is that extra check really necessary?
And, the BKL is still held during the open() call to the handler's
open(). Is this trying to make sure that open() isn't called twice on a
single device? I checked all of the files in drivers/input, and didn't
see any other uses of the BKL.
-- David C. Hansen haveblue@us.ibm.com- 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/
This archive was generated by hypermail 2b29 : Fri Nov 30 2001 - 21:00:22 EST