On Wed, Aug 30, 2017 at 01:27:32PM -0700, Jerry Zhang wrote:
> Hi,
> 
> I'm running into a kernel crash while using the functionfs driver on
> 4.9 and 4.12 kernels. This is reproducible by using any of the aio
> syscalls with functionfs on the above kernels. The code in question is
> in ffs_user_copy_worker, which is a work thread that copies a bit of
> data into userspace. Interestingly, a set_fs(USER_DS) before
> copy_to_iter in the work thread will prevent the crash. I'm told
> though that this shouldn't be necessary if the thread does not set_fs
> to KERNEL_DS, which it does not (nor does the rest of the driver, at
> all). There is also no problem on 4.4.
> 
> Perhaps this is related to some of the mm changes in arch/arm64 that
> went in between 4.4 and 4.9? Alternatively, it could actually be
> necessary to set_fs(USER_DS) in a work thread before accessing user
> memory? Let us know.

4.4-4.9 is a long time, with a lot of changes :)

Any chance you can run git bisect to find the issue?

thanks,

greg k-h
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to