diff options
author | chas williams - CONTRACTOR <chas@cmf.nrl.navy.mil> | 2014-08-12 14:12:26 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-08-14 05:04:46 +0200 |
commit | de713b57947a7a1b9cc605c0296ee14065cd86b6 (patch) | |
tree | d47fa60ae55956e23ff7c1d57c32bdcafd3f65f8 /net/atm/proc.c | |
parent | myri10ge: check for DMA mapping errors (diff) | |
download | linux-de713b57947a7a1b9cc605c0296ee14065cd86b6.tar.xz linux-de713b57947a7a1b9cc605c0296ee14065cd86b6.zip |
atm/svc: Fix blocking in wait loop
One should not call blocking primitives inside a wait loop, since both
require task_struct::state to sleep, so the inner will destroy the
outer state.
sigd_enq() will possibly sleep for alloc_skb(). Move sigd_enq() before
prepare_to_wait() to avoid sleeping while waiting interruptibly. You do
not actually need to call sigd_enq() after the initial prepare_to_wait()
because we test the termination condition before calling schedule().
Based on suggestions from Peter Zijlstra.
Signed-off-by: Chas Williams <chas@cmf.n4rl.navy.mil>
Acked-by: Peter Zijlstra <peterz@infradead.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/atm/proc.c')
0 files changed, 0 insertions, 0 deletions