return value of __copy_from_user_inatomic()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



We're seeing some failing test cases due to sparc64's
__copy_from_user_inatomic returning 1 on an incomplete copy rather than
the number of bytes not copied. This results in
iov_iter_copy_from_user_atomic returning the wrong value to
generic_perform_write().

xfstests generic/246 and LTP writev01 both fail on btrfs and nfs because
of this.

Commit 145e1c00 "sparc64: Fix __copy_{to,from}_user_inatomic defines."
changed the behavior by removing the call to the fixups in
__copy_from_user_inatomic and __copy_to_user_inatomic. I found the
reported problem here: https://lkml.org/lkml/2008/11/1/91 , but I don't
understand why the fixup is the problem. The bzero (memset in the code)
is called against the destination, which is a pagecache page, and the
faulting address is sanity-checked against the boundaries.

reverting commit 145e1c00 fixes those failing test cases, and I wasn't
able to recreate the dbench failure on tmpfs.

Thanks,
Dave
--
To unsubscribe from this list: send the line "unsubscribe sparclinux" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Kernel Development]     [DCCP]     [Linux ARM Development]     [Linux]     [Photo]     [Yosemite Help]     [Linux ARM Kernel]     [Linux SCSI]     [Linux x86_64]     [Linux Hams]

  Powered by Linux