diff options
Diffstat (limited to 'net/netlink/af_netlink.c')
-rw-r--r-- | net/netlink/af_netlink.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/net/netlink/af_netlink.c b/net/netlink/af_netlink.c index a3c8e692f493..641cfbc278d8 100644 --- a/net/netlink/af_netlink.c +++ b/net/netlink/af_netlink.c | |||
@@ -1012,13 +1012,14 @@ static int netlink_setsockopt(struct socket *sock, int level, int optname, | |||
1012 | { | 1012 | { |
1013 | struct sock *sk = sock->sk; | 1013 | struct sock *sk = sock->sk; |
1014 | struct netlink_sock *nlk = nlk_sk(sk); | 1014 | struct netlink_sock *nlk = nlk_sk(sk); |
1015 | int val = 0, err; | 1015 | unsigned int val = 0; |
1016 | int err; | ||
1016 | 1017 | ||
1017 | if (level != SOL_NETLINK) | 1018 | if (level != SOL_NETLINK) |
1018 | return -ENOPROTOOPT; | 1019 | return -ENOPROTOOPT; |
1019 | 1020 | ||
1020 | if (optlen >= sizeof(int) && | 1021 | if (optlen >= sizeof(int) && |
1021 | get_user(val, (int __user *)optval)) | 1022 | get_user(val, (unsigned int __user *)optval)) |
1022 | return -EFAULT; | 1023 | return -EFAULT; |
1023 | 1024 | ||
1024 | switch (optname) { | 1025 | switch (optname) { |