From: Alan Cox Date: Wed, 30 Apr 2008 07:53:19 +0000 (-0700) Subject: isicom: istallion prepare for lock_kernel pushdown X-Git-Tag: v2.6.26-rc1~255 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3736113654165b5f4b8658b6a34d74631e0b7d81;p=linux-2.6 isicom: istallion prepare for lock_kernel pushdown This is an ancient driver so just wrap it in lock_kernel internally and be done. Signed-off-by: Alan Cox Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/drivers/char/istallion.c b/drivers/char/istallion.c index c645455c3f..37dc3d202c 100644 --- a/drivers/char/istallion.c +++ b/drivers/char/istallion.c @@ -4433,6 +4433,8 @@ static int stli_memioctl(struct inode *ip, struct file *fp, unsigned int cmd, un done = 0; rc = 0; + lock_kernel(); + switch (cmd) { case COM_GETPORTSTATS: rc = stli_getportstats(NULL, argp); @@ -4455,6 +4457,7 @@ static int stli_memioctl(struct inode *ip, struct file *fp, unsigned int cmd, un done++; break; } + unlock_kernel(); if (done) return rc; @@ -4472,6 +4475,8 @@ static int stli_memioctl(struct inode *ip, struct file *fp, unsigned int cmd, un if (brdp->state == 0) return -ENODEV; + lock_kernel(); + switch (cmd) { case STL_BINTR: EBRDINTR(brdp); @@ -4494,6 +4499,7 @@ static int stli_memioctl(struct inode *ip, struct file *fp, unsigned int cmd, un rc = -ENOIOCTLCMD; break; } + unlock_kernel(); return rc; }