Skip to content
Commit 1a35ca80 authored by Eric Dumazet's avatar Eric Dumazet Committed by David S. Miller
Browse files

packet: dont call sleeping functions while holding rcu_read_lock()

commit 654d1f8a

 (packet: less dev_put() calls)
introduced a problem, calling potentially sleeping functions from a
rcu_read_lock() protected section.

Fix this by releasing lock before the sock_wmalloc()/memcpy_fromiovec() calls.

After skb allocation and copy from user space, we redo device
lookup and appropriate tests.

Reported-and-tested-by: default avatarFrederic Weisbecker <fweisbec@gmail.com>
Signed-off-by: default avatarEric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 81e839ef
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment