diff options
Diffstat (limited to 'net/core/skbuff.c')
-rw-r--r-- | net/core/skbuff.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/net/core/skbuff.c b/net/core/skbuff.c index 5c459f2b7985..1e556d312117 100644 --- a/net/core/skbuff.c +++ b/net/core/skbuff.c | |||
@@ -1445,6 +1445,7 @@ done: | |||
1445 | 1445 | ||
1446 | if (spd.nr_pages) { | 1446 | if (spd.nr_pages) { |
1447 | int ret; | 1447 | int ret; |
1448 | struct sock *sk = __skb->sk; | ||
1448 | 1449 | ||
1449 | /* | 1450 | /* |
1450 | * Drop the socket lock, otherwise we have reverse | 1451 | * Drop the socket lock, otherwise we have reverse |
@@ -1455,9 +1456,9 @@ done: | |||
1455 | * we call into ->sendpage() with the i_mutex lock held | 1456 | * we call into ->sendpage() with the i_mutex lock held |
1456 | * and networking will grab the socket lock. | 1457 | * and networking will grab the socket lock. |
1457 | */ | 1458 | */ |
1458 | release_sock(__skb->sk); | 1459 | release_sock(sk); |
1459 | ret = splice_to_pipe(pipe, &spd); | 1460 | ret = splice_to_pipe(pipe, &spd); |
1460 | lock_sock(__skb->sk); | 1461 | lock_sock(sk); |
1461 | return ret; | 1462 | return ret; |
1462 | } | 1463 | } |
1463 | 1464 | ||