Commit d9cee9f
committed
libnvdimm/region: Fix label activation vs errors
There are a few scenarios where init_active_labels() can return without
registering deactivate_labels() to run when the region is disabled. In
particular label error injection creates scenarios where a DIMM is
disabled, but labels on other DIMMs in the region become activated.
Arrange for init_active_labels() to always register deactivate_labels().
Reported-by: Krzysztof Kensicki <[email protected]>
Cc: <[email protected]>
Fixes: bf9bccc ("libnvdimm: pmem label sets and namespace instantiation.")
Reviewed-by: Jeff Moyer <[email protected]>
Link: https://lore.kernel.org/r/162766356450.3223041.1183118139023841447.stgit@dwillia2-desk3.amr.corp.intel.com
Signed-off-by: Dan Williams <[email protected]>1 parent b93dfa6 commit d9cee9f
1 file changed
+11
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2527 | 2527 | | |
2528 | 2528 | | |
2529 | 2529 | | |
2530 | | - | |
| 2530 | + | |
2531 | 2531 | | |
2532 | 2532 | | |
2533 | 2533 | | |
| |||
2546 | 2546 | | |
2547 | 2547 | | |
2548 | 2548 | | |
2549 | | - | |
| 2549 | + | |
2550 | 2550 | | |
2551 | 2551 | | |
2552 | 2552 | | |
2553 | 2553 | | |
2554 | 2554 | | |
2555 | | - | |
| 2555 | + | |
| 2556 | + | |
2556 | 2557 | | |
2557 | 2558 | | |
2558 | 2559 | | |
| |||
2586 | 2587 | | |
2587 | 2588 | | |
2588 | 2589 | | |
2589 | | - | |
| 2590 | + | |
| 2591 | + | |
| 2592 | + | |
| 2593 | + | |
| 2594 | + | |
2590 | 2595 | | |
2591 | | - | |
| 2596 | + | |
2592 | 2597 | | |
2593 | 2598 | | |
2594 | 2599 | | |
2595 | | - | |
| 2600 | + | |
2596 | 2601 | | |
2597 | 2602 | | |
2598 | 2603 | | |
| |||
0 commit comments