patch-2.4.0-test6 linux/drivers/net/slip.c
Next file: linux/drivers/net/stnic.c
Previous file: linux/drivers/net/skfp/Makefile
Back to the patch index
Back to the overall index
- Lines: 32
- Date:
Sun Aug 6 22:20:09 2000
- Orig file:
v2.4.0-test5/linux/drivers/net/slip.c
- Orig date:
Mon Jul 10 16:47:24 2000
diff -u --recursive --new-file v2.4.0-test5/linux/drivers/net/slip.c linux/drivers/net/slip.c
@@ -1260,8 +1260,10 @@
switch(cmd){
case SIOCSKEEPALIVE:
/* max for unchar */
- if (((unsigned int)((unsigned long)rq->ifr_data)) > 255)
+ if (((unsigned int)((unsigned long)rq->ifr_data)) > 255) {
+ spin_unlock_bh(&sl->lock);
return -EINVAL;
+ }
sl->keepalive = (unchar) ((unsigned long)rq->ifr_data);
if (sl->keepalive != 0) {
sl->keepalive_timer.expires=jiffies+sl->keepalive*HZ;
@@ -1270,7 +1272,6 @@
} else {
del_timer(&sl->keepalive_timer);
}
- spin_unlock_bh(&sl->lock);
break;
case SIOCGKEEPALIVE:
@@ -1278,8 +1279,10 @@
break;
case SIOCSOUTFILL:
- if (((unsigned)((unsigned long)rq->ifr_data)) > 255) /* max for unchar */
+ if (((unsigned)((unsigned long)rq->ifr_data)) > 255) { /* max for unchar */
+ spin_unlock_bh(&sl->lock);
return -EINVAL;
+ }
if ((sl->outfill = (unchar)((unsigned long) rq->ifr_data)) != 0){
mod_timer(&sl->outfill_timer, jiffies+sl->outfill*HZ);
set_bit(SLF_OUTWAIT, &sl->flags);
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)