From 4a106627be1f6a70e13d4fb65866f69591b64ade Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Thu, 17 Jul 2008 23:28:31 -0300 Subject: backport commit cad84238056babf4e4e6b0de183238224aab8177 From: Mauro Carvalho Chehab Author: Arnd Bergmann Date: Tue May 20 19:16:12 2008 +0200 media-radio-miropcm20-rds: BKL pushdown kernel-sync: Signed-off-by: Mauro Carvalho Chehab --- linux/drivers/media/radio/miropcm20-rds.c | 4 ++++ 1 file changed, 4 insertions(+) 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 #include #include +#include #include #include #include @@ -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; } -- cgit v1.2.3