[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <YRGKWP7/n7+st7Ko@zeniv-ca.linux.org.uk>
Date: Mon, 9 Aug 2021 20:04:40 +0000
From: Al Viro <viro@...iv.linux.org.uk>
To: Shoaib Rao <rao.shoaib@...cle.com>
Cc: Dmitry Vyukov <dvyukov@...gle.com>,
syzbot <syzbot+8760ca6c1ee783ac4abd@...kaller.appspotmail.com>,
andrii@...nel.org, ast@...nel.org, bpf@...r.kernel.org,
christian.brauner@...ntu.com, cong.wang@...edance.com,
daniel@...earbox.net, davem@...emloft.net, edumazet@...gle.com,
jamorris@...ux.microsoft.com, john.fastabend@...il.com,
kafai@...com, kpsingh@...nel.org, kuba@...nel.org,
linux-kernel@...r.kernel.org, linux-kselftest@...r.kernel.org,
netdev@...r.kernel.org, shuah@...nel.org, songliubraving@...com,
syzkaller-bugs@...glegroups.com, yhs@...com
Subject: Re: [syzbot] BUG: sleeping function called from invalid context in
_copy_to_iter
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.
Powered by blists - more mailing lists