diff options
| author | John Groves <John@Groves.net> | 2026-06-15 16:06:53 +0000 |
|---|---|---|
| committer | Alison Schofield <alison.schofield@intel.com> | 2026-07-14 16:26:42 -0700 |
| commit | caf906009d12cb21b934f1c4d17cedc6d469429f (patch) | |
| tree | f2cf56ca5c1d1dc7526939ce4b31f408599a5c53 /tools/perf/scripts/python/task-analyzer.py | |
| parent | e0239229931faf9ca3367e3befcf16f77b2cd45b (diff) | |
dax/fsdev: don't leave a dangling dev_dax->pgmap on probe failure
After the dynamic path set dev_dax->pgmap, any later probe failure left
dev_dax->pgmap dangling: devres frees the devm_kzalloc'd pgmap on probe
failure, and subsequent probe attempts would hit the "dynamic-dax with
pre-populated page map" check and fail permanently.
Factor pgmap acquisition out into fsdev_acquire_pgmap(), and defer the
dev_dax->pgmap assignment until probe can no longer fail. A failed probe
now never publishes the pointer at all, so there is nothing to unwind.
This also matches kill_dev_dax(), which already clears the dynamic pgmap
pointer on unbind: dev_dax->pgmap is now non-NULL only while the pgmap
is actually valid.
Refactor suggested by Dave Jiang.
Fixes: d5406bd458b0a ("dax: add fsdev.c driver for fs-dax on character dax")
Reviewed-by: Dave Jiang <dave.jiang@intel.com>
Signed-off-by: John Groves <john@groves.net>
Link: https://patch.msgid.link/0100019ecc092ca1-ffc7a5fd-1252-4be5-882c-fd5efdc102a9-000000@email.amazonses.com
Signed-off-by: Alison Schofield <alison.schofield@intel.com>
Diffstat (limited to 'tools/perf/scripts/python/task-analyzer.py')
0 files changed, 0 insertions, 0 deletions
