]> Git Repo - linux.git/commit
sfc: fix error unwinds in TC offload
authorEdward Cree <[email protected]>
Tue, 30 May 2023 20:25:27 +0000 (21:25 +0100)
committerJakub Kicinski <[email protected]>
Thu, 1 Jun 2023 05:30:27 +0000 (22:30 -0700)
commit622ab656344a288acf4fb03d628c3bb5dd241f34
tree4c9edeb478347e44d5719dd5cd3a08a81cc0a69e
parent448a5ce1120c5bdbce1f1ccdabcd31c7d029f328
sfc: fix error unwinds in TC offload

Failure ladders weren't exactly unwinding what the function had done up
 to that point; most seriously, when we encountered an already offloaded
 rule, the failure path tried to remove the new rule from the hashtable,
 which would in fact remove the already-present 'old' rule (since it has
 the same key) from the table, and leak its resources.

Reported-by: kernel test robot <[email protected]>
Reported-by: Dan Carpenter <[email protected]>
Closes: https://lore.kernel.org/r/[email protected]/
Fixes: d902e1a737d4 ("sfc: bare bones TC offload on EF100")
Fixes: 17654d84b47c ("sfc: add offloading of 'foreign' TC (decap) rules")
Signed-off-by: Edward Cree <[email protected]>
Reviewed-by: Simon Horman <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Jakub Kicinski <[email protected]>
drivers/net/ethernet/sfc/tc.c
This page took 0.046706 seconds and 4 git commands to generate.