On Mon, Dec 23, 2002 at 11:48:50PM +0100, Henning Meier-Geinitz wrote:
> On Mon, Dec 23, 2002 at 11:55:49AM -0800, Greg KH wrote:
> > On Sun, Dec 22, 2002 at 07:49:48PM +0100, Henning Meier-Geinitz wrote:
> > >
> > > Decrease module usage count even if device was disconnected while
> > > open. Check if disconnected before read, write, and ioctl.
> >
> > Hm, how about this simple patch to fix all of the module reference
> > counting problems. Let me know if this works for you.
>
> It fixes the module counting problem, i.e. the module count is 0 after
> disconnect + close even if close_scanner complains "scanner.c:
> close_scanner(0): invalid scn_minor".
Good, that's all I was trying to fix, one thing at a time... :)
I'll go apply this one to my trees.
> However, it doesn't fix the crash with read/write after
> disconnect ("Unable to handle kernel paging request at virtual address
> 5a5a5a5a"). The crash happens everytime when disconnecting the scanner
> during actual scanning.
>
> That's because of "scn = file->private_data;" in scanner_read and
> scanner_write. The structure to which scn points now was kfreed in
> disconnect_scanner...
>
> I haven't found any way to "tell" read/write that the device was
> disconnected without keeping the scn data until close_scanner() is
> called. That's why I didn't include the "owner: THIS_MODULE" in this
> patch.
>
> Any ideas to do that without keeping the scn data around until the
> final close?
No, I think that's acceptable to do, as long as you don't try to do a
USB accesses with it at that point in time :)
thanks,
greg k-h
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel