Message ID | 20100526151648.GA15439@bicker |
---|---|
State | Accepted, archived |
Delegated to: | David Miller |
Headers | show |
Hi Dan. Dan Carpenter <error27@gmail.com> wrote: > There was an spin_unlock missing on the error path. The spin_lock was > tucked in with the declarations so it was hard to spot. I added a new > line. > > Signed-off-by: Dan Carpenter <error27@gmail.com> Acked-by: Sjur Braendeland Well spotted! Thanks for reviewing and fixing this. Regards Sjur -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
From: Sjur Brændeland <sjurbren@gmail.com> Date: Wed, 26 May 2010 20:18:36 +0200 > Hi Dan. > > Dan Carpenter <error27@gmail.com> wrote: >> There was an spin_unlock missing on the error path. The spin_lock was >> tucked in with the declarations so it was hard to spot. I added a new >> line. >> >> Signed-off-by: Dan Carpenter <error27@gmail.com> > Acked-by: Sjur Braendeland Applied. Sjur, in the future please provide your full email address in Acked-by: lines just as you would for a Signed-off-by: tag. I fixed it up this time. Thanks. -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/net/caif/cfserl.c b/net/caif/cfserl.c index cb4325a..965c5ba 100644 --- a/net/caif/cfserl.c +++ b/net/caif/cfserl.c @@ -59,16 +59,18 @@ static int cfserl_receive(struct cflayer *l, struct cfpkt *newpkt) u8 stx = CFSERL_STX; int ret; u16 expectlen = 0; + caif_assert(newpkt != NULL); spin_lock(&layr->sync); if (layr->incomplete_frm != NULL) { - layr->incomplete_frm = cfpkt_append(layr->incomplete_frm, newpkt, expectlen); pkt = layr->incomplete_frm; - if (pkt == NULL) + if (pkt == NULL) { + spin_unlock(&layr->sync); return -ENOMEM; + } } else { pkt = newpkt; }
There was an spin_unlock missing on the error path. The spin_lock was tucked in with the declarations so it was hard to spot. I added a new line. Signed-off-by: Dan Carpenter <error27@gmail.com> -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html