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]
Message-Id: <200708092115.43548.rjw@sisk.pl>
Date:	Thu, 9 Aug 2007 21:15:42 +0200
From:	"Rafael J. Wysocki" <rjw@...k.pl>
To:	Mariusz Kozlowski <m.kozlowski@...land.pl>
Cc:	Alan Stern <stern@...land.harvard.edu>,
	Andrew Morton <akpm@...ux-foundation.org>, gregkh@...e.de,
	Kernel development list <linux-kernel@...r.kernel.org>,
	USB development list <linux-usb-devel@...ts.sourceforge.net>
Subject: Re: [linux-usb-devel] [usb-storage] schedule_timeout: wrong timeout value c1a95554

On Thursday, 9 August 2007 17:20, Mariusz Kozlowski wrote:
> > > > 	Happens every time I reattach usb pen drive.
> > > > 
> > > > usb 1-2: new high speed USB device using ehci_hcd and address 10
> > > > usb 1-2: configuration #1 chosen from 1 choice
> > > > scsi6 : SCSI emulation for USB Mass Storage devices
> > > > usb 1-2: new device found, idVendor=13fe, idProduct=1a00
> > > > usb 1-2: new device strings: Mfr=1, Product=2, SerialNumber=0
> > > > usb 1-2: Product: GEIL USB DISK   
> > > > usb 1-2: Manufacturer:         
> > > > usb-storage: device found at 10
> > > > usb-storage: waiting for device to settle before scanning
> > > > schedule_timeout: wrong timeout value c1a95554
> > > >  [<c010456a>] show_trace_log_lvl+0x1a/0x30
> > > >  [<c010508d>] show_trace+0x12/0x14
> > > >  [<c01051e0>] dump_stack+0x15/0x17
> > > >  [<c04174d1>] schedule_timeout+0x8c/0xa2
> > > >  [<c032aeec>] usb_stor_scan_thread+0x100/0x160
> > > >  [<c0127f2e>] kthread+0x36/0x58
> > > >  [<c0104233>] kernel_thread_helper+0x7/0x14
> > > >  =======================
> > > > scsi 6:0:0:0: Direct-Access              GEIL USB DISK    >2.0 PQ: 0 ANSI: 0 CCS
> > > > sd 6:0:0:0: [sda] 1007616 512-byte hardware sectors (516 MB)
> > > > sd 6:0:0:0: [sda] Write Protect is off
> > > > sd 6:0:0:0: [sda] Mode Sense: 23 00 00 00
> > > > sd 6:0:0:0: [sda] Assuming drive cache: write through
> > > > sd 6:0:0:0: [sda] 1007616 512-byte hardware sectors (516 MB)
> > > > sd 6:0:0:0: [sda] Write Protect is off
> > > > sd 6:0:0:0: [sda] Mode Sense: 23 00 00 00
> > > > sd 6:0:0:0: [sda] Assuming drive cache: write through
> > > >  sda: sda1
> > > > sd 6:0:0:0: [sda] Attached SCSI removable disk
> > > > sd 6:0:0:0: Attached scsi generic sg0 type 0
> > > > usb-storage: device scan complete
> > > 
> > > This is a known problem.  See
> > > 
> > > 	http://marc.info/?l=linux-kernel&m=118641424414399&w=2
> > > 
> > > Rafael, has this been fixed yet?
> > 
> > No, I wasn't aware of it.
> > 
> > I think that something like the appended patch is necessary.
> > 
> > Mariusz, please see if that helps.
> 
> Yes - this patch fixes the bug.

OK, thanks for the confirmation.

Here it goes again with a changelog etc.

---
From: Rafael J. Wysocki <rjw@...k.pl>

Fix a bug in freezer-introduce-freezer-firendly-waiting-macros.patch which
uses a wrong variable name in wait_event_freezable() and
wait_event_freezable_timeout() (this name is also used in 
wait_event_interruptible() and wait_event_interruptible_timeout() which are
macros and the names clash).

Signed-off-by: Rafael J. Wysocki <rjw@...k.pl>
---
 include/linux/freezer.h |   18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)

Index: linux-2.6.23-rc2/include/linux/freezer.h
===================================================================
--- linux-2.6.23-rc2.orig/include/linux/freezer.h
+++ linux-2.6.23-rc2/include/linux/freezer.h
@@ -134,28 +134,28 @@ static inline void set_freezable(void)
 
 #define wait_event_freezable(wq, condition)				\
 ({									\
-	int __ret;							\
+	int __retval;							\
 	do {								\
-		__ret = wait_event_interruptible(wq, 			\
+		__retval = wait_event_interruptible(wq, 		\
 				(condition) || freezing(current));	\
-		if (__ret && !freezing(current))			\
+		if (__retval && !freezing(current))			\
 			break;						\
 		else if (!(condition))					\
-			__ret = -ERESTARTSYS;				\
+			__retval = -ERESTARTSYS;			\
 	} while (try_to_freeze());					\
-	__ret;								\
+	__retval;							\
 })
 
 
 #define wait_event_freezable_timeout(wq, condition, timeout)		\
 ({									\
-	long __ret = timeout;						\
+	long __retval = timeout;					\
 	do {								\
-		__ret = wait_event_interruptible_timeout(wq,		\
+		__retval = wait_event_interruptible_timeout(wq,		\
 				(condition) || freezing(current),	\
-				__ret); 				\
+				__retval); 				\
 	} while (try_to_freeze());					\
-	__ret;								\
+	__retval;							\
 })
 #else /* !CONFIG_PM_SLEEP */
 static inline int frozen(struct task_struct *p) { return 0; }
-
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