lkml.org 
[lkml]   [2001]   [Nov]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Date
    From
    Subject[PATCH] Olympic driver bug fix
    It is possible to panic the kernel with the olympic driver by setting the
    mtu to a low value. This bug only surfaced after the fix to stop pkacets
    being dropped by the socket code.

    Simply one liner, patch is against 2.4.13.

    Please apply, thanks

    Mike Phillips
    Linux Token Ring Project
    http://www.linuxtr.net


    --- linux.orig/drivers/net/tokenring/olympic.c.orig Fri Oct 12 08:39:43 2001
    +++ linux-2.4.13/drivers/net/tokenring/olympic.c Fri Oct 12 08:47:20 2001
    @@ -737,7 +737,7 @@
    } else {

    if (buffer_cnt == 1) {
    - skb = dev_alloc_skb(olympic_priv->pkt_buf_sz) ;
    + skb = dev_alloc_skb(max_t(int, olympic_priv->pkt_buf_sz,length)) ;
    } else {
    skb = dev_alloc_skb(length) ;
    }
    @@ -1722,4 +1722,4 @@
    module_init(olympic_pci_init) ;
    module_exit(olympic_pci_cleanup) ;

    -MODULE_LICENSE("GPL");
    \ No newline at end of file
    +MODULE_LICENSE("GPL");
    -
    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: 2005-03-22 13:12    [W:3.039 / U:0.780 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site