• R/O
  • HTTP
  • SSH
  • HTTPS

linux-2.4.36: Commit

2.4.36-stable kernel tree


Commit MetaInfo

Revision6b56c2053649d588df0ab750f404ccd39664f87f (tree)
Zeit2006-04-15 19:13:30
AutorMika Kukkonen <mikukkon@iki....>
CommiterWilly TARREAU

Log Message

[PATCH] VLAN: Add two missing checks to vlan_ioctl_handler()

In vlan_ioctl_handler() the code misses couple checks for
error return values. The same patch was merged into 2.6.

Signed-of-by: Mika Kukkonen <mikukkon@iki.fi>

Ändern Zusammenfassung

Diff

--- a/net/8021q/vlan.c
+++ b/net/8021q/vlan.c
@@ -757,6 +757,8 @@ int vlan_ioctl_handler(unsigned long arg)
757757
758758 case GET_VLAN_REALDEV_NAME_CMD:
759759 err = vlan_dev_get_realdev_name(args.device1, args.u.device2);
760+ if (err)
761+ goto out;
760762 if (copy_to_user((void*)arg, &args,
761763 sizeof(struct vlan_ioctl_args))) {
762764 err = -EFAULT;
@@ -765,6 +767,8 @@ int vlan_ioctl_handler(unsigned long arg)
765767
766768 case GET_VLAN_VID_CMD:
767769 err = vlan_dev_get_vid(args.device1, &vid);
770+ if (err)
771+ goto out;
768772 args.u.VID = vid;
769773 if (copy_to_user((void*)arg, &args,
770774 sizeof(struct vlan_ioctl_args))) {
@@ -778,7 +782,7 @@ int vlan_ioctl_handler(unsigned long arg)
778782 __FUNCTION__, args.cmd);
779783 return -EINVAL;
780784 };
781-
785+out:
782786 return err;
783787 }
784788
Show on old repository browser