diff options
author | Greg Kroah-Hartman | 2018-07-30 10:04:58 +0200 |
---|---|---|
committer | Greg Kroah-Hartman | 2018-07-30 10:04:58 +0200 |
commit | 8a7b5d0f75f757fa88b0d17c19523161b27b8e80 (patch) | |
tree | 54a3e7f1f995583ed924ff32cf5dacc800119800 /net/ipv4/sysctl_net_ipv4.c | |
parent | USB: option: add support for DW5821e (diff) | |
parent | Linux 4.18-rc7 (diff) | |
download | kernel-qcow2-linux-8a7b5d0f75f757fa88b0d17c19523161b27b8e80.tar.gz kernel-qcow2-linux-8a7b5d0f75f757fa88b0d17c19523161b27b8e80.tar.xz kernel-qcow2-linux-8a7b5d0f75f757fa88b0d17c19523161b27b8e80.zip |
Merge 4.18-rc7 into usb-next
We want the USB fixes in here as well to handle merge issues.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'net/ipv4/sysctl_net_ipv4.c')
-rw-r--r-- | net/ipv4/sysctl_net_ipv4.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/net/ipv4/sysctl_net_ipv4.c b/net/ipv4/sysctl_net_ipv4.c index af0a857d8352..5fa335fd3852 100644 --- a/net/ipv4/sysctl_net_ipv4.c +++ b/net/ipv4/sysctl_net_ipv4.c @@ -189,8 +189,9 @@ static int ipv4_ping_group_range(struct ctl_table *table, int write, if (write && ret == 0) { low = make_kgid(user_ns, urange[0]); high = make_kgid(user_ns, urange[1]); - if (!gid_valid(low) || !gid_valid(high) || - (urange[1] < urange[0]) || gid_lt(high, low)) { + if (!gid_valid(low) || !gid_valid(high)) + return -EINVAL; + if (urange[1] < urange[0] || gid_lt(high, low)) { low = make_kgid(&init_user_ns, 1); high = make_kgid(&init_user_ns, 0); } |