提交 6c94d361 编写于 作者: D David S. Miller

[IPV6]: Clear up user copy warning in flowlabel code.

We are intentionally ignoring the copy_to_user() value,
make it clear to the compiler too.

Noted by Jeff Garzik.
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 69f6a0fa
...@@ -535,10 +535,12 @@ int ipv6_flowlabel_opt(struct sock *sk, char __user *optval, int optlen) ...@@ -535,10 +535,12 @@ int ipv6_flowlabel_opt(struct sock *sk, char __user *optval, int optlen)
if (err) if (err)
goto done; goto done;
/* Do not check for fault */ if (!freq.flr_label) {
if (!freq.flr_label) if (copy_to_user(&((struct in6_flowlabel_req __user *) optval)->flr_label,
copy_to_user(&((struct in6_flowlabel_req __user *) optval)->flr_label, &fl->label, sizeof(fl->label))) {
&fl->label, sizeof(fl->label)); /* Intentionally ignore fault. */
}
}
sfl1->fl = fl; sfl1->fl = fl;
sfl1->next = np->ipv6_fl_list; sfl1->next = np->ipv6_fl_list;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册