]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
infiniband-ucma: BKL pushdown
authorArnd Bergmann <arnd@arndb.de>
Tue, 20 May 2008 17:16:02 +0000 (19:16 +0200)
committerJonathan Corbet <corbet@lwn.net>
Fri, 20 Jun 2008 20:05:57 +0000 (14:05 -0600)
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
drivers/infiniband/core/ucma.c

index ca4cf3a511abd81cdbdc02dcd3546a85e9d71201..195f97302fe5243575d42abe3c990bdb4fa7d106 100644 (file)
@@ -38,6 +38,7 @@
 #include <linux/in.h>
 #include <linux/in6.h>
 #include <linux/miscdevice.h>
+#include <linux/smp_lock.h>
 
 #include <rdma/rdma_user_cm.h>
 #include <rdma/ib_marshall.h>
@@ -1156,6 +1157,7 @@ static int ucma_open(struct inode *inode, struct file *filp)
        if (!file)
                return -ENOMEM;
 
+       lock_kernel();
        INIT_LIST_HEAD(&file->event_list);
        INIT_LIST_HEAD(&file->ctx_list);
        init_waitqueue_head(&file->poll_wait);
@@ -1163,6 +1165,7 @@ static int ucma_open(struct inode *inode, struct file *filp)
 
        filp->private_data = file;
        file->filp = filp;
+       unlock_kernel();
        return 0;
 }