提交 cad84238 编写于 作者: A Arnd Bergmann 提交者: Jonathan Corbet

media-radio-miropcm20-rds: BKL pushdown

Signed-off-by: NArnd Bergmann <arnd@arndb.de>
上级 b9bde77a
......@@ -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;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册