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-prev] [thread-next>] [day] [month] [year] [list]
Date:	Tue, 4 Mar 2008 15:27:04 -0500 (EST)
From:	Alan Stern <stern@...land.harvard.edu>
To:	Christian Kujau <lists@...dbynature.de>
cc:	David Brownell <david-b@...bell.net>,
	LKML <linux-kernel@...r.kernel.org>, <0x0007@...il.com>,
	USB list <linux-usb@...r.kernel.org>
Subject: Re: WARNING: at drivers/usb/host/ehci-hcd.c:287

On Tue, 4 Mar 2008, Christian Kujau wrote:

> I'm not sure, but do you mean:
> 
> --- linux-2.6/drivers/usb/host/ehci-hcd.c	2008-02-24 22:25:54.000000000 +0100
> +++ linux-2.6/drivers/usb/host/ehci-hcd.c.edited	2008-03-04 19:46:13.000000000 +0100
> @@ -284,7 +284,10 @@ static void ehci_iaa_watchdog(unsigned l
>   	u32			status, cmd;
> 
>   	spin_lock_irqsave (&ehci->lock, flags);
> -	WARN_ON(!ehci->reclaim);
> +	if (unlikely(!ehci->reclaim ||
> +			!HC_IS_RUNNING(ehci_to_hcd(ehci)->state) ||
> +			timer_pending(&ehci->iaa_watchdog))
> +	goto done;
> 
>   	status = ehci_readl(ehci, &ehci->regs->status);
>   	cmd = ehci_readl(ehci, &ehci->regs->command);

Almost.  I meant:

Index: usb-2.6/drivers/usb/host/ehci-hcd.c
===================================================================
--- usb-2.6.orig/drivers/usb/host/ehci-hcd.c
+++ usb-2.6/drivers/usb/host/ehci-hcd.c
@@ -260,7 +260,10 @@ static void ehci_iaa_watchdog(unsigned l
 	u32			status, cmd;
 
 	spin_lock_irqsave (&ehci->lock, flags);
-	WARN_ON(!ehci->reclaim);
+	if (unlikely(!ehci->reclaim ||
+			!HC_IS_RUNNING(ehci_to_hcd(ehci)->state) ||
+			timer_pending(&ehci->iaa_watchdog))
+		goto done;
 
 	status = ehci_readl(ehci, &ehci->regs->status);
 	cmd = ehci_readl(ehci, &ehci->regs->command);
@@ -276,7 +279,7 @@ static void ehci_iaa_watchdog(unsigned l
 		ehci_writel(ehci, cmd & ~CMD_IAAD, &ehci->regs->command);
 		end_unlink_async(ehci);
 	}
-
+ done:
 	spin_unlock_irqrestore(&ehci->lock, flags);
 }
 

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ