Re: gspca_zc3xx oops - 2.6.27-rc1

From: Parag Warudkar
Date: Sun Aug 03 2008 - 03:52:36 EST


On Sun, Aug 3, 2008 at 3:37 AM, Rabin Vincent <rabin@xxxxxx> wrote:

> 2b: 0f b6 37 movzbl (%edi),%esi <---- offender
> 2e: 0f af f0 imul %eax,%esi
> 31: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
> 37: 0f b6 83 00 dc 15 f9 movzbl -0x6ea2400(%ebx),%eax
>
> %edi is Tgamma, and it is NULL because sd->gamma was 0, and the zeroth element
> of gamma_tb was loaded.

Yep - I arrived at the same conclusion and sent a patch few minutes
before I saw your mail.
I am clueless about V4L and gspca workings but I chose a different
approach to fix this -
http://marc.info/?l=linux-kernel&m=121774817612391&w=2 .

>
> Now sd->gamma shouldn't be zero because in sd_ctrls, the minimum value for it
> is set to 1. This range should be checked by vidioc_s_ctrl in gspca.c, and we
> have this there:
>
> if (ctrl->value < ctrls->qctrl.minimum
> && ctrl->value > ctrls->qctrl.maximum)
> return -ERANGE;
>

Sounds more appropriate but I am not sure how vidioc_s_ctrl leads to
the call trace in the OOPS - at least it doesn't show up there.


Thanks

Parag
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/