Commit 1b4c59b
target: fix potential race window in target_sess_cmd_list_waiting()
target_sess_cmd_list_waiting() might hit on a condition where
the kref for the command is already 0, but the destructor has
not been called yet (or is stuck in waiting for a spin lock).
Rather than leaving the command on the list we should explicitly
remove it to avoid race issues later on.
Signed-off-by: Hannes Reinecke <hare@suse.com>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>1 parent 61f3616 commit 1b4c59b
1 file changed
Lines changed: 8 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2535 | 2535 | | |
2536 | 2536 | | |
2537 | 2537 | | |
2538 | | - | |
| 2538 | + | |
| 2539 | + | |
| 2540 | + | |
2539 | 2541 | | |
2540 | 2542 | | |
2541 | 2543 | | |
| |||
2616 | 2618 | | |
2617 | 2619 | | |
2618 | 2620 | | |
2619 | | - | |
| 2621 | + | |
2620 | 2622 | | |
2621 | 2623 | | |
2622 | 2624 | | |
| |||
2628 | 2630 | | |
2629 | 2631 | | |
2630 | 2632 | | |
2631 | | - | |
| 2633 | + | |
| 2634 | + | |
2632 | 2635 | | |
2633 | 2636 | | |
2634 | 2637 | | |
2635 | 2638 | | |
2636 | 2639 | | |
2637 | 2640 | | |
2638 | | - | |
| 2641 | + | |
| 2642 | + | |
2639 | 2643 | | |
2640 | 2644 | | |
2641 | 2645 | | |
| |||
0 commit comments