aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2008-07-14 17:48:31 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2008-07-14 17:48:31 -0400
commitd1794f2c5b5817eb79ccc5e00701ca748d1b073a (patch)
tree5a4c98e694e88a8c82f342d0cc9edb2a4cbbef36 /drivers/video
parenta41eebab7537890409ea9dfe0fcda9b5fbdb090d (diff)
parent2fceef397f9880b212a74c418290ce69e7ac00eb (diff)
Merge branch 'bkl-removal' of git://git.lwn.net/linux-2.6
* 'bkl-removal' of git://git.lwn.net/linux-2.6: (146 commits) IB/umad: BKL is not needed for ib_umad_open() IB/uverbs: BKL is not needed for ib_uverbs_open() bf561-coreb: BKL unneeded for open() Call fasync() functions without the BKL snd/PCM: fasync BKL pushdown ipmi: fasync BKL pushdown ecryptfs: fasync BKL pushdown Bluetooth VHCI: fasync BKL pushdown tty_io: fasync BKL pushdown tun: fasync BKL pushdown i2o: fasync BKL pushdown mpt: fasync BKL pushdown Remove BKL from remote_llseek v2 Make FAT users happier by not deadlocking x86-mce: BKL pushdown vmwatchdog: BKL pushdown vmcp: BKL pushdown via-pmu: BKL pushdown uml-random: BKL pushdown uml-mmapper: BKL pushdown ...
Diffstat (limited to 'drivers/video')
-rw-r--r--drivers/video/fbmem.c15
1 files changed, 11 insertions, 4 deletions
diff --git a/drivers/video/fbmem.c b/drivers/video/fbmem.c
index 776f7fcd2fbf..33ebdb198daf 100644
--- a/drivers/video/fbmem.c
+++ b/drivers/video/fbmem.c
@@ -1326,20 +1326,27 @@ fb_open(struct inode *inode, struct file *file)
1326 1326
1327 if (fbidx >= FB_MAX) 1327 if (fbidx >= FB_MAX)
1328 return -ENODEV; 1328 return -ENODEV;
1329 lock_kernel();
1329#ifdef CONFIG_KMOD 1330#ifdef CONFIG_KMOD
1330 if (!(info = registered_fb[fbidx])) 1331 if (!(info = registered_fb[fbidx]))
1331 try_to_load(fbidx); 1332 try_to_load(fbidx);
1332#endif /* CONFIG_KMOD */ 1333#endif /* CONFIG_KMOD */
1333 if (!(info = registered_fb[fbidx])) 1334 if (!(info = registered_fb[fbidx])) {
1334 return -ENODEV; 1335 res = -ENODEV;
1335 if (!try_module_get(info->fbops->owner)) 1336 goto out;
1336 return -ENODEV; 1337 }
1338 if (!try_module_get(info->fbops->owner)) {
1339 res = -ENODEV;
1340 goto out;
1341 }
1337 file->private_data = info; 1342 file->private_data = info;
1338 if (info->fbops->fb_open) { 1343 if (info->fbops->fb_open) {
1339 res = info->fbops->fb_open(info,1); 1344 res = info->fbops->fb_open(info,1);
1340 if (res) 1345 if (res)
1341 module_put(info->fbops->owner); 1346 module_put(info->fbops->owner);
1342 } 1347 }
1348out:
1349 unlock_kernel();
1343 return res; 1350 return res;
1344} 1351}
1345 1352