diff options
Diffstat (limited to 'kernel/net/rds')
-rw-r--r-- | kernel/net/rds/info.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/net/rds/info.c b/kernel/net/rds/info.c index 9a6b4f661..140a44a5f 100644 --- a/kernel/net/rds/info.c +++ b/kernel/net/rds/info.c @@ -176,7 +176,7 @@ int rds_info_getsockopt(struct socket *sock, int optname, char __user *optval, /* check for all kinds of wrapping and the like */ start = (unsigned long)optval; - if (len < 0 || len + PAGE_SIZE - 1 < len || start + len < start) { + if (len < 0 || len > INT_MAX - PAGE_SIZE + 1 || start + len < start) { ret = -EINVAL; goto out; } |