diff options
| author | John Groves <John@Groves.net> | 2026-06-15 16:07:30 +0000 |
|---|---|---|
| committer | Alison Schofield <alison.schofield@intel.com> | 2026-07-14 16:26:43 -0700 |
| commit | 7ae9d15bdcde0f2955ae13b6a95587f9e23b2359 (patch) | |
| tree | 4f1e089ed75c9ad4a655a633fdc9c40b42c1b8a4 /tools/perf/scripts/python | |
| parent | 755effecd6fc7d8ff18f09135cb5e3cf98c20d55 (diff) | |
dax: read holder_ops once in dax_holder_notify_failure()
dax_holder_notify_failure() reads dax_dev->holder_ops twice without
READ_ONCE() -- once for the NULL check and once for the indirect
notify_failure() call. A concurrent fs_put_dax() can clear holder_ops
between the two reads, so the check can observe a non-NULL pointer while
the call dereferences NULL. (kill_dax() also clears holder_ops, but only
after synchronize_srcu(), so it cannot race a reader that is inside
dax_read_lock(); fs_put_dax() does no such synchronization.)
Fetch holder_ops once into a local with READ_ONCE() so the NULL check and
the indirect call observe the same value.
Fixes: 8012b86608552 ("dax: introduce holder for dax_device")
Suggested-by: Richard Cheng <icheng@nvidia.com>
Reviewed-by: Richard Cheng <icheng@nvidia.com>
Signed-off-by: John Groves <john@groves.net>
Link: https://patch.msgid.link/0100019ecc09bb56-5ecc9c6b-35ba-44f8-b112-921b01b34478-000000@email.amazonses.com
Signed-off-by: Alison Schofield <alison.schofield@intel.com>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions
