Commit 0d459e2
committed
netfilter: nf_tables: release mutex after nft_gc_seq_end from abort path
The commit mutex should not be released during the critical section
between nft_gc_seq_begin() and nft_gc_seq_end(), otherwise, async GC
worker could collect expired objects and get the released commit lock
within the same GC sequence.
nf_tables_module_autoload() temporarily releases the mutex to load
module dependencies, then it goes back to replay the transaction again.
Move it at the end of the abort phase after nft_gc_seq_end() is called.
Cc: [email protected]
Fixes: 7203443 ("netfilter: nf_tables: GC transaction race with abort path")
Reported-by: Kuan-Ting Chen <[email protected]>
Signed-off-by: Pablo Neira Ayuso <[email protected]>1 parent a45e688 commit 0d459e2
1 file changed
+8
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10651 | 10651 | | |
10652 | 10652 | | |
10653 | 10653 | | |
10654 | | - | |
10655 | | - | |
10656 | | - | |
10657 | | - | |
10658 | | - | |
10659 | 10654 | | |
10660 | 10655 | | |
10661 | 10656 | | |
| |||
10672 | 10667 | | |
10673 | 10668 | | |
10674 | 10669 | | |
| 10670 | + | |
| 10671 | + | |
| 10672 | + | |
| 10673 | + | |
| 10674 | + | |
| 10675 | + | |
| 10676 | + | |
| 10677 | + | |
10675 | 10678 | | |
10676 | 10679 | | |
10677 | 10680 | | |
| |||
0 commit comments