summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLinux Build Service Account <lnxbuild@localhost>2018-07-04 07:24:45 -0700
committerGerrit - the friendly Code Review server <code-review@localhost>2018-07-04 07:24:44 -0700
commit38a0bccad56942e30c91af116767717ce1060607 (patch)
tree9dd25c09b6fe3e8ec7d98a7f53ff7c57b8dc3f57
parent39da72f028ba273a41ed7c1856dedf9d06d42ca2 (diff)
parentfa491f9311f0e91fc02a4153ca1da748c3fcf988 (diff)
Merge "Revert "packet: fix race condition in packet_set_ring""
-rw-r--r--net/packet/af_packet.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/net/packet/af_packet.c b/net/packet/af_packet.c
index 7814e5f744e6..3a63f33698d3 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;
}