Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=b8fa2f3a82069304acac1f9e957d491585f4f49a
Commit:     b8fa2f3a82069304acac1f9e957d491585f4f49a
Parent:     161980f4c6b846625efe6227420175cb41477de3
Author:     Michael Chan <[EMAIL PROTECTED]>
AuthorDate: Fri Apr 6 17:35:37 2007 -0700
Committer:  David S. Miller <[EMAIL PROTECTED]>
CommitDate: Fri Apr 6 17:35:37 2007 -0700

    [TG3]: Fix crash during tg3_init_one().
    
    The driver will crash when the chip has been initialized by EFI before
    tg3_init_one().  In this case, the driver will call tg3_chip_reset()
    before allocating consistent memory.
    
    The bug is fixed by checking for tp->hw_status before accessing it
    during tg3_chip_reset().
    
    Signed-off-by: Michael Chan <[EMAIL PROTECTED]>
    Signed-off-by: David S. Miller <[EMAIL PROTECTED]>
---
 drivers/net/tg3.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/net/tg3.c b/drivers/net/tg3.c
index 0acee9f..256969e 100644
--- a/drivers/net/tg3.c
+++ b/drivers/net/tg3.c
@@ -4834,8 +4834,10 @@ static int tg3_chip_reset(struct tg3 *tp)
         * sharing or irqpoll.
         */
        tp->tg3_flags |= TG3_FLAG_CHIP_RESETTING;
-       tp->hw_status->status = 0;
-       tp->hw_status->status_tag = 0;
+       if (tp->hw_status) {
+               tp->hw_status->status = 0;
+               tp->hw_status->status_tag = 0;
+       }
        tp->last_tag = 0;
        smp_mb();
        synchronize_irq(tp->pdev->irq);
-
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  http://vger.kernel.org/majordomo-info.html

Reply via email to