Looks correct to me. Signed-off-by: Bart De Schuymer <bdschuym@xxxxxxxxxx> Changli Gao schreef: > nf_bridge_alloc() always reset the skb->nf_bridge, so we should always > put the old one. > > Signed-off-by: Changli Gao <xiaosuo@xxxxxxxxx> > --- > v2: Should init tmp->use again because memcpy() overwrite it. > 1 file changed, 1 insertion(+), 1 deletion(-) > diff --git a/net/bridge/br_netfilter.c b/net/bridge/br_netfilter.c > index 2c911c0..5ed00bd 100644 > --- a/net/bridge/br_netfilter.c > +++ b/net/bridge/br_netfilter.c > @@ -162,8 +162,8 @@ static inline struct nf_bridge_info *nf_bridge_unshare(struct sk_buff *skb) > if (tmp) { > memcpy(tmp, nf_bridge, sizeof(struct nf_bridge_info)); > atomic_set(&tmp->use, 1); > - nf_bridge_put(nf_bridge); > } > + nf_bridge_put(nf_bridge); > nf_bridge = tmp; > } > return nf_bridge; > _______________________________________________ > Bridge mailing list > Bridge@xxxxxxxxxxxxxxxxxxxxxxxxxx > https://lists.linux-foundation.org/mailman/listinfo/bridge > > -- Bart De Schuymer www.artinalgorithms.be _______________________________________________ Bridge mailing list Bridge@xxxxxxxxxxxxxxxxxxxxxxxxxx https://lists.linux-foundation.org/mailman/listinfo/bridge