diff options
author | Mauro Carvalho Chehab <mchehab@infradead.org> | 2008-07-17 23:28:31 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2008-07-17 23:28:31 -0300 |
commit | 4a106627be1f6a70e13d4fb65866f69591b64ade (patch) | |
tree | 324aedd173ee51946416b0010c43f0749a763792 /linux | |
parent | a6b6470938e58aff69cdbf651e8476e3a26e7792 (diff) | |
download | mediapointer-dvb-s2-4a106627be1f6a70e13d4fb65866f69591b64ade.tar.gz mediapointer-dvb-s2-4a106627be1f6a70e13d4fb65866f69591b64ade.tar.bz2 |
backport commit cad84238056babf4e4e6b0de183238224aab8177
From: Mauro Carvalho Chehab <mchehab@infradead.org>
Author: Arnd Bergmann <arnd@arndb.de>
Date: Tue May 20 19:16:12 2008 +0200
media-radio-miropcm20-rds: BKL pushdown
kernel-sync:
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'linux')
-rw-r--r-- | linux/drivers/media/radio/miropcm20-rds.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/linux/drivers/media/radio/miropcm20-rds.c b/linux/drivers/media/radio/miropcm20-rds.c index 295381795..af90cdcf2 100644 --- a/linux/drivers/media/radio/miropcm20-rds.c +++ b/linux/drivers/media/radio/miropcm20-rds.c @@ -12,6 +12,7 @@ #include <linux/module.h> #include <linux/init.h> #include <linux/slab.h> +#include <linux/smp_lock.h> #include <linux/fs.h> #include <linux/miscdevice.h> #include <linux/delay.h> @@ -27,13 +28,16 @@ static int rds_f_open(struct inode *in, struct file *fi) if (rds_users) return -EBUSY; + lock_kernel(); rds_users++; if ((text_buffer=kmalloc(66, GFP_KERNEL)) == 0) { rds_users--; printk(KERN_NOTICE "aci-rds: Out of memory by open()...\n"); + unlock_kernel(); return -ENOMEM; } + unlock_kernel(); return 0; } |