[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAHp75VeqV1Jj3rOxbFCx2DsrH1Y_re03i3ndvXvShi2UG6FGyQ@mail.gmail.com>
Date: Fri, 17 Jul 2020 12:01:09 +0300
From: Andy Shevchenko <andy.shevchenko@...il.com>
To: Jiri Slaby <jslaby@...e.cz>
Cc: Mauro Carvalho Chehab <mchehab+huawei@...nel.org>,
Linux Media Mailing List <linux-media@...r.kernel.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] media: atomisp: fix NULL pointer dereference
On Thu, Jul 16, 2020 at 2:52 PM Jiri Slaby <jslaby@...e.cz> wrote:
>
> I am currently seeing:
> BUG: kernel NULL pointer dereference, address: 0000000000000002
> ...
> Hardware name: UMAX VisionBook 10Wi Pro/CQM1018CWP, BIOS CQ1018.007 09/22/2016
> RIP: 0010:gmin_subdev_add.cold+0x303/0x312 [atomisp_gmin_platform]
> ...
> Call Trace:
> gmin_camera_platform_data+0x2f/0x60 [atomisp_gmin_platform]
> ov2680_probe+0x7f/0x2b0 [atomisp_ov2680]
> i2c_device_probe+0x95/0x290
>
> power can be NULL and that is properly handled earlier in this function.
> Even i2c address is set there. So this is a duplicated assignment which
> can cause the bug above. Remove it.
I believe it's fixed in [1].
[1]: https://git.linuxtv.org/mchehab/experimental.git/log/?h=atomisp_v5
> Signed-off-by: Jiri Slaby <jslaby@...e.cz>
> Cc: Mauro Carvalho Chehab <mchehab+huawei@...nel.org>
> ---
> drivers/staging/media/atomisp/pci/atomisp_gmin_platform.c | 1 -
> 1 file changed, 1 deletion(-)
>
> diff --git a/drivers/staging/media/atomisp/pci/atomisp_gmin_platform.c b/drivers/staging/media/atomisp/pci/atomisp_gmin_platform.c
> index 1af9da8acf4c..246742f44d84 100644
> --- a/drivers/staging/media/atomisp/pci/atomisp_gmin_platform.c
> +++ b/drivers/staging/media/atomisp/pci/atomisp_gmin_platform.c
> @@ -574,7 +574,6 @@ static struct gmin_subdev *gmin_subdev_add(struct v4l2_subdev *subdev)
> gmin_subdevs[i].eldo2_ctrl_shift = gmin_get_var_int(dev, false,
> "eldo2_ctrl_shift",
> ELDO2_CTRL_SHIFT);
> - gmin_subdevs[i].pwm_i2c_addr = power->addr;
> break;
>
> default:
> --
> 2.27.0
>
--
With Best Regards,
Andy Shevchenko
Powered by blists - more mailing lists