Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1763408AbXHOOjO (ORCPT ); Wed, 15 Aug 2007 10:39:14 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1758349AbXHOOi6 (ORCPT ); Wed, 15 Aug 2007 10:38:58 -0400 Received: from iolanthe.rowland.org ([192.131.102.54]:33025 "HELO iolanthe.rowland.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1758264AbXHOOi5 (ORCPT ); Wed, 15 Aug 2007 10:38:57 -0400 Date: Wed, 15 Aug 2007 10:38:54 -0400 (EDT) From: Alan Stern X-X-Sender: stern@iolanthe.rowland.org To: Florin Iucha cc: Tejun Heo , USB development list , Linux Kernel Mailing List , Greg KH , Michal Piotrowski Subject: Re: [linux-usb-devel] USB-related oops in sysfs with linux v2.6.23-rc3-50-g28e8351 In-Reply-To: <20070815133147.GA7124@iucha.net> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2930 Lines: 66 On Wed, 15 Aug 2007, Florin Iucha wrote: > Today my USB keyboard stopped working in the middle of composing and > e-mail. I unplugged it and plugged it back, with no success. I > logged in remotely and found this lovely message: > > [ 1301.567351] usb 1-4: USB disconnect, address 3 > [ 1301.567356] usb 1-4.2: USB disconnect, address 5 > [ 1301.567599] sysfs_remove_bin_file: bad dentry or inode or no such file: "descriptors" > [ 1301.567604] > [ 1301.567605] Call Trace: > [ 1301.567614] [] sysfs_remove_bin_file+0x39/0x3d > [ 1301.567619] [] device_remove_bin_file+0x15/0x17 > [ 1301.567623] [] usb_remove_sysfs_dev_files+0x89/0x9d > [ 1301.567627] [] generic_disconnect+0x2e/0x32 > [ 1301.567630] [] usb_unbind_device+0x15/0x19 > [ 1301.567634] [] __device_release_driver+0x93/0xb3 > [ 1301.567637] [] device_release_driver+0x31/0x49 > [ 1301.567640] [] bus_remove_device+0x76/0x87 > [ 1301.567644] [] device_del+0x216/0x297 > [ 1301.567648] [] usb_disconnect+0xc8/0x151 > [ 1301.567651] [] usb_disconnect+0x8f/0x151 > [ 1301.567655] [] hub_thread+0x442/0xc47 > [ 1301.567659] [] _spin_unlock_irq+0x9/0xc > [ 1301.567664] [] autoremove_wake_function+0x0/0x38 > [ 1301.567668] [] hub_thread+0x0/0xc47 > [ 1301.567671] [] kthread+0x49/0x76 > [ 1301.567674] [] child_rip+0xa/0x12 > [ 1301.567679] [] kthread+0x0/0x76 > [ 1301.567682] [] child_rip+0x0/0x12 I think we can simply remove the error message. There's no obvious reason why sysfs_remove_bin_file() should complain about attempts to remove a nonexistent file; sysfs_remove_file() doesn't. This patch will get rid of the annoying error messages. It won't do anything about your keyboard's tendency to spontaneously stop working, alas. Alan Stern Index: usb-2.6/fs/sysfs/bin.c =================================================================== --- usb-2.6.orig/fs/sysfs/bin.c +++ usb-2.6/fs/sysfs/bin.c @@ -248,12 +248,7 @@ int sysfs_create_bin_file(struct kobject void sysfs_remove_bin_file(struct kobject * kobj, struct bin_attribute * attr) { - if (sysfs_hash_and_remove(kobj->sd, attr->attr.name) < 0) { - printk(KERN_ERR "%s: " - "bad dentry or inode or no such file: \"%s\"\n", - __FUNCTION__, attr->attr.name); - dump_stack(); - } + sysfs_hash_and_remove(kobj->sd, attr->attr.name); } EXPORT_SYMBOL_GPL(sysfs_create_bin_file); - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/