patch-2.1.88 linux/drivers/net/slip.c
Next file: linux/drivers/net/smc-mca.c
Previous file: linux/drivers/net/seeq8005.c
Back to the patch index
Back to the overall index
- Lines: 18
- Date:
Thu Feb 19 14:58:40 1998
- Orig file:
v2.1.87/linux/drivers/net/slip.c
- Orig date:
Thu Feb 12 20:56:09 1998
diff -u --recursive --new-file v2.1.87/linux/drivers/net/slip.c linux/drivers/net/slip.c
@@ -969,11 +969,12 @@
switch(cmd) {
case SIOCGIFNAME:
- err = verify_area(VERIFY_WRITE, arg, strlen(sl->dev->name) + 1);
- if (err) {
- return err;
- }
- copy_to_user(arg, sl->dev->name, strlen(sl->dev->name) + 1);
+ /* Please, do not put this line under copy_to_user,
+ it breaks my old poor gcc on alpha --ANK
+ */
+ tmp = strlen(sl->dev->name) + 1;
+ if (copy_to_user(arg, sl->dev->name, tmp) < 0)
+ return -EFAULT;
return 0;
case SIOCGIFENCAP:
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov