Re: [PATCH v3 3/8] component: add support for component match array

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

 



On Fri, Jul 4, 2014 at 5:55 PM, Russell King - ARM Linux
<linux@xxxxxxxxxxxxxxxx> wrote:
> On Fri, Jul 04, 2014 at 05:00:36PM +0530, Sachin Kamat wrote:
>> On Fri, Jul 4, 2014 at 4:22 PM, Russell King - ARM Linux
>> <linux@xxxxxxxxxxxxxxxx> wrote:
>> > On Fri, Jul 04, 2014 at 04:17:35PM +0530, Sachin Kamat wrote:
>> >> Hi Russell
>> >>
>> >> > +int component_master_add_with_match(struct device *dev,
>> >> > +       const struct component_master_ops *ops,
>> >> > +       struct component_match *match)
>> >> >  {
>> >> >         struct master *master;
>> >> >         int ret;
>> >> >
>> >> > +       if (ops->add_components && match)
>> >> > +               return -EINVAL;
>> >> > +
>> >> > +       /* Reallocate the match array for its true size */
>> >> > +       match = component_match_realloc(dev, match, match->num);
>> >>
>> >>            ^^^^^^^^^^^^^
>> >> This gives a NULL pointer dereference error when match is NULL (as passed
>> >> by component_master_add() below). Observed this while testing linux-next
>> >> kernel (next-20140704) on Exynos based board with DRM enabled.
>> >
>> > Thanks for your report.  Please verify that the patch below resolves it
>> > for you.  Thanks.
>>
>> Yes, the below patch fixes the crash. Thanks for the fix.
>
> Thanks.  I'll add a tested-by and reported-by for your address when
> committing this patch.  Let me know if you want something different.

Thanks. Please use the following for the tags:

Sachin Kamat <sachin.kamat@xxxxxxxxxxx>

-- 
Regards,
Sachin.
_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel




[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux