diff options
| author | Srinivasa Rao Kuppala <srkupp@codeaurora.org> | 2018-06-27 16:59:27 +0530 |
|---|---|---|
| committer | Srinivasa Rao Kuppala <srkupp@codeaurora.org> | 2018-07-02 11:06:55 +0530 |
| commit | fa491f9311f0e91fc02a4153ca1da748c3fcf988 (patch) | |
| tree | 1617e8951e8f1eb46dac78ec958514fdc1bac90b | |
| parent | a0209303bb669a263fa7650a1de9d61d3e1ca7f3 (diff) | |
Revert "packet: fix race condition in packet_set_ring"
Re-adding lock_sock(sk) and release_lock(sk) back in packet_set_ring()
is incorrect and causing deadlock.
This reverts commit e51372325864feeed93cabaf483a5ae689382071.
Change-Id: I1e5aa60d155f2c0803c127dc3e2e9dd81807e6f3
Signed-off-by: Srinivasa Rao Kuppala <srkupp@codeaurora.org>
| -rw-r--r-- | net/packet/af_packet.c | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/net/packet/af_packet.c b/net/packet/af_packet.c index e9a2ff863d9b..392d4e2c0a24 100644 --- a/net/packet/af_packet.c +++ b/net/packet/af_packet.c @@ -4156,7 +4156,6 @@ static int packet_set_ring(struct sock *sk, union tpacket_req_u *req_u, /* Added to avoid minimal code churn */ struct tpacket_req *req = &req_u->req; - lock_sock(sk); /* Opening a Tx-ring is NOT supported in TPACKET_V3 */ if (!closing && tx_ring && (po->tp_version > TPACKET_V2)) { WARN(1, "Tx-ring is not supported.\n"); @@ -4292,7 +4291,6 @@ static int packet_set_ring(struct sock *sk, union tpacket_req_u *req_u, if (pg_vec) free_pg_vec(pg_vec, order, req->tp_block_nr); out: - release_sock(sk); return err; } |
