Skip to content

Commit a114a9d

Browse files
borntraegerMartin Schwidefsky
authored andcommitted
[S390] vmcp: remove BKL
The vmcp driver uses the session->mutex for concurrent access of the data structures. Therefore, the BKL in vmcp_open does not protect against any other function in the driver. The BLK in vmcp_open would protect concurrent access to the module init but all necessary steps ave finished before misc_register is called. We can safely remove the lock_kernel from vcmp. Signed-off-by: Christian Borntraeger <[email protected]> Signed-off-by: Martin Schwidefsky <[email protected]>
1 parent f414f5f commit a114a9d

File tree

1 file changed

+0
-3
lines changed

1 file changed

+0
-3
lines changed

drivers/s390/char/vmcp.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616
#include <linux/kernel.h>
1717
#include <linux/miscdevice.h>
1818
#include <linux/module.h>
19-
#include <linux/smp_lock.h>
2019
#include <asm/cpcmd.h>
2120
#include <asm/debug.h>
2221
#include <asm/uaccess.h>
@@ -41,13 +40,11 @@ static int vmcp_open(struct inode *inode, struct file *file)
4140
if (!session)
4241
return -ENOMEM;
4342

44-
lock_kernel();
4543
session->bufsize = PAGE_SIZE;
4644
session->response = NULL;
4745
session->resp_size = 0;
4846
mutex_init(&session->mutex);
4947
file->private_data = session;
50-
unlock_kernel();
5148
return nonseekable_open(inode, file);
5249
}
5350

0 commit comments

Comments
 (0)