diff options
author | David S. Miller <davem@davemloft.net> | 2018-01-09 16:37:00 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-01-09 16:37:00 +0100 |
commit | a0ce093180f2bbb832b3f5583adc640ad67ea568 (patch) | |
tree | 62c9aca5be3566ea4810e4584a02870de8b953f8 /net/rds | |
parent | net: tipc: remove unused hardirq.h (diff) | |
parent | Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net (diff) | |
download | linux-a0ce093180f2bbb832b3f5583adc640ad67ea568.tar.xz linux-a0ce093180f2bbb832b3f5583adc640ad67ea568.zip |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Diffstat (limited to 'net/rds')
-rw-r--r-- | net/rds/rdma.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/net/rds/rdma.c b/net/rds/rdma.c index bc2f1e0977d6..634cfcb7bba6 100644 --- a/net/rds/rdma.c +++ b/net/rds/rdma.c @@ -525,6 +525,9 @@ int rds_rdma_extra_size(struct rds_rdma_args *args) local_vec = (struct rds_iovec __user *)(unsigned long) args->local_vec_addr; + if (args->nr_local == 0) + return -EINVAL; + /* figure out the number of pages in the vector */ for (i = 0; i < args->nr_local; i++) { if (copy_from_user(&vec, &local_vec[i], @@ -874,6 +877,7 @@ int rds_cmsg_atomic(struct rds_sock *rs, struct rds_message *rm, err: if (page) put_page(page); + rm->atomic.op_active = 0; kfree(rm->atomic.op_notifier); return ret; |