Messages in this thread | | | Subject | Re: [PATCH v2 2/3] nvmem: check for NULL reg_read and reg_write before dereferencing | From | Srinivas Kandagatla <> | Date | Thu, 5 Mar 2020 17:03:17 +0000 |
| |
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
| |