Skip to contentSkip to conversation

kernel/* - compile warning cleanup

PATCH In review Stephen Biggs 1 participant 1 message Feb 14, 2005

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

PATCH 19/21 kernel/* - compile warning cleanup

Description: compile warning cleanup - handle copy_to/from_user error returns

net/ipv6/ip6_flowlabel.c +7 -3
diff -Nurdp -X dontdiff-osdl linux-2.6.11-rc3-mm2-original/net/ipv6/ip6_flowlabel.c linux-2.6.11-rc3-mm2/net/ipv6/ip6_flowlabel.c
@@ -537,9 +537,13 @@ release:
 			goto done;
 
 		/* 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 (!freq.flr_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