lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Mon, 13 Mar 2017 15:37:47 -0700 (PDT)
From:   David Miller <davem@...emloft.net>
To:     3chas3@...il.com
Cc:     netdev@...r.kernel.org, romieu@...zoreil.com
Subject: Re: [Patch net-next] atm: remove an unnecessary loop

From: Chas Williams <3chas3@...il.com>
Date: Sat, 11 Mar 2017 19:41:36 -0500

> From: Francois Romieu <romieu@...zoreil.com>
> 
> 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@...gle.com>
> Reviewed-and-Tested-by: Chas Williams <3chas3@...il.com>
> Signed-off-by: Chas Williams <3chas3@...il.com>

Applied, thanks a lot Chas.

Powered by blists - more mailing lists