diff options
Diffstat (limited to 'drivers/infiniband/core')
-rw-r--r-- | drivers/infiniband/core/ucm.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/drivers/infiniband/core/ucm.c b/drivers/infiniband/core/ucm.c index 9494005d1c9a..e603736682bf 100644 --- a/drivers/infiniband/core/ucm.c +++ b/drivers/infiniband/core/ucm.c | |||
@@ -43,7 +43,6 @@ | |||
43 | #include <linux/cdev.h> | 43 | #include <linux/cdev.h> |
44 | #include <linux/idr.h> | 44 | #include <linux/idr.h> |
45 | #include <linux/mutex.h> | 45 | #include <linux/mutex.h> |
46 | #include <linux/smp_lock.h> | ||
47 | 46 | ||
48 | #include <asm/uaccess.h> | 47 | #include <asm/uaccess.h> |
49 | 48 | ||
@@ -1154,11 +1153,18 @@ static unsigned int ib_ucm_poll(struct file *filp, | |||
1154 | return mask; | 1153 | return mask; |
1155 | } | 1154 | } |
1156 | 1155 | ||
1156 | /* | ||
1157 | * ib_ucm_open() does not need the BKL: | ||
1158 | * | ||
1159 | * - no global state is referred to; | ||
1160 | * - there is no ioctl method to race against; | ||
1161 | * - no further module initialization is required for open to work | ||
1162 | * after the device is registered. | ||
1163 | */ | ||
1157 | static int ib_ucm_open(struct inode *inode, struct file *filp) | 1164 | static int ib_ucm_open(struct inode *inode, struct file *filp) |
1158 | { | 1165 | { |
1159 | struct ib_ucm_file *file; | 1166 | struct ib_ucm_file *file; |
1160 | 1167 | ||
1161 | cycle_kernel_lock(); | ||
1162 | file = kmalloc(sizeof(*file), GFP_KERNEL); | 1168 | file = kmalloc(sizeof(*file), GFP_KERNEL); |
1163 | if (!file) | 1169 | if (!file) |
1164 | return -ENOMEM; | 1170 | return -ENOMEM; |