diff --git a/net/netrom/af_netrom.c b/net/netrom/af_netrom.c index 775064cdd0ee4d0b263a83c38dfd06cac53a91b2..f1ba7dd3d253d3979f436500b090c42cb512a870 100644 --- a/net/netrom/af_netrom.c +++ b/net/netrom/af_netrom.c @@ -306,7 +306,7 @@ static int nr_setsockopt(struct socket *sock, int level, int optname, if (optlen < sizeof(unsigned int)) return -EINVAL; - if (copy_from_sockptr(&opt, optval, sizeof(unsigned int))) + if (copy_from_sockptr(&opt, optval, sizeof(unsigned long))) return -EFAULT; switch (optname) {