Re: [PATCH v2] mfd: mt6360: add bound check in regmap read/write function

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

 



On Thu, 29 Sep 2022, cy_huang wrote:

> From: ChiYuan Huang <cy_huang@xxxxxxxxxxx>
> 
> Fix the potential risk for null pointer if bank index is over the maximum.
> 
> Refer to the discussion list for the experiment result on mt6370.
> https://lore.kernel.org/all/20220914013345.GA5802@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx/
> If not to check the bound, there is the same issue on mt6360.
> 
> Fixes: 3b0850440a06c (mfd: mt6360: Merge different sub-devices I2C read/write)
> Cc: stable@xxxxxxxxxxxxxxx
> Signed-off-by: ChiYuan Huang <cy_huang@xxxxxxxxxxx>
> ---
> Since v2:
> - Assign i2c bank variable after bank index is already checked.
> 
> ---
>  drivers/mfd/mt6360-core.c | 14 ++++++++++++--
>  1 file changed, 12 insertions(+), 2 deletions(-)

Applied, thanks.

-- 
Lee Jones [李琼斯]



[Index of Archives]     [Linux Kernel]     [Kernel Development Newbies]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux