Thanks a lot,
I added this patch and I introduced one line in videodev.c:
static int video_release(struct inode *inode, struct file *file)
{
struct video_device *vfl;
struct module *owner;
vfl = video_devdata(file);
if (!vfl) return -EINVAL;
(last line)
Now I do not get a kernel oops anymore. Nevertheless I do not get a clean
disconnect.
After I reconnect, I can not get the webcam anymore, it is marked busy?!
If I disconnect without having the device open I get the following in my
syslog:
Jun 25 20:34:36 linux kernel: hub.c: port 1, portstatus 100, change 0, 12
Mb/s
Jun 25 20:34:36 linux kernel: hub.c: port 2, portstatus 100, change 3, 12
Mb/s
Jun 25 20:34:36 linux kernel: hub.c: port 2 connection change
Jun 25 20:34:36 linux kernel: hub.c: port 2, portstatus 100, change 3, 12
Mb/s
Jun 25 20:34:36 linux kernel: usb.c: USB disconnect on device 00:13.0-2
address 3
Jun 25 20:34:36 linux kernel: usb.c: kusbd: /sbin/hotplug remove 3
Jun 25 20:34:36 linux kernel: usb.c: kusbd policy returned 0xfffffffe
Jun 25 20:34:36 linux kernel: usb.c: kusbd: /sbin/hotplug remove 3
Jun 25 20:34:36 linux kernel: usb.c: kusbd policy returned 0xfffffffe
Jun 25 20:34:36 linux kernel: usb.c: kusbd: /sbin/hotplug remove 3
Jun 25 20:34:36 linux kernel: usb.c: kusbd policy returned 0xfffffffe
Jun 25 20:34:37 linux kernel: hub.c: port 1, portstatus 100, change 0, 12
Mb/s
Jun 25 20:34:37 linux kernel: hub.c: port 2, portstatus 100, change 2, 12
Mb/s
Jun 25 20:34:37 linux kernel: hub.c: port 2 enable change, status 100
and lsmod shows
Module Size Used by
pwc 41952 0
videodev 4032 0 [pwc]
usb-ohci 20304 0 (unused)
usbcore 62848 1 [pwc usb-ohci]
ipv6 137008 -1 (autoclean)
with running I only get
Jun 25 20:35:32 linux kernel: hub.c: port 1, portstatus 100, change 0, 12
Mb/s
Jun 25 20:35:32 linux kernel: hub.c: port 2, portstatus 100, change 3, 12
Mb/s
Jun 25 20:35:32 linux kernel: hub.c: port 2 connection change
Jun 25 20:35:32 linux kernel: hub.c: port 2, portstatus 100, change 3, 12
Mb/s
Jun 25 20:35:32 linux kernel: usb.c: USB disconnect on device 00:13.0-2
address 4
Jun 25 20:35:46 linux kernel: pwc Disconnected while device/video is open!
with lsmod showing
Module Size Used by
pwc 41952 1
videodev 4032 0 [pwc]
usb-ohci 20304 0 (unused)
usbcore 62848 1 [pwc usb-ohci]
ipv6 137008 -1 (autoclean)
Probably my "fix" in video_release was not OK.
Detlef
----- Original Message -----
From: "Oliver Neukum" <[EMAIL PROTECTED]>
To: "Detlef Schmicker (Siebertz Electronic GmbH)"
<[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Wednesday, June 25, 2003 1:39 PM
Subject: Re: [linux-usb-devel] kernel NULL pointer at unpluging pwc webcam
> Am Mittwoch, 25. Juni 2003 12:40 schrieb Detlef Schmicker (Siebertz
Electronic GmbH):
> > Thanks,
> >
> > it changed the behaviour:
>
> Shit,
>
> somebody has broken videodev.c thoroughly.
> Here's a further patch to be applied in addition to
> thze first one.
>
> HTH
> Oliver
>
> You can import this changeset into BK by piping this whole message to:
> '| bk receive [path to repository]' or apply the patch as usual.
>
> ===================================================================
>
>
> [EMAIL PROTECTED], 2003-06-25 13:36:39+02:00, [EMAIL PROTECTED]
> - disconnect checks
>
>
> videodev.c | 6 +++---
> 1 files changed, 3 insertions(+), 3 deletions(-)
>
>
> diff -Nru a/drivers/media/video/videodev.c
b/drivers/media/video/videodev.c
> --- a/drivers/media/video/videodev.c Wed Jun 25 13:37:26 2003
> +++ b/drivers/media/video/videodev.c Wed Jun 25 13:37:26 2003
> @@ -71,7 +71,7 @@
> char *buf, size_t count, loff_t *ppos)
> {
> struct video_device *vfl = video_devdata(file);
> - if(vfl->read)
> + if(vfl && vfl->read)
> return vfl->read(vfl, buf, count, file->f_flags&O_NONBLOCK);
> else
> return -EINVAL;
> @@ -87,7 +87,7 @@
> size_t count, loff_t *ppos)
> {
> struct video_device *vfl = video_devdata(file);
> - if(vfl->write)
> + if(vfl && vfl->write)
> return vfl->write(vfl, buf, count, file->f_flags&O_NONBLOCK);
> else
> return 0;
> @@ -106,7 +106,7 @@
> static unsigned int video_poll(struct file *file, poll_table * wait)
> {
> struct video_device *vfl = video_devdata(file);
> - if(vfl->poll)
> + if(vfl && vfl->poll)
> return vfl->poll(vfl, file, wait);
> else
> return 0;
>
> ===================================================================
>
>
> This BitKeeper patch contains the following changesets:
> 1.1104
> ## Wrapped with gzip_uu ##
>
>
>
----------------------------------------------------------------------------
----
>
>
>
> -------------------------------------------------------
> This SF.Net email is sponsored by: INetU
> Attention Web Developers & Consultants: Become An INetU Hosting Partner.
> Refer Dedicated Servers. We Manage Them. You Get 10% Monthly Commission!
> INetU Dedicated Managed Hosting http://www.inetu.net/partner/index.php
> _______________________________________________
> [EMAIL PROTECTED]
> To unsubscribe, use the last form field at:
> https://lists.sourceforge.net/lists/listinfo/linux-usb-devel
>
-------------------------------------------------------
This SF.Net email is sponsored by: INetU
Attention Web Developers & Consultants: Become An INetU Hosting Partner.
Refer Dedicated Servers. We Manage Them. You Get 10% Monthly Commission!
INetU Dedicated Managed Hosting http://www.inetu.net/partner/index.php
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel