Skip to contentSkip to conversation

net/ipv6/* - compile warning cleanup

PATCH In review Chuck Short 2 participants 2 messages May 28, 2005

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

PATCH 1/1 net/ipv6/* - compile warning cleanup

compile warning cleanup - handle copy_to/from_user error returns

net/ipv6/ip6_flowlabel.c +4 -2
diff -Naur linux-source-2.6.12-2.6.11.93.orig/net/ipv6/ip6_flowlabel.c linux-source-2.6.12-2.6.11.93/net/ipv6/ip6_flowlabel.c
@@ -537,8 +537,10 @@
 
 		/* Do not check for fault */
 		if (!freq.flr_label)
-			copy_to_user(&((struct in6_flowlabel_req __user *) optval)->flr_label,
-				     &fl->label, sizeof(fl->label));
+			if(copy_to_user(&((struct in6_flowlabel_req __user *) optval)->flr_label,&fl->label, sizeof(fl->label))) {
+				err = -EFAULT;
+				goto done;
+			}
 
 		sfl1->fl = fl;
 		sfl1->next = np->ipv6_fl_list;

_______________________________________________
Kernel-janitors mailing list
[email protected]
http://lists.osdl.org/mailman/listinfo/kernel-janitors