netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dan Carpenter <error27@gmail.com>
To: kas@fi.muni.cz
Cc: netdev@vger.kernel.org
Subject: [patch] drop chan->wsem on error path
Date: Sun, 29 Nov 2009 18:02:55 +0200	[thread overview]
Message-ID: <20091129160255.GN10640@bicker> (raw)

The other paths all drop chan->wsem.  This was found by a static
checker (smatch).

Signed-off-by: Dan Carpenter <error27@gmail.com>

--- orig/drivers/net/wan/cosa.c	2009-11-29 16:38:42.000000000 +0200
+++ devel/drivers/net/wan/cosa.c	2009-11-29 16:43:39.000000000 +0200
@@ -907,6 +907,7 @@ static ssize_t cosa_write(struct file *f
 			current->state = TASK_RUNNING;
 			chan->tx_status = 1;
 			spin_unlock_irqrestore(&cosa->lock, flags);
+			up(&chan->wsem);
 			return -ERESTARTSYS;
 		}
 	}

             reply	other threads:[~2009-11-29 16:02 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-11-29 16:02 Dan Carpenter [this message]
2009-11-30  7:44 ` [patch] drop chan->wsem on error path Jan Kasprzak
2009-11-30  8:07   ` David Miller

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=20091129160255.GN10640@bicker \
    --to=error27@gmail.com \
    --cc=kas@fi.muni.cz \
    --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).