Re: [syzbot] BUG: sleeping function called from invalid context in _copy_to_iter

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

 



On Mon, Aug 09, 2021 at 12:40:03PM -0700, Shoaib Rao wrote:

> Page faults occur all the time, the page may not even be in the cache or the
> mapping is not there (mmap), so I would not consider this a bug. The code
> should complain about all other calls as they are also copying  to user
> pages. I must not be following some semantics for the code to be triggered
> but I can not figure that out. What is the recommended interface to do user
> copy from kernel?

	What are you talking about?  Yes, page faults happen.  No, they
must not be triggered in contexts when you cannot afford going to sleep.
In particular, you can't do that while holding a spinlock.

	There are things that can't be done under a spinlock.  If your
commit is attempting that, it's simply broken.



[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux