Skip to contentSkip to conversation

irda: unbalanced lock_kernel in irnet_ppp

PATCH Applied Thadeu Lima de Souza Cascardo 2 participants 4 messages Feb 1, 2010 – Feb 4, 2010

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/2 irda: unbalanced lock_kernel in irnet_ppp

Add the missing unlock_kernel in one ioctl operation.

---
 net/irda/irnet/irnet_ppp.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
net/irda/irnet/irnet_ppp.c +2 -1
index d6b502c..8d38fdd 100644
@@ -703,7 +703,8 @@ dev_irnet_ioctl(
       lock_kernel();
       if(ap->ppp_open && !put_user(ppp_unit_number(&ap->chan),
 						(int __user *)argp))
-      err = 0;
+        err = 0;
+      unlock_kernel();
       break;
 
       /* All these ioctls can be passed both directly and from ppp_generic,
Signature · 1 line
1.6.6.1
#1 lore raw

PATCH 2/2 irda: add missing BKL in irnet_ppp ioctl

One ioctl has been forgotten when the BKL was push down into irnet_ppp ioctl function.

---
 net/irda/irnet/irnet_ppp.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
net/irda/irnet/irnet_ppp.c +2 -0
index 8d38fdd..67aee5c 100644
@@ -695,9 +695,11 @@ dev_irnet_ioctl(
 
       /* Query PPP channel and unit number */
     case PPPIOCGCHAN:
+      lock_kernel();
       if(ap->ppp_open && !put_user(ppp_channel_index(&ap->chan),
 						(int __user *)argp))
 	err = 0;
+      unlock_kernel();
       break;
     case PPPIOCGUNIT:
       lock_kernel();
Signature · 1 line
1.6.6.1