lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-id: <48C07564.3060306@Sun.COM>
Date:	Thu, 04 Sep 2008 16:55:16 -0700
From:	Santwona.Behera@....COM
To:	netdev@...r.kernel.org, davem@...emloft.net
Cc:	Matheos Worku <Matheos.Worku@....COM>, agospoda@...hat.com,
	Santwona Behera <Santwona.Behera@....COM>
Subject: [PATCH 1/1] niu: panic on reset

The reset_task function in the niu driver does not reset the hardware 
fully. The buffer addresses and pointers are not being reset/updated in 
the hardware and that leads to panic on reset.

Signed-off-by: santwona.behera@....com <santwona.behera@....com>
---
 drivers/net/niu.c |   16 ++++++++++++++++
 1 files changed, 16 insertions(+), 0 deletions(-)

diff --git a/drivers/net/niu.c b/drivers/net/niu.c
index e4765b7..422d7e5 100644
--- a/drivers/net/niu.c
+++ b/drivers/net/niu.c
@@ -6006,11 +6006,27 @@ static void niu_reset_task(struct work_struct *work)

        niu_stop_hw(np);

+       spin_unlock_irqrestore(&np->lock, flags);
+
+       niu_free_channels(np);
+
+       err = niu_alloc_channels(np);
+       if (err) {
+               dev_err(np->device, PFX "%s:Failed to alloc niu channels\n",
+                       np->dev->name);
+               return;
+       }
+
+       spin_lock_irqsave(&np->lock, flags);
+
        err = niu_init_hw(np);
        if (!err) {
                np->timer.expires = jiffies + HZ;
                add_timer(&np->timer);
                niu_netif_start(np);
+       } else {
+               dev_err(np->device, PFX "%s:Failed to init hw\n",
+                       np->dev->name);
        }

        spin_unlock_irqrestore(&np->lock, flags);
--
1.5.2
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ