Re: [PULL] http://udev.netup.ru/hg/v4l-dvb-aospan

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, 2009-06-28 at 15:25 +0400, Abylai Ospan wrote:
> Mauro,
> 
> Please pulll changes:
> 
> http://udev.netup.ru/cgi-bin/hgwebdir.cgi/v4l-dvb-aospan/rev/8b0c92aec325 
> 
> vmalloc to kmalloc changed.

Since MAX_PID is only 8 kB and kmalloc can handle up to 128 kB, that
seems OK.


>  vmalloc don't work (kernel oops hapens) when dvb_dmx_swfilter_packets
> called from IRQ handler ( for example in budget-core ).

No one should call dvb_dmx_swfilter_packets() from an IRQ handler.  That
function does too much work to finish in a short amount of time.  I see
budget-core.c:vpeirq(), actually gets called from a tasklet (softirq
context) though.

Here's a LKML thread where Andrew Morton says it's unsafe to call
__vmalloc() from IRQ contexts:

http://lkml.org/lkml/2008/11/17/23

Since tasklets run in an interrupt context, with many (all?) of the
limitations of a IRQ handler, I suspect Andrew's comments may apply to
tasklets as well.


What really needs to be fixed is 

   linux/drivers/media/dvb/ttpci/budget-core.c:vpeirq()

should not call 

   dvb_dmx_swfilter_packets()

from a tasklet context, but instead from a work handler handler context.
That means converting from a tasklet to a work handler.

A change to the dvb-core to use kmalloc() is just avoiding the work of
coverting from tasklets to workqueues.  It looks like the move to
replace tasklets with workqueues is at least 2 years old:

http://lwn.net/Articles/239633/

BTW, it looks like av7110.c has a similar problem using a tasklet to
call dvb_dmx_swfilter_packets().


Regards,
Andy

--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux