Re: [Xenomai-core] [PATCH] posix: Fix error checks when copying user strings

2009-03-18 Thread Gilles Chanteperdrix
Jan Kiszka wrote: > Do not return -EFAULT when the passed string has zero-length. Instead, > return -EINVAL when trying to create objects with empty names. Ok. You can commit this. -- Gilles. ___ Xenoma

[Xenomai-core] [PATCH] Add module param to configure watchdog timeout

2009-03-18 Thread Jan Kiszka
This allows to play with larger watchdog timeouts without requiring the user to recompile the kernel to find out if an overload situation is permanent or transient. Signed-off-by: Jan Kiszka --- ksrc/nucleus/sched.c |8 ++-- 1 files changed, 6 insertions(+), 2 deletions(-) diff --git a

[Xenomai-core] [PATCH] posix: Fix error checks when copying user strings

2009-03-18 Thread Jan Kiszka
Do not return -EFAULT when the passed string has zero-length. Instead, return -EINVAL when trying to create objects with empty names. Signed-off-by: Jan Kiszka --- ksrc/skins/posix/syscall.c | 14 ++ 1 files changed, 10 insertions(+), 4 deletions(-) diff --git a/ksrc/skins/posix/

[Xenomai-core] [PATCH] x86: Fix miscompile of strncopy_from_user

2009-03-18 Thread Jan Kiszka
This merges kernel commit e0a96129db574d6365e3439d16d88517c437ab33 (x86: use early clobbers in usercopy*.c). Without, gcc 4.3 may have let these functions return 0 even if the actual length was > 0. Signed-off-by: Jan Kiszka --- ksrc/arch/x86/usercopy_32.c |2 +- ksrc/arch/x86/usercopy_64.c

[Xenomai-core] Kernel crash in xnheap_test_and_free (native/heap.c)

2009-03-18 Thread Andreas Glatz
Hi, I got a kernel crash because inside xnheap_test_and_free a invalid pointer contained in variable 'nextpage' is dereferenced: free_pages: /* Mark the released pages as free in the extent's page map. */ for (pagecont = 0; pagecont < npages; pagecont++) extent->pagemap[pagenum + pag

Re: [Xenomai-core] Kernel crash in xnheap_test_and_free (native/heap.c)

2009-03-18 Thread Andreas Glatz
The last source code I sent is outdated. The newest version with a sighandler for SIGINT is attached here. Sorry for that, Andreas #include #include #include #include #include #include #include #include #include static RT_TASK m_task; static RT_PIPE m_pipe; static volatile int

Re: [Xenomai-core] Kernel crash in xnheap_test_and_free (native/heap.c)

2009-03-18 Thread Philippe Gerum
Andreas Glatz wrote: > The last source code I sent is outdated. > > The newest version with a sighandler for SIGINT is attached here. > Confirmed, it's perfectly reproducible here as well. Will dig this. Thanks for reporting. > Sorry for that, > > Andreas > > > > >

Re: [Xenomai-core] Kernel crash in xnheap_test_and_free (native/heap.c)

2009-03-18 Thread Philippe Gerum
Andreas Glatz wrote: > Hi, > > I got a kernel crash because inside xnheap_test_and_free a > invalid pointer contained in variable 'nextpage' is dereferenced: > This turned out to be caused by an out-of-bound write triggered by the streaming output service. The patch below fixes the issue; i

Re: [Xenomai-core] Kernel crash in xnheap_test_and_free (native/heap.c)

2009-03-18 Thread Philippe Gerum
Philippe Gerum wrote: > Andreas Glatz wrote: >> Hi, >> >> I got a kernel crash because inside xnheap_test_and_free a >> invalid pointer contained in variable 'nextpage' is dereferenced: >> > > > > This turned out to be caused by an out-of-bound write triggered by the > streaming > output serv