From: Srikanth Korangala Hari <srikanth.h@samsung.com>
To: "linus.walleij@linaro.org" <linus.walleij@linaro.org>,
"linux-gpio@vger.kernel.org" <linux-gpio@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Cc: Srikanth Korangala Hari <srikanth.h@samsung.com>
Subject: RE: [PATCH 1/1] Preventive patch in the pin control subsystem to handle NULL check.
Date: Wed, 29 Aug 2018 15:55:43 +0530 [thread overview]
Message-ID: <20180829102543epcms5p2070c1c13edc239aa3f776f53b584c27a@epcms5p2> (raw)
In-Reply-To: <1535359139-6264-1-git-send-email-srikanth.h@samsung.com>
> 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@samsung.com>
> ---
> 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
next prev parent reply other threads:[~2018-08-29 10:25 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CGME20180827083916epcas1p43a3fc8570269411de215254ce0ae4b37@epcas1p4.samsung.com>
2018-08-27 8:38 ` [PATCH 1/1] Preventive patch in the pin control subsystem to handle NULL check Srikanth K H
[not found] ` <CGME20180827083916epcas1p43a3fc8570269411de215254ce0ae4b37@epcms5p2>
2018-08-29 10:25 ` Srikanth Korangala Hari [this message]
2018-08-30 9:03 ` Linus Walleij
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180829102543epcms5p2070c1c13edc239aa3f776f53b584c27a@epcms5p2 \
--to=srikanth.h@samsung.com \
--cc=linus.walleij@linaro.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).