remarkable-linux/net/atm
Francois Romieu c55fa3cccb atm: remove an unnecessary loop
Andrey reported this kernel warning:

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

The deeply nested alloc_skb is a problem.

Diagnosis: nesting is wrong. It makes zero sense. Fix it and the
implicit task state change problem automagically goes away.

alloc_skb() does not need to be in the "while" loop.

alloc_skb() does not need to be in the {prepare_to_wait/add_wait_queue ...
finish_wait/remove_wait_queue} block.

I claim that:
- alloc_tx() should only perform the "wait_for_decent_tx_drain" part
- alloc_skb() ought to be done directly in vcc_sendmsg
- alloc_skb() failure can be handled gracefully in vcc_sendmsg
- alloc_skb() may use a (m->msg_flags & MSG_DONTWAIT) dependent
  GFP_{KERNEL / ATOMIC} flag

Reported-by: Andrey Konovalov <andreyknvl@google.com>
Reviewed-and-Tested-by: Chas Williams <3chas3@gmail.com>
Signed-off-by: Chas Williams <3chas3@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2017-03-13 15:37:29 -07:00
..
addr.c
addr.h
atm_misc.c
atm_sysfs.c
br2684.c net: remove MTU limits on a few ether_setup callers 2016-10-21 13:57:50 -04:00
clip.c net: add dev arg to ndo_neigh_construct/destroy 2016-07-05 09:06:28 -07:00
common.c atm: remove an unnecessary loop 2017-03-13 15:37:29 -07:00
common.h
ioctl.c
Kconfig
lec.c net: atm: Fix warnings in net/atm/lec.c when !CONFIG_PROC_FS 2016-12-28 15:11:32 -05:00
lec.h
lec_arpc.h
Makefile
mpc.c lib/vsprintf.c: remove %Z support 2017-02-27 18:43:47 -08:00
mpc.h net: atm: constify in_cache_ops and eg_cache_ops structures 2015-11-23 15:49:29 -05:00
mpoa_caches.c ATM: use designated initializers 2016-12-17 11:56:57 -05:00
mpoa_caches.h
mpoa_proc.c
pppoatm.c
proc.c
protocols.h
pvc.c
raw.c
resources.c
resources.h
signaling.c net/atm: sk_err_soft must be positive 2016-05-23 13:51:10 -07:00
signaling.h
svc.c sched/headers: Prepare to move signal wakeup & sigpending methods from <linux/sched.h> into <linux/sched/signal.h> 2017-03-02 08:42:32 +01:00