RE: [PATCH 1/1] Preventive patch in the pin control subsystem to handle NULL check.

From: Srikanth Korangala Hari
Date: Wed Aug 29 2018 - 06:25:51 EST


> IfÂtheÂpinÂdescriptorÂrequestedÂforÂtheÂphysicalÂpinÂfailsÂthenÂthe
> descriptorÂisÂdereferencedÂwithoutÂcheckingÂforÂitsÂvalidityÂwhich
> mayÂleadÂtoÂcrash,ÂhenceÂaddedÂpreventiveÂcodeÂtoÂcheckÂforÂNULL
> andÂaccordinglyÂdereference.
Â
> Signed-off-by:ÂSrikanthÂKÂHÂ<srikanth.h@xxxxxxxxxxx>
> ---
>Âdrivers/pinctrl/pinconf.cÂ|Â5Â+++--
>Â1ÂfileÂchanged,Â3Âinsertions(+),Â2Âdeletions(-)
Â
> diffÂ--gitÂa/drivers/pinctrl/pinconf.cÂb/drivers/pinctrl/pinconf.c
> indexÂd3fe143..576d08dÂ100644
> ---Âa/drivers/pinctrl/pinconf.c
> +++Âb/drivers/pinctrl/pinconf.c
> @@Â-269,8Â+269,9Â@@ÂvoidÂpinconf_show_setting(structÂseq_fileÂ*s,
>ÂÂÂÂÂÂÂÂÂcaseÂPIN_MAP_TYPE_CONFIGS_PIN:
>ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂdescÂ=Âpin_desc_get(setting->pctldev,
>ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂsetting->data.configs.group_or_pin);
> -ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂseq_printf(s,Â"pinÂ%sÂ(%d)",Âdesc->name,
> -ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂsetting->data.configs.group_or_pin);
> +ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂifÂ(desc)
> +ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂseq_printf(s,Â"pinÂ%sÂ(%d)",Âdesc->name,
> +ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂsetting->data.configs.group_or_pin);
>ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂbreak;
>ÂÂÂÂÂÂÂÂÂcaseÂPIN_MAP_TYPE_CONFIGS_GROUP:
>ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂseq_printf(s,Â"groupÂ%sÂ(%d)",

Dear Maintainer's,

Please confirm me whether the above patch is considered for merging onto mainline ?

Thanks,
Srikanth
Â
Â