Message ID | 20190717062956.127446-1-weiyongjun1@huawei.com |
---|---|
State | Accepted |
Delegated to: | David Miller |
Headers | show |
Series | net: dsa: sja1105: Fix missing unlock on error in sk_buff() | expand |
On Wed, 17 Jul 2019 at 09:24, Wei Yongjun <weiyongjun1@huawei.com> wrote: > > Add the missing unlock before return from function sk_buff() > in the error handling case. > > Fixes: f3097be21bf1 ("net: dsa: sja1105: Add a state machine for RX timestamping") > Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com> > --- Reviewed-by: Vladimir Oltean <olteanv@gmail.com> > net/dsa/tag_sja1105.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/net/dsa/tag_sja1105.c b/net/dsa/tag_sja1105.c > index 1d96c9d4a8e9..26363d72d25b 100644 > --- a/net/dsa/tag_sja1105.c > +++ b/net/dsa/tag_sja1105.c > @@ -216,6 +216,7 @@ static struct sk_buff > if (!skb) { > dev_err_ratelimited(dp->ds->dev, > "Failed to copy stampable skb\n"); > + spin_unlock(&sp->data->meta_lock); > return NULL; > } > sja1105_transfer_meta(skb, meta); > > >
On Wed, 17 Jul 2019 06:29:56 +0000, Wei Yongjun <weiyongjun1@huawei.com> wrote: > Add the missing unlock before return from function sk_buff() > in the error handling case. > > Fixes: f3097be21bf1 ("net: dsa: sja1105: Add a state machine for RX timestamping") > Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com> Reviewed-by: Vivien Didelot <vivien.didelot@gmail.com>
On 7/16/19 11:29 PM, Wei Yongjun wrote: > Add the missing unlock before return from function sk_buff() > in the error handling case. > > Fixes: f3097be21bf1 ("net: dsa: sja1105: Add a state machine for RX timestamping") > Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com> Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
From: Wei Yongjun <weiyongjun1@huawei.com> Date: Wed, 17 Jul 2019 06:29:56 +0000 > Add the missing unlock before return from function sk_buff() > in the error handling case. > > Fixes: f3097be21bf1 ("net: dsa: sja1105: Add a state machine for RX timestamping") > Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com> Applied.
diff --git a/net/dsa/tag_sja1105.c b/net/dsa/tag_sja1105.c index 1d96c9d4a8e9..26363d72d25b 100644 --- a/net/dsa/tag_sja1105.c +++ b/net/dsa/tag_sja1105.c @@ -216,6 +216,7 @@ static struct sk_buff if (!skb) { dev_err_ratelimited(dp->ds->dev, "Failed to copy stampable skb\n"); + spin_unlock(&sp->data->meta_lock); return NULL; } sja1105_transfer_meta(skb, meta);
Add the missing unlock before return from function sk_buff() in the error handling case. Fixes: f3097be21bf1 ("net: dsa: sja1105: Add a state machine for RX timestamping") Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com> --- net/dsa/tag_sja1105.c | 1 + 1 file changed, 1 insertion(+)