new helper: uaccess_kernel()

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
This commit is contained in:
Al Viro 2017-03-20 21:08:07 -04:00
parent aaa2e7ac80
commit db68ce10c4
32 changed files with 44 additions and 42 deletions

View file

@ -100,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 */