Re: FYI: v4l-linuxulator support in FreeBSD-current now [panic]

2010-03-26 Thread Alexander Leidinger
Quoting Hans Petter Selasky hsela...@c2i.net (from Thu, 18 Feb 2010  
09:14:20 +0100):



On Tuesday 12 January 2010 18:49:48 Hans Petter Selasky wrote:



I tried to fix something, but it was apparently not enough.


I committed something similar.

Bye,
Alexander.

--
Corrupt, adj.:
In politics, holding an office of trust or profit.

http://www.Leidinger.netAlexander @ Leidinger.net: PGP ID = B0063FE7
http://www.FreeBSD.org   netchild @ FreeBSD.org  : PGP ID = 72077137
___
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org


Re: FYI: v4l-linuxulator support in FreeBSD-current now [panic]

2010-02-18 Thread Hans Petter Selasky
On Tuesday 12 January 2010 18:49:48 Hans Petter Selasky wrote:
 Re: FYI: v4l-linuxulator support in FreeBSD-current now
 

Hi,

Some panics have cropped up when using linux-V4L with webcamd.

1st) panic: freeing memory in linux_v4l_cliplist_free() which is not 
allocated, but there seems to be more which needs to be done.

I tried to fix something, but it was apparently not enough.

Help appreciated.


One question: Do we need to handle the IOCTL's in question at all in the 
linuxulator?


--HPS

--- linux_ioctl.c.orig  2010-02-17 20:42:53.0 +0100
+++ linux_ioctl.c   2010-02-17 21:03:10.0 +0100
@@ -2711,7 +2711,7 @@
/* XXX: If there can be no concurrency: s/M_NOWAIT/M_WAITOK/ */
if ((*ppvc = malloc(sizeof(**ppvc), M_LINUX, M_NOWAIT)) == NULL)
return (ENOMEM);/* XXX: linux has no ENOMEM here */
-   memcpy(vclip, *ppvc, sizeof(vclip));
+   memcpy(*ppvc, vclip, sizeof(vclip));
(*ppvc)-next = NULL;
return (0);
 }
@@ -2719,13 +2719,15 @@
 static int
 linux_v4l_cliplist_free(struct video_window *vw)
 {
-   struct video_clip **ppvc;
-   struct video_clip **ppvc_next;
+   struct video_clip *ppvc;
+   struct video_clip *ppvc_next;
 
-   for (ppvc = (vw-clips); *ppvc != NULL; ppvc = ppvc_next) {
-   ppvc_next = ((*ppvc)-next);
-   free(*ppvc, M_LINUX);
+   for (ppvc = vw-clips; ppvc != NULL; ppvc = ppvc_next) {
+   ppvc_next = ppvc-next;
+   free(ppvc, M_LINUX);
}
+   vw-clips = NULL;
+
return (0);
 }
 
___
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org