diff options
Diffstat (limited to 'include/rdma/ib.h')
| -rw-r--r-- | include/rdma/ib.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/include/rdma/ib.h b/include/rdma/ib.h index a6b93706b0fc..66dbed0c146d 100644 --- a/include/rdma/ib.h +++ b/include/rdma/ib.h @@ -35,6 +35,7 @@ #include <linux/types.h> #include <linux/sched.h> +#include <linux/cred.h> struct ib_addr { union { @@ -99,7 +100,7 @@ struct sockaddr_ib { */ static inline bool ib_safe_file_access(struct file *filp) { - return filp->f_cred == current_cred() && segment_eq(get_fs(), USER_DS); + return filp->f_cred == current_cred() && !uaccess_kernel(); } #endif /* _RDMA_IB_H */ |