diff options
Diffstat (limited to 'kernel/drivers/staging/rdma/hfi1')
-rw-r--r-- | kernel/drivers/staging/rdma/hfi1/TODO | 2 | ||||
-rw-r--r-- | kernel/drivers/staging/rdma/hfi1/file_ops.c | 6 |
2 files changed, 7 insertions, 1 deletions
diff --git a/kernel/drivers/staging/rdma/hfi1/TODO b/kernel/drivers/staging/rdma/hfi1/TODO index 05de0dad8..4c6f1d7d2 100644 --- a/kernel/drivers/staging/rdma/hfi1/TODO +++ b/kernel/drivers/staging/rdma/hfi1/TODO @@ -3,4 +3,4 @@ July, 2015 - Remove unneeded file entries in sysfs - Remove software processing of IB protocol and place in library for use by qib, ipath (if still present), hfi1, and eventually soft-roce - +- Replace incorrect uAPI diff --git a/kernel/drivers/staging/rdma/hfi1/file_ops.c b/kernel/drivers/staging/rdma/hfi1/file_ops.c index aae9826ec..c851e51b1 100644 --- a/kernel/drivers/staging/rdma/hfi1/file_ops.c +++ b/kernel/drivers/staging/rdma/hfi1/file_ops.c @@ -62,6 +62,8 @@ #include <linux/cred.h> #include <linux/uio.h> +#include <rdma/ib.h> + #include "hfi.h" #include "pio.h" #include "device.h" @@ -214,6 +216,10 @@ static ssize_t hfi1_file_write(struct file *fp, const char __user *data, int uctxt_required = 1; int must_be_root = 0; + /* FIXME: This interface cannot continue out of staging */ + if (WARN_ON_ONCE(!ib_safe_file_access(fp))) + return -EACCES; + if (count < sizeof(cmd)) { ret = -EINVAL; goto bail; |