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

From: Shoaib Rao
Date: Tue Aug 10 2021 - 14:30:21 EST



On 8/10/21 11:02 AM, Eric Dumazet wrote:
On Tue, Aug 10, 2021 at 7:50 PM Shoaib Rao <rao.shoaib@xxxxxxxxxx> wrote:

On 8/10/21 2:19 AM, Eric Dumazet wrote:
On 8/9/21 10:31 PM, Shoaib Rao wrote:
On 8/9/21 1:09 PM, Eric Dumazet wrote:
I am guessing that even your test would trigger the warning,
if you make sure to include CONFIG_DEBUG_ATOMIC_SLEEP=y in your kernel build.
Eric,

Thanks for the pointer, have you ever over looked at something when coding?

I _think_ I was trying to help, not shaming you in any way.
How did the previous email help? I did not get any reply when I asked
what could be the cause.
Which previous email ? Are you expecting immediate answers to your emails ?
I am not working for Oracle.

My question about spinlock/mutex was not sarcastic, you authored
6 official linux patches, there is no evidence for linux kernel expertise.
That is no measure of someones understanding. There are other OS's as
well. I have worked on Solaris and other *unix* OS's for over 20+ years.
This was an oversight on my part and I apologize, but instead of
questioning my expertise it would have been helpful to say what might
have caused it.

I sent two emails with _useful_ _information_.

If you felt you were attacked, I suggest you take a deep breath,
and read my emails without trying to change their intention and meaning.

If you think my emails were not useful, just ignore them, this is fine by me.

Hi Eric,

I went back and looked at the two emails. You are correct.

Are you aware of the difference between a mutex and a spinlock ?

When copying data from/to user, you can not hold a spinlock.
The second line is useful but the first one was not necessary.

Shoaib