Messages in this thread | | | From | Bartosz Golaszewski <> | Date | Tue, 23 Apr 2024 10:13:54 +0200 | Subject | Re: [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
| |