On Saturday 03 May 2008 04:43:27 Andy Walls wrote:
> Hans,
>
> When investigating Mike Krufky's report of module reload problems, I
> ran across problems with the management of the cx18_cards[] array.
> They're corner cases and not likely to be the cause of Mike problems
> though.
>
> Upon error conditions in cx18_probe(), the code at the 'err:' label
> could leak cx18_cards[] entries. Not a big problem since there are
> 32 of them, but they could have caused a NULL pointer de-reference in
> cx18_v4l2_open().
>
> The attached patch fixes these and reworks the management of the
> cx18_cards[] entries. The cx18_active_cards variable is replaced
> with cx18_highest_cards_index (because that's essentially what
> cx18_active_cards_was doing +1), and cleanup of entries happens a
> little more pedantically (obtaining the lock, and removing each entry
> on a pci remove, instead of waiting until module unload).
>
> The attached patch was made against the latest v4l-dvb hg repository.
>
> Comments welcome.
>
> Regards,
> Andy
Hi Andy,
Thanks for looking into this. I've copied the open() fix into the cx18
and ivtv drivers, but not the additional changes: in my opinion they do
not actually add anything useful. The potential NULL pointer
dereference is however an important fix and definitely should go into
2.6.26.
Regards,
Hans
_______________________________________________
ivtv-devel mailing list
[email protected]
http://ivtvdriver.org/mailman/listinfo/ivtv-devel