public inbox for netdev@vger.kernel.org 
 help / color / mirror / Atom feed
From: Sowmini Varadhan <sowmini.varadhan@oracle•com>
To: davem@davemloft•net, sowmini.varadhan@oracle•com
Cc: netdev@vger•kernel.org, david.stevens@oracle•com
Subject: [PATCH 3/3 net-next] sunvnet: Add missing rcu_read_unlock() in vnet_start_xmit
Date: Sat, 8 Nov 2014 20:42:20 -0500	[thread overview]
Message-ID: <20141109014220.GE31217@oracle.com> (raw)


The out_dropped label will only do rcu_read_unlock for non-null port.
So add the missing rcu_read_unlock() when bailing due to non-null port.

Signed-off-by: Sowmini Varadhan <sowmini.varadhan@oracle•com>
---
 drivers/net/ethernet/sun/sunvnet.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/sun/sunvnet.c b/drivers/net/ethernet/sun/sunvnet.c
index 826b385..55d66c9 100644
--- a/drivers/net/ethernet/sun/sunvnet.c
+++ b/drivers/net/ethernet/sun/sunvnet.c
@@ -981,8 +981,10 @@ static int vnet_start_xmit(struct sk_buff *skb, struct net_device *dev)
 
 	rcu_read_lock();
 	port = __tx_port_find(vp, skb);
-	if (unlikely(!port))
+	if (unlikely(!port)) {
+		rcu_read_unlock();
 		goto out_dropped;
+	}
 
 	if (skb->len > port->rmtu) {
 		unsigned long localmtu = port->rmtu - ETH_HLEN;
-- 
1.8.4.2

                 reply	other threads:[~2014-11-09  1:42 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20141109014220.GE31217@oracle.com \
    --to=sowmini.varadhan@oracle$(echo .)com \
    --cc=davem@davemloft$(echo .)net \
    --cc=david.stevens@oracle$(echo .)com \
    --cc=netdev@vger$(echo .)kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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