[lkml]   [2001]   [Oct]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectBig kernel lock in release functions
  I've been looking at use of the big kernel lock in a lot of different
places in the kernel. I've noticed that there are quite a few uses in
devices' release functions, with no obvious purpose. Take a look at

joystick[minor].active = 0;
joystick[minor].ready = 0;

if ((joystick[0].active == 0) && (joystick[1].active == 0))

But, there are other places in the same file where the same operations
are performed with no locking at all (except for
ikbd_joystick_disable()). Is there a reason to have locking in the
release function but not in the read or open functions?
This is a quite common practice in release functions throughout the
kernel. In 2.4.10, I counted 108 different places where the BKL is used
in a release function. I'm not claiming that all of these are
unnecessary, but I believe a big chunk of them are.

David C. Hansen
IBM LTC Base/OS Group
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2005-03-22 13:04    [W:0.021 / U:3.372 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site