Commit:     9f30c768c00fd0f0a2ab37ef29d8c8c5a7abdf2e
Parent:     a1a98b72dbd17e53cd92b8e78f404525ebcfd981
Author:     Jarek Poplawski <[EMAIL PROTECTED]>
AuthorDate: Wed Feb 13 11:17:58 2008 +0000
Committer:  Jeff Garzik <[EMAIL PROTECTED]>
CommitDate: Fri Feb 15 10:51:51 2008 -0500

    mkiss: ax_bump() locking fix
    According to one of OOPSes reported by Jann softirq can break
    while skb is prepared for netif_rx. The report isn't complete,
    so the real reason of the later bug could be different, but
    IMHO this locking break in ax_bump is unsafe and unnecessary.
    Reported-and-tested-by: Jann Traschewski <[EMAIL PROTECTED]>
    Signed-off-by: Jarek Poplawski <[EMAIL PROTECTED]>
    Signed-off-by: Jeff Garzik <[EMAIL PROTECTED]>
 drivers/net/hamradio/mkiss.c |    5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/net/hamradio/mkiss.c b/drivers/net/hamradio/mkiss.c
index cfcd15a..30c9b3b 100644
--- a/drivers/net/hamradio/mkiss.c
+++ b/drivers/net/hamradio/mkiss.c
@@ -289,7 +289,6 @@ static void ax_bump(struct mkiss *ax)
                        *ax->rbuff &= ~0x20;
-       spin_unlock_bh(&ax->buflock);
        count = ax->rcount;
@@ -297,17 +296,17 @@ static void ax_bump(struct mkiss *ax)
                printk(KERN_ERR "mkiss: %s: memory squeeze, dropping packet.\n",
+               spin_unlock_bh(&ax->buflock);
-       spin_lock_bh(&ax->buflock);
        memcpy(skb_put(skb,count), ax->rbuff, count);
-       spin_unlock_bh(&ax->buflock);
        skb->protocol = ax25_type_trans(skb, ax->dev);
        ax->dev->last_rx = jiffies;
        ax->stats.rx_bytes += count;
+       spin_unlock_bh(&ax->buflock);
 static void kiss_unesc(struct mkiss *ax, unsigned char s)
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at

Reply via email to