lkml.org 
[lkml]   [2022]   [Nov]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH net v2] net: mvpp2: fix possible invalid pointer dereference
On Tue, Nov 15, 2022 at 05:04:33PM +0800, Hui Tang wrote:
> It will cause invalid pointer dereference to priv->cm3_base behind,
> if PTR_ERR(priv->cm3_base) in mvpp2_get_sram().

As i pointed out for the MDIO driver, i wonder if this is the correct
fix. mvpp2_get_sram() is probably a better place to handle this

In fact, please add a devm_ioremap_resource_optional() which returns
NULL if the resource does not exist, or an error code for real errors,
and make drivers fail the probe on real errors.

Andrew

\
 
 \ /
  Last update: 2022-11-15 16:52    [W:0.077 / U:0.164 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site