drop chan->wsem on error path
Subsystems (2)
PATCH 1/1 drop chan->wsem on error path
The other paths all drop chan->wsem. This was found by a static checker (smatch).
drivers/net/wan/cosa.c +1 -0
@@ -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 ; } }
Dan Carpenter wrote:
: The other paths all drop chan->wsem. This was found by a static : checker (smatch).
You are right, thanks!
:
: Signed-off-by: Dan Carpenter <[email protected]>
: --- 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; : } : }
Signature · 5 lines
| Jan "Yenya" Kasprzak <kas at {fi.muni.cz - work | yenya.net - private}> |
| GPG: ID 1024/D3498839 Fingerprint 0D99A7FB206605D7 8B35FCDE05B18A5E |
| http://www.fi.muni.cz/~kas/ Journal: http://www.fi.muni.cz/~kas/blog/ |
Please don't top post and in particular don't attach entire digests to your
mail or we'll all soon be using bittorrent to read the list. --Alan CoxDavid Miller
maintainerFrom: Jan Kasprzak <[email protected]>
Date: Mon, 30 Nov 2009 08:44:18 +0100
Quoted 10 lines
Dan Carpenter wrote:
: The other paths all dropchan->wsem. This was found by a static : checker (smatch).You are right, thanks!
:
: Signed-off-by: Dan Carpenter <[email protected]>
Patch applied, thanks everyone.