I just love macros. Please apply the attached patch
asap to the 2.3.99-pre series and also the backport.
What happens is that the ctrl.length is a 16bit quantity.
Without the cast introduced by this patch, the
variable is treated as a 32bit quantity in the __range_ok
asm, with the high half being garbage. Thus access_ok
failed, making lsusb not work.
Tom
--- fs/proc/root.c 1999/08/28 12:29:08 1.1
+++ fs/proc/root.c 1999/08/28 13:04:19
@@ -381,6 +381,7 @@
struct file * filp = list_entry(p, struct file, f_list);
struct dentry * dentry;
struct inode * inode;
+ int (*release)(struct inode *, struct file *) = NULL;
dentry = filp->f_dentry;
if (!dentry)
@@ -392,7 +393,19 @@
continue;
if (inode->i_ino != ino)
continue;
+ /*
+ * 19990828, [EMAIL PROTECTED]
+ * call the release method for the filp now, as it is
+ * unaccessible afterwards. Careful: if the release
+ * method pointer is non-null, proc_unregister should
+ * be called with the lock_kernel lock being held.
+ * This is the case for USB, where I intend to use this.
+ */
+ if (filp->f_op)
+ release = filp->f_op->release;
filp->f_op = NULL;
+ if (release)
+ release(inode, filp);
}
file_list_unlock();
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]