[lvc-project] [PATCH] media: v4l2-ctrls-request: add NULL check in, v4l2_ctrl_request_complete()

Fedor Pchelkin pchelkin at ispras.ru
Fri May 8 23:36:03 MSK 2026


On Fri, 01. May 23:28, Sergey Shtylyov wrote:
> If CONFIG_MEDIA_CONTROLLER is undefined, media_request_object_find() will
> always return NULL, so its 2nd call in v4l2_ctrl_request_complete() would
> fail as well as the 1st one and thus cause hdl to have a wrong value (at
> the top of memory) and list_for_each_entry() to iterate over the garbage
> data located there. Add NULL check for the 2nd call and place the error
> cleanup at the end of v4l2_ctrl_request_complete()...
> 
> Found by Linux Verification Center (linuxtesting.org) with the Svace static
> analysis tool.
> 
> Fixes: c3bf5129f339 ("media: v4l2-ctrls: always copy the controls on completion")
> Signed-off-by: Sergey Shtylyov <s.shtylyov at auroraos.dev>
> 
> ---

Просьба подготовить версию патча для 5.10 и выслать во внутренний список
рассылки.



More information about the lvc-project mailing list