Lines Matching refs:nr_segs
755 unsigned long nr_segs, unsigned long fast_segs, in rw_copy_check_uvector() argument
768 if (nr_segs == 0) { in rw_copy_check_uvector()
777 if (nr_segs > UIO_MAXIOV) { in rw_copy_check_uvector()
781 if (nr_segs > fast_segs) { in rw_copy_check_uvector()
782 iov = kmalloc_array(nr_segs, sizeof(struct iovec), GFP_KERNEL); in rw_copy_check_uvector()
788 if (copy_from_user(iov, uvector, nr_segs*sizeof(*uvector))) { in rw_copy_check_uvector()
803 for (seg = 0; seg < nr_segs; seg++) { in rw_copy_check_uvector()
831 const struct compat_iovec __user *uvector, unsigned long nr_segs, in compat_rw_copy_check_uvector() argument
845 if (nr_segs == 0) in compat_rw_copy_check_uvector()
849 if (nr_segs > UIO_MAXIOV) in compat_rw_copy_check_uvector()
851 if (nr_segs > fast_segs) { in compat_rw_copy_check_uvector()
853 iov = kmalloc_array(nr_segs, sizeof(struct iovec), GFP_KERNEL); in compat_rw_copy_check_uvector()
860 if (!access_ok(VERIFY_READ, uvector, nr_segs*sizeof(*uvector))) in compat_rw_copy_check_uvector()
873 for (seg = 0; seg < nr_segs; seg++) { in compat_rw_copy_check_uvector()