aboutsummaryrefslogtreecommitdiff
path: root/drivers/infiniband/core/ucma.c
diff options
context:
space:
mode:
authorAlex Shi <alex.shi@linaro.org>2016-05-24 12:17:43 +0800
committerAlex Shi <alex.shi@linaro.org>2016-05-24 12:17:43 +0800
commit6c1be3bf831c5b1f2ba51425315287df2c350633 (patch)
treefd07371829b4b5ea7db114502ac12fd989aa4e2a /drivers/infiniband/core/ucma.c
parentada3625ee9203002b2cac60be802dae952ae3e22 (diff)
parent3b6aa07b936b09d38c1bfcee1e06845b968df475 (diff)
Merge tag 'v3.18.34' into linux-linaro-lsk-v3.18lsk-v3.18-16.05
This is the 3.18.34 stable release
Diffstat (limited to 'drivers/infiniband/core/ucma.c')
-rw-r--r--drivers/infiniband/core/ucma.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/infiniband/core/ucma.c b/drivers/infiniband/core/ucma.c
index 45d67e9228d7..81dd84d0b68b 100644
--- a/drivers/infiniband/core/ucma.c
+++ b/drivers/infiniband/core/ucma.c
@@ -1487,6 +1487,9 @@ static ssize_t ucma_write(struct file *filp, const char __user *buf,
struct rdma_ucm_cmd_hdr hdr;
ssize_t ret;
+ if (WARN_ON_ONCE(!ib_safe_file_access(filp)))
+ return -EACCES;
+
if (len < sizeof(hdr))
return -EINVAL;