Web lists-archives.org

[Spca50x-devs] Re: [Spca50x-devs][PATCH] spca triggering kernel Bug kernel/softirq.c:266




Ismail Donmez wrote:
> Cumartesi 18 Mart 2006 22:44 tarihinde, michel Xhaard şunları yazmıştı: 
> 
>>Flo,
>>Are you sure a webcam with isochronous pipe can just get a single image ?
>>I only support stable vanilla kernel, so wait for 2.6.16 official.
> 
> 
> 2.6.16 went official today and I had some kernel oops with the latest spca5xx 
> driver too on a Intel Centrino 1.73 Ghz.
> 
> Regards,
> ismail
> 


this patch is the result of my experiments tonight.

disabling the BUG() in kernel/softirq.c works stable with a debug features kernel.
ive no problem with this cause BUG() is no real bughandler, its just a crashing 
placeholder, but such states must be handled in future.

using kill_tasklet() makes it 80% better, but crashes in yield() on certain light.

trying it with my optimized 2.6.16 i get the attached oops on 1/30 lightchanges to 
dark light, 
the problem is wether with spcadecoder or usb dma or the usb chipset, says the trace. 
a pity the release trace shows no sources and i cant trigger it on debug kernel.

so michel pls doublecheck Your IRQ/tasklet code in spca5xx.

so others pls say your usb controllers, theres some rumor about "broken dma" via chipsets 
around the linux-usb and kernel people. but i dont belive in this, for me the 
problem occured on the same hardware first after ~2.6.14 and other oses are fine ;)

WARNING: if this patch burns Your data and machine, then its done right to You, 
if You want to use it more longer than necessary :D -this is only a temporary workaround -

y
tom
--- kernel/softirq.c.	2006-03-22 00:28:17.000000000 +0100
+++ kernel/softirq.c	2006-03-22 06:00:55.000000000 +0100
@@ -262,8 +262,9 @@
 
 		if (tasklet_trylock(t)) {
 			if (!atomic_read(&t->count)) {
-				if (!test_and_clear_bit(TASKLET_STATE_SCHED, &t->state))
-					BUG();
+				test_and_clear_bit(TASKLET_STATE_SCHED, &t->state);
+//				if (!test_and_clear_bit(TASKLET_STATE_SCHED, &t->state))
+//					tasklet_kill(t);
 				t->func(t->data);
 				tasklet_unlock(t);
 				continue;

Attachment: spcadecoder-crash-01.jpg.tar.bz2
Description: application/bzip