]> err.no Git - linux-2.6/log
linux-2.6
16 years agoIB/umad: BKL is not needed for ib_umad_open()
Roland Dreier [Fri, 11 Jul 2008 20:54:40 +0000 (13:54 -0700)]
IB/umad: BKL is not needed for ib_umad_open()

Remove explicit lock_kernel() calls and document why the code is safe.

Signed-off-by: Roland Dreier <rolandd@cisco.com>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
16 years agoIB/uverbs: BKL is not needed for ib_uverbs_open()
Roland Dreier [Fri, 27 Jun 2008 21:43:20 +0000 (14:43 -0700)]
IB/uverbs: BKL is not needed for ib_uverbs_open()

Remove explicit lock_kernel() calls and document why the code is safe.

Signed-off-by: Roland Dreier <rolandd@cisco.com>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
16 years agobf561-coreb: BKL unneeded for open()
Jonathan Corbet [Mon, 30 Jun 2008 22:45:15 +0000 (16:45 -0600)]
bf561-coreb: BKL unneeded for open()

According to Mike Frysinger:

http://permalink.gmane.org/gmane.linux.kernel/699279

open() does not need the BKL, so take it back out.

16 years agoCall fasync() functions without the BKL
Jonathan Corbet [Fri, 20 Jun 2008 15:12:01 +0000 (09:12 -0600)]
Call fasync() functions without the BKL

lock_kernel() calls have been pushed down into code which needs it, so
there is no need to take the BKL at this level anymore.

This work inspired and aided by Andi Kleen's unlocked_fasync() patches.

Acked-by: Andi Kleen <ak@linux.intel.com>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
16 years agosnd/PCM: fasync BKL pushdown
Jonathan Corbet [Mon, 23 Jun 2008 23:40:43 +0000 (17:40 -0600)]
snd/PCM: fasync BKL pushdown

Chances are this is unneeded, but the code is twisty enough that it is hard
to tell.

Signed-off-by: Jonathan Corbet <corbet@lwn.net>
16 years agoipmi: fasync BKL pushdown
Jonathan Corbet [Mon, 23 Jun 2008 23:00:14 +0000 (17:00 -0600)]
ipmi: fasync BKL pushdown

This driver really needs it to avoid races against open()

Signed-off-by: Jonathan Corbet <corbet@lwn.net>
16 years agoecryptfs: fasync BKL pushdown
Jonathan Corbet [Thu, 19 Jun 2008 22:18:25 +0000 (16:18 -0600)]
ecryptfs: fasync BKL pushdown

Signed-off-by: Jonathan Corbet <corbet@lwn.net>
16 years agoBluetooth VHCI: fasync BKL pushdown
Jonathan Corbet [Thu, 19 Jun 2008 22:07:51 +0000 (16:07 -0600)]
Bluetooth VHCI: fasync BKL pushdown

Signed-off-by: Jonathan Corbet <corbet@lwn.net>
16 years agotty_io: fasync BKL pushdown
Jonathan Corbet [Thu, 19 Jun 2008 22:04:53 +0000 (16:04 -0600)]
tty_io: fasync BKL pushdown

Signed-off-by: Jonathan Corbet <corbet@lwn.net>
16 years agotun: fasync BKL pushdown
Jonathan Corbet [Thu, 19 Jun 2008 21:50:37 +0000 (15:50 -0600)]
tun: fasync BKL pushdown

Signed-off-by: Jonathan Corbet <corbet@lwn.net>
16 years agoi2o: fasync BKL pushdown
Jonathan Corbet [Thu, 19 Jun 2008 21:44:57 +0000 (15:44 -0600)]
i2o: fasync BKL pushdown

This driver appears to really need the BKL to protect open_files.

Signed-off-by: Jonathan Corbet <corbet@lwn.net>
16 years agompt: fasync BKL pushdown
Jonathan Corbet [Thu, 19 Jun 2008 21:41:11 +0000 (15:41 -0600)]
mpt: fasync BKL pushdown

It looks like this driver really needs the BKL here.

Signed-off-by: Jonathan Corbet <corbet@lwn.net>
16 years agoRemove BKL from remote_llseek v2
Andi Kleen [Fri, 27 Jun 2008 09:05:24 +0000 (11:05 +0200)]
Remove BKL from remote_llseek v2

- Replace remote_llseek with generic_file_llseek_unlocked (to force compilation
failures in all users)
- Change all users to either use generic_file_llseek_unlocked directly or
take the BKL around. I changed the file systems who don't use the BKL
for anything (CIFS, GFS) to call it directly. NCPFS and SMBFS and NFS
take the BKL, but explicitely in their own source now.

I moved them all over in a single patch to avoid unbisectable sections.

Open problem: 32bit kernels can corrupt fpos because its modification
is not atomic, but they can do that anyways because there's other paths who
modify it without BKL.

Do we need a special lock for the pos/f_version = 0 checks?

Trond says the NFS BKL is likely not needed, but keep it for now
until his full audit.

v2: Use generic_file_llseek_unlocked instead of remote_llseek_unlocked
    and factor duplicated code (suggested by hch)

Cc: Trond.Myklebust@netapp.com
Cc: swhiteho@redhat.com
Cc: sfrench@samba.org
Cc: vandrove@vc.cvut.cz
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Andi Kleen <ak@linux.intel.com>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
16 years agoMake FAT users happier by not deadlocking
Jonathan Corbet [Thu, 29 May 2008 23:14:05 +0000 (17:14 -0600)]
Make FAT users happier by not deadlocking

The FAT BKL removal patch can cause deadlocks.  It turns out that the new
lock_super() calls are unneeded, remove them (as directed by Linus).

Reported-by: "Tony Luck" <tony.luck@intel.com>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
16 years agox86-mce: BKL pushdown
Arnd Bergmann [Tue, 20 May 2008 17:17:02 +0000 (19:17 +0200)]
x86-mce: BKL pushdown

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
16 years agovmwatchdog: BKL pushdown
Arnd Bergmann [Tue, 20 May 2008 17:17:01 +0000 (19:17 +0200)]
vmwatchdog: BKL pushdown

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
16 years agovmcp: BKL pushdown
Arnd Bergmann [Tue, 20 May 2008 17:16:59 +0000 (19:16 +0200)]
vmcp: BKL pushdown

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
16 years agovia-pmu: BKL pushdown
Arnd Bergmann [Tue, 20 May 2008 17:16:58 +0000 (19:16 +0200)]
via-pmu: BKL pushdown

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
16 years agouml-random: BKL pushdown
Arnd Bergmann [Tue, 20 May 2008 17:16:57 +0000 (19:16 +0200)]
uml-random: BKL pushdown

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
16 years agouml-mmapper: BKL pushdown
Arnd Bergmann [Tue, 20 May 2008 17:16:56 +0000 (19:16 +0200)]
uml-mmapper: BKL pushdown

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
16 years agouml-harddog: BKL pushdown
Arnd Bergmann [Tue, 20 May 2008 17:16:54 +0000 (19:16 +0200)]
uml-harddog: BKL pushdown

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
16 years agouinput: BKL pushdown
Arnd Bergmann [Tue, 20 May 2008 17:16:53 +0000 (19:16 +0200)]
uinput: BKL pushdown

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
16 years agouctrl: BKL pushdown
Arnd Bergmann [Tue, 20 May 2008 17:16:52 +0000 (19:16 +0200)]
uctrl: BKL pushdown

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
16 years agotpm-tpm: BKL pushdown
Arnd Bergmann [Tue, 20 May 2008 17:16:51 +0000 (19:16 +0200)]
tpm-tpm: BKL pushdown

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
16 years agosparc64-rtc: BKL pushdown
Arnd Bergmann [Tue, 20 May 2008 17:16:50 +0000 (19:16 +0200)]
sparc64-rtc: BKL pushdown

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
16 years agosparc-apc: BKL pushdown
Arnd Bergmann [Tue, 20 May 2008 17:16:48 +0000 (19:16 +0200)]
sparc-apc: BKL pushdown

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
16 years agosonypi: BKL pushdown
Arnd Bergmann [Tue, 20 May 2008 17:16:46 +0000 (19:16 +0200)]
sonypi: BKL pushdown

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
16 years agosony-laptop: BKL pushdown
Arnd Bergmann [Tue, 20 May 2008 17:16:45 +0000 (19:16 +0200)]
sony-laptop: BKL pushdown

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
16 years agoserio: BKL pushdown
Arnd Bergmann [Tue, 20 May 2008 17:16:43 +0000 (19:16 +0200)]
serio: BKL pushdown

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
16 years agoscsi-tgt: BKL pushdown
Arnd Bergmann [Tue, 20 May 2008 17:16:42 +0000 (19:16 +0200)]
scsi-tgt: BKL pushdown

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
16 years agosbus-rtc: BKL pushdown
Arnd Bergmann [Tue, 20 May 2008 17:16:40 +0000 (19:16 +0200)]
sbus-rtc: BKL pushdown

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
16 years agortc-rtc-m41t80: BKL pushdown
Arnd Bergmann [Tue, 20 May 2008 17:16:39 +0000 (19:16 +0200)]
rtc-rtc-m41t80: BKL pushdown

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
16 years agortc: BKL pushdown
Arnd Bergmann [Tue, 20 May 2008 17:16:37 +0000 (19:16 +0200)]
rtc: BKL pushdown

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
16 years agoriowatchdog: BKL pushdown
Arnd Bergmann [Tue, 20 May 2008 17:16:35 +0000 (19:16 +0200)]
riowatchdog: BKL pushdown

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
16 years agopm_qos_params: BKL pushdown
Arnd Bergmann [Tue, 20 May 2008 17:16:33 +0000 (19:16 +0200)]
pm_qos_params: BKL pushdown

[jmc: added <linux/smp_lock.h>]

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
16 years agoparisc-kernel-perf: BKL pushdown
Arnd Bergmann [Tue, 20 May 2008 17:16:31 +0000 (19:16 +0200)]
parisc-kernel-perf: BKL pushdown

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
16 years agoparisc-eisa_eeprom: BKL pushdown
Arnd Bergmann [Tue, 20 May 2008 17:16:30 +0000 (19:16 +0200)]
parisc-eisa_eeprom: BKL pushdown

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
16 years agoopenprom: BKL pushdown
Arnd Bergmann [Tue, 20 May 2008 17:16:29 +0000 (19:16 +0200)]
openprom: BKL pushdown

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
16 years agoocfs2-stack_user: BKL pushdown
Arnd Bergmann [Tue, 20 May 2008 17:16:28 +0000 (19:16 +0200)]
ocfs2-stack_user: BKL pushdown

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
16 years agonvram: BKL pushdown
Arnd Bergmann [Tue, 20 May 2008 17:16:26 +0000 (19:16 +0200)]
nvram: BKL pushdown

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
16 years agonet-tun: BKL pushdown
Arnd Bergmann [Tue, 20 May 2008 17:16:24 +0000 (19:16 +0200)]
net-tun: BKL pushdown

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
16 years agomwave-mwavedd: BKL pushdown
Arnd Bergmann [Tue, 20 May 2008 17:16:23 +0000 (19:16 +0200)]
mwave-mwavedd: BKL pushdown

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
16 years agomvme16x-rtc: BKL pushdown
Arnd Bergmann [Tue, 20 May 2008 17:16:22 +0000 (19:16 +0200)]
mvme16x-rtc: BKL pushdown

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
16 years agomousedev: BKL pushdown
Arnd Bergmann [Tue, 20 May 2008 17:16:20 +0000 (19:16 +0200)]
mousedev: BKL pushdown

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
16 years agomonwriter: BKL pushdown
Arnd Bergmann [Tue, 20 May 2008 17:16:18 +0000 (19:16 +0200)]
monwriter: BKL pushdown

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
16 years agomonreader: BKL pushdown
Arnd Bergmann [Tue, 20 May 2008 17:16:17 +0000 (19:16 +0200)]
monreader: BKL pushdown

[jmc: added <linux/smp_lock.h>]

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
16 years agomicrocode: BKL pushdown
Arnd Bergmann [Tue, 20 May 2008 17:16:16 +0000 (19:16 +0200)]
microcode: BKL pushdown

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
16 years agomessage-i2o-i2o_config: BKL pushdown
Arnd Bergmann [Tue, 20 May 2008 17:16:14 +0000 (19:16 +0200)]
message-i2o-i2o_config: BKL pushdown

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
16 years agomegaraid: BKL pushdown
Arnd Bergmann [Tue, 20 May 2008 17:16:13 +0000 (19:16 +0200)]
megaraid: BKL pushdown

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
16 years agomedia-radio-miropcm20-rds: BKL pushdown
Arnd Bergmann [Tue, 20 May 2008 17:16:12 +0000 (19:16 +0200)]
media-radio-miropcm20-rds: BKL pushdown

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
16 years agomacintosh-smu: BKL pushdown
Arnd Bergmann [Tue, 20 May 2008 17:16:11 +0000 (19:16 +0200)]
macintosh-smu: BKL pushdown

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
16 years agolcd: BKL pushdown
Arnd Bergmann [Tue, 20 May 2008 17:16:10 +0000 (19:16 +0200)]
lcd: BKL pushdown

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
16 years agojsflash: BKL pushdown
Arnd Bergmann [Tue, 20 May 2008 17:16:08 +0000 (19:16 +0200)]
jsflash: BKL pushdown

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
16 years agoirnet_ppp: BKL pushdown
Arnd Bergmann [Tue, 20 May 2008 17:16:06 +0000 (19:16 +0200)]
irnet_ppp: BKL pushdown

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
16 years agoipmi-watchdog: BKL pushdown
Arnd Bergmann [Tue, 20 May 2008 17:16:04 +0000 (19:16 +0200)]
ipmi-watchdog: BKL pushdown

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
16 years agoip27-rtc: BKL pushdown
Arnd Bergmann [Tue, 20 May 2008 17:16:03 +0000 (19:16 +0200)]
ip27-rtc: BKL pushdown

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
16 years agoinfiniband-ucma: BKL pushdown
Arnd Bergmann [Tue, 20 May 2008 17:16:02 +0000 (19:16 +0200)]
infiniband-ucma: BKL pushdown

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
16 years agohw-random: BKL pushdown
Arnd Bergmann [Tue, 20 May 2008 17:16:00 +0000 (19:16 +0200)]
hw-random: BKL pushdown

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
16 years agohpet: BKL pushdown
Arnd Bergmann [Tue, 20 May 2008 17:15:59 +0000 (19:15 +0200)]
hpet: BKL pushdown

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
16 years agohp_sdc_rtc: BKL pushdown
Arnd Bergmann [Tue, 20 May 2008 17:15:58 +0000 (19:15 +0200)]
hp_sdc_rtc: BKL pushdown

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
16 years agohdpu_cpustate: BKL pushdown
Arnd Bergmann [Tue, 20 May 2008 17:15:57 +0000 (19:15 +0200)]
hdpu_cpustate: BKL pushdown

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
16 years agogenrtc: BKL pushdown
Arnd Bergmann [Tue, 20 May 2008 17:15:55 +0000 (19:15 +0200)]
genrtc: BKL pushdown

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
16 years agoflash: BKL pushdown
Arnd Bergmann [Tue, 20 May 2008 17:15:54 +0000 (19:15 +0200)]
flash: BKL pushdown

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
16 years agoenvctrl: BKL pushdown
Arnd Bergmann [Tue, 20 May 2008 17:15:53 +0000 (19:15 +0200)]
envctrl: BKL pushdown

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
16 years agoefirtc: BKL pushdown
Arnd Bergmann [Tue, 20 May 2008 17:15:52 +0000 (19:15 +0200)]
efirtc: BKL pushdown

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
16 years agods1620: BKL pushdown
Arnd Bergmann [Tue, 20 May 2008 17:15:50 +0000 (19:15 +0200)]
ds1620: BKL pushdown

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
16 years agods1286: BKL pushdown
Arnd Bergmann [Tue, 20 May 2008 17:15:49 +0000 (19:15 +0200)]
ds1286: BKL pushdown

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
16 years agodlm-user: BKL pushdown
Arnd Bergmann [Tue, 20 May 2008 17:15:48 +0000 (19:15 +0200)]
dlm-user: BKL pushdown

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
16 years agodisplay7seg: BKL pushdown
Arnd Bergmann [Tue, 20 May 2008 17:15:47 +0000 (19:15 +0200)]
display7seg: BKL pushdown

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
16 years agocrypto-zcrypt_api: BKL pushdown
Arnd Bergmann [Tue, 20 May 2008 17:15:46 +0000 (19:15 +0200)]
crypto-zcrypt_api: BKL pushdown

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
16 years agocrypto-prng: BKL pushdown
Arnd Bergmann [Tue, 20 May 2008 17:15:45 +0000 (19:15 +0200)]
crypto-prng: BKL pushdown

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
16 years agocpwatchdog: BKL pushdown
Arnd Bergmann [Tue, 20 May 2008 17:15:43 +0000 (19:15 +0200)]
cpwatchdog: BKL pushdown

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
16 years agobvme6000-rtc: BKL pushdown
Arnd Bergmann [Tue, 20 May 2008 17:15:42 +0000 (19:15 +0200)]
bvme6000-rtc: BKL pushdown

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
16 years agobriq_panel: BKL pushdown
Arnd Bergmann [Tue, 20 May 2008 17:15:41 +0000 (19:15 +0200)]
briq_panel: BKL pushdown

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
16 years agobluetooth-vhci: BKL pushdown
Arnd Bergmann [Tue, 20 May 2008 17:15:40 +0000 (19:15 +0200)]
bluetooth-vhci: BKL pushdown

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
16 years agoblock-dasd_eer: BKL pushdown
Arnd Bergmann [Tue, 20 May 2008 17:15:38 +0000 (19:15 +0200)]
block-dasd_eer: BKL pushdown

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
16 years agobf561-coreb: BKL pushdown
Arnd Bergmann [Tue, 20 May 2008 17:15:37 +0000 (19:15 +0200)]
bf561-coreb: BKL pushdown

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
16 years agobasler-excite: BKL pushdown
Arnd Bergmann [Tue, 20 May 2008 17:15:36 +0000 (19:15 +0200)]
basler-excite: BKL pushdown

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
16 years agoapm_32: BKL pushdown
Arnd Bergmann [Tue, 20 May 2008 17:15:34 +0000 (19:15 +0200)]
apm_32: BKL pushdown

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
16 years agoapm-emulation: BKL pushdown
Arnd Bergmann [Tue, 20 May 2008 17:15:33 +0000 (19:15 +0200)]
apm-emulation: BKL pushdown

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
16 years agoans-lcd: BKL pushdown
Arnd Bergmann [Tue, 20 May 2008 17:15:32 +0000 (19:15 +0200)]
ans-lcd: BKL pushdown

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
16 years agoagp-frontend: BKL pushdown
Arnd Bergmann [Tue, 20 May 2008 17:15:30 +0000 (19:15 +0200)]
agp-frontend: BKL pushdown

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
16 years agoReplace BKL with superblock lock in fat/msdos/vfat
Linus Torvalds [Tue, 20 May 2008 02:53:01 +0000 (19:53 -0700)]
Replace BKL with superblock lock in fat/msdos/vfat

This replaces the use of the BKL in the FAT family of filesystems with the
existing superblock lock instead.

The code already appears to do mostly proper locking with its own private
spinlocks (and mutexes), but while the BKL could possibly have been
dropped entirely, converting it to use the superblock lock (which is just
a regular mutex) is the conservative thing to do.

As a per-filesystem mutex, it not only won't have any of the possible
latency issues related to the BKL, but the lock is obviously private to
the particular filesystem instance and will thus not cause problems for
entirely unrelated users like the BKL can.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Cc: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
16 years agobkl-removal viotape fixup
Stephen Rothwell [Mon, 19 May 2008 06:06:52 +0000 (16:06 +1000)]
bkl-removal viotape fixup

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
16 years agoRemove the lock_kernel() call from chrdev_open()
Jonathan Corbet [Sun, 18 May 2008 21:40:00 +0000 (15:40 -0600)]
Remove the lock_kernel() call from chrdev_open()

All in-kernel char device open() functions now either have their own
lock_kernel() calls or clearly do not need one.

Signed-off-by: Jonathan Corbet <corbet@lwn.net>
16 years agoAdd a comment in chrdev_open()
Jonathan Corbet [Sun, 18 May 2008 21:39:11 +0000 (15:39 -0600)]
Add a comment in chrdev_open()

I stared at this code for a while and almost deleted it before
understanding crept into my slow brain.  Hopefully this makes life easier
for the next person to happen on it.

Signed-off-by: Jonathan Corbet <corbet@lwn.net>
16 years agoAdd a bunch of cycle_kernel_lock() calls
Jonathan Corbet [Sun, 18 May 2008 21:32:43 +0000 (15:32 -0600)]
Add a bunch of cycle_kernel_lock() calls

All of the open() functions which don't need the BKL on their face may
still depend on its acquisition to serialize opens against driver
initialization.  So make those functions acquire then release the BKL to be
on the safe side.

Signed-off-by: Jonathan Corbet <corbet@lwn.net>
16 years agoAdd cycle_kernel_lock()
Jonathan Corbet [Sun, 18 May 2008 20:27:41 +0000 (14:27 -0600)]
Add cycle_kernel_lock()

A number of driver functions are so obviously trivial that they do not need
the big kernel lock - at least not overtly.  It turns out that the
acquisition of the BKL in driver open() functions can perform a sort of
poor-hacker's serialization function, delaying the open operation until the
driver is certain to have completed its initialization.  Add a simple
cycle_kernel_lock() function for these cases to make it clear that there is
no need to *hold* the BKL, just to be sure that we can acquire it.

Signed-off-by: Jonathan Corbet <corbet@lwn.net>
16 years agovideodev: BKL pushdown
Jonathan Corbet [Fri, 16 May 2008 20:28:31 +0000 (14:28 -0600)]
videodev: BKL pushdown

Put explicit lock_kernel() calls into videodev_open().  That function
itself seems OK, but one never knows about all the open() functions
provided by underlying video drivers.

Signed-off-by: Jonathan Corbet <corbet@lwn.net>
16 years agousbdev: BKL pushdown
Jonathan Corbet [Fri, 16 May 2008 20:25:20 +0000 (14:25 -0600)]
usbdev: BKL pushdown

Add explicit lock_kernel() calls to usbdev_open()

Signed-off-by: Jonathan Corbet <corbet@lwn.net>
16 years agoUSB Monitor: BKL pushdown
Jonathan Corbet [Fri, 16 May 2008 20:23:31 +0000 (14:23 -0600)]
USB Monitor: BKL pushdown

Add explicit lock_kernel() calls to mon_bin_open()

Signed-off-by: Jonathan Corbet <corbet@lwn.net>
16 years agoprinter gadget: BKL pushdown
Jonathan Corbet [Fri, 16 May 2008 20:21:30 +0000 (14:21 -0600)]
printer gadget: BKL pushdown

Add explicit lock_kernel() calls to printer_open()

Signed-off-by: Jonathan Corbet <corbet@lwn.net>
16 years agoadb: BKL pushdown
Jonathan Corbet [Fri, 16 May 2008 20:19:56 +0000 (14:19 -0600)]
adb: BKL pushdown

Put explicit lock_kernel() calls in adb_open().  The fact that
adb_release() already has them suggests this is necessary.

Signed-off-by: Jonathan Corbet <corbet@lwn.net>
16 years agodivamnt: BKL pushdown
Jonathan Corbet [Fri, 16 May 2008 20:17:33 +0000 (14:17 -0600)]
divamnt: BKL pushdown

Put explicit lock_kernel() calls into maint_open().

Signed-off-by: Jonathan Corbet <corbet@lwn.net>
16 years agoCAPI: BKL pushdown
Jonathan Corbet [Fri, 16 May 2008 20:15:33 +0000 (14:15 -0600)]
CAPI: BKL pushdown

Put explicit lock_kernel() calls into capi_open()

Signed-off-by: Jonathan Corbet <corbet@lwn.net>
16 years agochanger: BKL pushdown
Jonathan Corbet [Fri, 16 May 2008 20:12:52 +0000 (14:12 -0600)]
changer: BKL pushdown

Add lock_kernel() calls to ch_open(), though the existing locking looks
adequate.

Signed-off-by: Jonathan Corbet <corbet@lwn.net>
16 years agodpt_i20: BKL pushdown
Jonathan Corbet [Fri, 16 May 2008 20:11:09 +0000 (14:11 -0600)]
dpt_i20: BKL pushdown

Add lock_kernel() calls to adpt_open()

Signed-off-by: Jonathan Corbet <corbet@lwn.net>
16 years agovideopix: BKL pushdown
Jonathan Corbet [Fri, 16 May 2008 20:08:58 +0000 (14:08 -0600)]
videopix: BKL pushdown

Add explicit lock_kernel() calls to vfc_open().

Signed-off-by: Jonathan Corbet <corbet@lwn.net>
16 years agobpp: bkl pushdown
Jonathan Corbet [Fri, 16 May 2008 20:06:45 +0000 (14:06 -0600)]
bpp: bkl pushdown

Put explicit lock_kernel() calls into bpp_open().  It has locking, but I'm
not convinced it won't race with ioctl().

Signed-off-by: Jonathan Corbet <corbet@lwn.net>
16 years agophantom: BKL pushdown
Jonathan Corbet [Fri, 16 May 2008 20:03:05 +0000 (14:03 -0600)]
phantom: BKL pushdown

Add explicit lock_kernel calls to phantom_open().

Signed-off-by: Jonathan Corbet <corbet@lwn.net>