lkml.org 
[lkml]   [2008]   [May]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Date
    From
    Subject[patch 30/37] r8169: fix oops in r8169_get_mac_version
    2.6.25-stable review patch.  If anyone has any objections, please let us
    know.

    ------------------
    From: Ivan Vecera <ivecera@redhat.com>

    commit 21e197f231343201368338603cb0909a13961bac upstream.

    r8169_get_mac_version crashes when it meets an unknown MAC
    due to tp->pci_dev not being set. Initialize it early.

    Signed-off-by: Ivan Vecera <ivecera@redhat.com>
    Acked-by: Francois Romieu <romieu@fr.zoreil.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

    ---
    drivers/net/r8169.c | 2 +-
    1 file changed, 1 insertion(+), 1 deletion(-)

    --- a/drivers/net/r8169.c
    +++ b/drivers/net/r8169.c
    @@ -1617,6 +1617,7 @@ rtl8169_init_one(struct pci_dev *pdev, c
    SET_NETDEV_DEV(dev, &pdev->dev);
    tp = netdev_priv(dev);
    tp->dev = dev;
    + tp->pci_dev = pdev;
    tp->msg_enable = netif_msg_init(debug.msg_enable, R8169_MSG_DEFAULT);

    /* enable device (incl. PCI PM wakeup and hotplug setup) */
    @@ -1777,7 +1778,6 @@ rtl8169_init_one(struct pci_dev *pdev, c
    #endif

    tp->intr_mask = 0xffff;
    - tp->pci_dev = pdev;
    tp->mmio_addr = ioaddr;
    tp->align = cfg->align;
    tp->hw_start = cfg->hw_start;
    --


    \
     
     \ /
      Last update: 2008-05-13 22:27    [W:0.023 / U:31.172 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site