Commit a45e688
committed
netfilter: nf_tables: release batch on table validation from abort path
Unlike early commit path stage which triggers a call to abort, an
explicit release of the batch is required on abort, otherwise mutex is
released and commit_list remains in place.
Add WARN_ON_ONCE to ensure commit_list is empty from the abort path
before releasing the mutex.
After this patch, commit_list is always assumed to be empty before
grabbing the mutex, therefore
03c1f1e ("netfilter: Cleanup nft_net->module_list from nf_tables_exit_net()")
only needs to release the pending modules for registration.
Cc: [email protected]
Fixes: c0391b6 ("netfilter: nf_tables: missing validation from the abort path")
Signed-off-by: Pablo Neira Ayuso <[email protected]>1 parent 72076fc commit a45e688
1 file changed
+10
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10455 | 10455 | | |
10456 | 10456 | | |
10457 | 10457 | | |
| 10458 | + | |
10458 | 10459 | | |
10459 | 10460 | | |
10460 | 10461 | | |
10461 | | - | |
| 10462 | + | |
10462 | 10463 | | |
10463 | 10464 | | |
10464 | 10465 | | |
| |||
10655 | 10656 | | |
10656 | 10657 | | |
10657 | 10658 | | |
10658 | | - | |
| 10659 | + | |
10659 | 10660 | | |
10660 | 10661 | | |
10661 | 10662 | | |
| |||
10668 | 10669 | | |
10669 | 10670 | | |
10670 | 10671 | | |
| 10672 | + | |
| 10673 | + | |
| 10674 | + | |
10671 | 10675 | | |
10672 | 10676 | | |
10673 | 10677 | | |
| |||
11473 | 11477 | | |
11474 | 11478 | | |
11475 | 11479 | | |
11476 | | - | |
11477 | | - | |
11478 | | - | |
| 11480 | + | |
| 11481 | + | |
| 11482 | + | |
| 11483 | + | |
11479 | 11484 | | |
11480 | 11485 | | |
11481 | 11486 | | |
| |||
0 commit comments