Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1556530
| From | Chas Williams <3chas3@gmail.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: net/atm: warning in alloc_tx/__might_sleep |
| Date | 2017-01-11 15:40 +0100 |
| Message-ID | <sYsed-82P-15@gated-at.bofh.it> (permalink) |
| References | <sXLVD-74k-9@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Mon, 2017-01-09 at 18:20 +0100, Andrey Konovalov wrote:
> Hi!
>
> I've got the following error report while running the syzkaller fuzzer.
>
> On commit a121103c922847ba5010819a3f250f1f7fc84ab8 (4.10-rc3).
>
> A reproducer is attached.
>
> ------------[ cut here ]------------
> WARNING: CPU: 0 PID: 4114 at kernel/sched/core.c:7737 __might_sleep+0x149/0x1a0
> do not call blocking ops when !TASK_RUNNING; state=1 set at
> [<ffffffff813fcb22>] prepare_to_wait+0x182/0x530
> Modules linked in:
> CPU: 0 PID: 4114 Comm: a.out Not tainted 4.10.0-rc3+ #59
> Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS Bochs 01/01/2011
> Call Trace:
> __dump_stack lib/dump_stack.c:15
> dump_stack+0x292/0x398 lib/dump_stack.c:51
> __warn+0x19f/0x1e0 kernel/panic.c:547
> warn_slowpath_fmt+0xc5/0x110 kernel/panic.c:562
> __might_sleep+0x149/0x1a0 kernel/sched/core.c:7732
> slab_pre_alloc_hook mm/slab.h:408
> slab_alloc_node mm/slub.c:2634
> kmem_cache_alloc_node+0x14a/0x280 mm/slub.c:2744
> __alloc_skb+0x10f/0x800 net/core/skbuff.c:219
> alloc_skb ./include/linux/skbuff.h:926
> alloc_tx net/atm/common.c:75
This is likely alloc_skb(..., GFP_KERNEL) in alloc_tx(). The simplest
fix for this would be simply to switch this GFP_ATOMIC. See if this is
any better.
diff --git a/net/atm/common.c b/net/atm/common.c
index a3ca922..d84220c 100644
--- a/net/atm/common.c
+++ b/net/atm/common.c
@@ -72,7 +72,7 @@ static struct sk_buff *alloc_tx(struct atm_vcc *vcc, unsigned int size)
sk_wmem_alloc_get(sk), size, sk->sk_sndbuf);
return NULL;
}
- while (!(skb = alloc_skb(size, GFP_KERNEL)))
+ while (!(skb = alloc_skb(size, GFP_ATOMIC)))
schedule();
pr_debug("%d += %d\n", sk_wmem_alloc_get(sk), skb->truesize);
atomic_add(skb->truesize, &sk->sk_wmem_alloc);
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
net/atm: warning in alloc_tx/__might_sleep Andrey Konovalov <andreyknvl@google.com> - 2017-01-09 18:30 +0100
Re: net/atm: warning in alloc_tx/__might_sleep Cong Wang <xiyou.wangcong@gmail.com> - 2017-01-10 18:40 +0100
Re: net/atm: warning in alloc_tx/__might_sleep Eric Dumazet <edumazet@google.com> - 2017-01-10 18:50 +0100
Re: net/atm: warning in alloc_tx/__might_sleep Cong Wang <xiyou.wangcong@gmail.com> - 2017-01-10 19:00 +0100
Re: net/atm: warning in alloc_tx/__might_sleep Francois Romieu <romieu@fr.zoreil.com> - 2017-01-10 23:50 +0100
Re: net/atm: warning in alloc_tx/__might_sleep Eric Dumazet <eric.dumazet@gmail.com> - 2017-01-11 20:20 +0100
Re: net/atm: warning in alloc_tx/__might_sleep Andrey Konovalov <andreyknvl@google.com> - 2017-01-11 11:20 +0100
Re: net/atm: warning in alloc_tx/__might_sleep Chas Williams <3chas3@gmail.com> - 2017-01-11 15:40 +0100
Re: net/atm: warning in alloc_tx/__might_sleep Michal Hocko <mhocko@kernel.org> - 2017-01-11 20:50 +0100
Re: net/atm: warning in alloc_tx/__might_sleep Cong Wang <xiyou.wangcong@gmail.com> - 2017-01-12 05:40 +0100
Re: net/atm: warning in alloc_tx/__might_sleep Chas Williams <3chas3@gmail.com> - 2017-01-12 11:50 +0100
Re: net/atm: warning in alloc_tx/__might_sleep Michal Hocko <mhocko@kernel.org> - 2017-01-11 20:50 +0100
csiph-web