From: Salil Kapur <salilkapur93@gmail.com>
To: davem@davemloft.net
Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
salilkapur93@gmail.com
Subject: [PATCH] Networking: Core: netpoll: Fixed a missing spin_unlock
Date: Sat, 30 Jul 2016 06:23:47 +0530 [thread overview]
Message-ID: <1469840027-17057-1-git-send-email-salilkapur93@gmail.com> (raw)
In the case when the loop breaks at line 390, the txq lock is not
released. Added an unlock statement before the break statement.
Signed-off-by: Salil Kapur <salilkapur93@gmail.com>
---
net/core/netpoll.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/net/core/netpoll.c b/net/core/netpoll.c
index fc75c9e..9124f76 100644
--- a/net/core/netpoll.c
+++ b/net/core/netpoll.c
@@ -386,8 +386,10 @@ void netpoll_send_skb_on_dev(struct netpoll *np, struct sk_buff *skb,
!vlan_hw_offload_capable(netif_skb_features(skb),
skb->vlan_proto)) {
skb = __vlan_put_tag(skb, skb->vlan_proto, vlan_tx_tag_get(skb));
- if (unlikely(!skb))
+ if (unlikely(!skb)) {
+ __netif_tx_unlock(txq);
break;
+ }
skb->vlan_tci = 0;
}
--
1.9.1
next reply other threads:[~2016-07-30 0:55 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-07-30 0:53 Salil Kapur [this message]
2016-07-30 21:58 ` [PATCH] Networking: Core: netpoll: Fixed a missing spin_unlock Francois Romieu
[not found] ` <CAJksCdT5DkbrQ_OAigJim_qT3WXo6sPv07KrBcAtTsHFLMzO4w@mail.gmail.com>
2016-07-31 22:09 ` Francois Romieu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1469840027-17057-1-git-send-email-salilkapur93@gmail.com \
--to=salilkapur93@gmail.com \
--cc=davem@davemloft.net \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).