Commit a16f889
nvmet-tcp: Fix a possible sporadic response drops in weakly ordered arch
The order in which queue->cmd and rcv_state are updated is crucial.
If these assignments are reordered by the compiler, the worker might not
get queued in nvmet_tcp_queue_response(), hanging the IO. to enforce the
the correct reordering, set rcv_state using smp_store_release().
Fixes: bdaf132 ("nvmet-tcp: fix a segmentation fault during io parsing error")
Signed-off-by: Meir Elisha <meir.elisha@volumez.com>
Reviewed-by: Sagi Grimberg <sagi@grimberg.me>
Signed-off-by: Keith Busch <kbusch@kernel.org>1 parent ad95bab commit a16f889
1 file changed
+11
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
571 | 571 | | |
572 | 572 | | |
573 | 573 | | |
| 574 | + | |
| 575 | + | |
574 | 576 | | |
575 | 577 | | |
576 | 578 | | |
577 | | - | |
| 579 | + | |
| 580 | + | |
| 581 | + | |
| 582 | + | |
| 583 | + | |
578 | 584 | | |
579 | 585 | | |
580 | 586 | | |
| |||
583 | 589 | | |
584 | 590 | | |
585 | 591 | | |
586 | | - | |
| 592 | + | |
587 | 593 | | |
588 | 594 | | |
589 | 595 | | |
| |||
847 | 853 | | |
848 | 854 | | |
849 | 855 | | |
850 | | - | |
851 | | - | |
| 856 | + | |
| 857 | + | |
| 858 | + | |
852 | 859 | | |
853 | 860 | | |
854 | 861 | | |
| |||
0 commit comments