mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
To: Nicholas Johnson <nicholas.johnson-opensource@outlook.com.au>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Cc: Mika Westerberg <mika.westerberg@linux.intel.com>
Subject: Re: [PATCH v2 2/3] nvmem: check for NULL reg_read and reg_write before dereferencing
Date: Thu, 5 Mar 2020 17:03:17 +0000	[thread overview]
Message-ID: <5030fbd1-baca-6e6e-de76-516991d3407c@linaro.org> (raw)
In-Reply-To: <PSXP216MB0438A1EEBF56DF852F18F14580E70@PSXP216MB0438.KORP216.PROD.OUTLOOK.COM>



On 02/03/2020 15:43, Nicholas Johnson wrote:
> Return -EPERM if reg_read is NULL in bin_attr_nvmem_read() or if
> reg_write is NULL in bin_attr_nvmem_write().
> 
> This prevents NULL dereferences such as the one described in
> 03cd45d2e219 ("thunderbolt: Prevent crash if non-active NVMem file is
> read")
> 
> Signed-off-by: Nicholas Johnson <nicholas.johnson-opensource@outlook.com.au>
> ---
>   drivers/nvmem/nvmem-sysfs.c | 6 ++++++
>   1 file changed, 6 insertions(+)
> 

Applied thanks,
--srini

  parent reply	other threads:[~2020-03-05 17:03 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-02 15:41 [PATCH v2 0/3] nvmem: Add support for write-only instances, and clean-up Nicholas Johnson
2020-03-02 15:42 ` [PATCH v2 1/3] nvmem: Add support for write-only instances Nicholas Johnson
2020-03-05 17:03   ` Srinivas Kandagatla
2020-03-05 18:11     ` Nicholas Johnson
2020-03-05 18:22       ` Srinivas Kandagatla
2020-03-02 15:43 ` [PATCH v2 2/3] nvmem: check for NULL reg_read and reg_write before dereferencing Nicholas Johnson
2020-03-03 10:29   ` Mika Westerberg
2020-03-04 16:03     ` Nicholas Johnson
2020-03-05 17:03   ` Srinivas Kandagatla [this message]
2020-03-02 15:43 ` [PATCH v2 3/3] Revert "thunderbolt: Prevent crash if non-active NVMem file is read" Nicholas Johnson
2020-03-03 10:33   ` Mika Westerberg
2020-03-04 16:07     ` Nicholas Johnson
2020-03-04 16:18       ` Mika Westerberg
2020-03-05 17:05         ` Srinivas Kandagatla
2020-03-06  5:34           ` Mika Westerberg

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=5030fbd1-baca-6e6e-de76-516991d3407c@linaro.org \
    --to=srinivas.kandagatla@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mika.westerberg@linux.intel.com \
    --cc=nicholas.johnson-opensource@outlook.com.au \
    /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

all inboxes | Powered by JetHome®