aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--net/packet/af_packet.c3
-rw-r--r--net/packet/internal.h1
2 files changed, 3 insertions, 1 deletions
diff --git a/net/packet/af_packet.c b/net/packet/af_packet.c
index fd5164139bf0..20e8c40da90d 100644
--- a/net/packet/af_packet.c
+++ b/net/packet/af_packet.c
@@ -1634,7 +1634,8 @@ static void fanout_release(struct sock *sk)
1634 } 1634 }
1635 mutex_unlock(&fanout_mutex); 1635 mutex_unlock(&fanout_mutex);
1636 1636
1637 kfree(po->rollover); 1637 if (po->rollover)
1638 kfree_rcu(po->rollover, rcu);
1638} 1639}
1639 1640
1640static const struct proto_ops packet_ops; 1641static const struct proto_ops packet_ops;
diff --git a/net/packet/internal.h b/net/packet/internal.h
index c035d263c1e8..e20b3e8829b8 100644
--- a/net/packet/internal.h
+++ b/net/packet/internal.h
@@ -89,6 +89,7 @@ struct packet_fanout {
89 89
90struct packet_rollover { 90struct packet_rollover {
91 int sock; 91 int sock;
92 struct rcu_head rcu;
92 atomic_long_t num; 93 atomic_long_t num;
93 atomic_long_t num_huge; 94 atomic_long_t num_huge;
94 atomic_long_t num_failed; 95 atomic_long_t num_failed;