lkml.org 
[lkml]   [2007]   [Nov]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Date
    From
    Subject[patch 13/16] zd1201: avoid null ptr access of skb->dev


    -stable review patch. If anyone has any objections, please let us know.

    ------------------

    From: John W. Linville <linville@tuxdriver.com>

    patch 3ba72b25211217de195e3f528dd36132b38a205b in mainline.

    skb->dev is not set until eth_type_trans is called...

    Signed-off-by: John W. Linville <linville@tuxdriver.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

    ---
    drivers/net/wireless/zd1201.c | 4 ++--
    1 file changed, 2 insertions(+), 2 deletions(-)

    --- a/drivers/net/wireless/zd1201.c
    +++ b/drivers/net/wireless/zd1201.c
    @@ -327,8 +327,8 @@ static void zd1201_usbrx(struct urb *urb
    memcpy(skb_put(skb, 6), &data[datalen-8], 6);
    memcpy(skb_put(skb, 2), &data[datalen-24], 2);
    memcpy(skb_put(skb, len), data, len);
    - skb->dev->last_rx = jiffies;
    skb->protocol = eth_type_trans(skb, zd->dev);
    + skb->dev->last_rx = jiffies;
    zd->stats.rx_packets++;
    zd->stats.rx_bytes += skb->len;
    netif_rx(skb);
    @@ -384,8 +384,8 @@ static void zd1201_usbrx(struct urb *urb
    memcpy(skb_put(skb, 2), &data[6], 2);
    memcpy(skb_put(skb, len), data+8, len);
    }
    - skb->dev->last_rx = jiffies;
    skb->protocol = eth_type_trans(skb, zd->dev);
    + skb->dev->last_rx = jiffies;
    zd->stats.rx_packets++;
    zd->stats.rx_bytes += skb->len;
    netif_rx(skb);
    --
    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

    \
     
     \ /
      Last update: 2007-11-15 07:51    [W:0.031 / U:0.312 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site