lkml.org 
[lkml]   [2024]   [Apr]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH v3] eeprom: at24: fix memory corruption race condition
On Mon, Apr 22, 2024 at 7:43 PM Daniel Okazaki <dtokazaki@google.com> wrote:
>
> If the eeprom is not accessible, an nvmem device will be registered, the
> read will fail, and the device will be torn down. If another driver
> accesses the nvmem device after the teardown, it will reference
> invalid memory.
>
> Move the failure point before registering the nvmem device.
>
> Signed-off-by: Daniel Okazaki <dtokazaki@google.com>
> Fixes: b20eb4c1f026 ("eeprom: at24: drop unnecessary label")
> ---

I will take this patch because it does make sense but for the record:
this doesn't fully fix the issue with the nvmem race when tearing down
the device.

Bart

\
 
 \ /
  Last update: 2024-05-27 17:57    [W:0.042 / U:0.056 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site