CVE-2026-98948: mlxsw: spectrum_flower: Fix port range register leak in tmplt_create()
In the Linux kernel, the following vulnerability has been resolved:
mlxsw: spectrumflower: Fix port range register leak in tmpltcreate()
mlxswspflowertmpltcreate() parses a flowclsoffload template into a stack-local struct mlxswspaclruleinfo purely to compute rulei.values.elusage. Parsing can acquire port range registers via mlxswspflowerparseportsrange(), but since this rulei never goes through mlxswspaclruleidestroy(), those registers were never released, including through chain template deletion.
Factor out of mlxswspaclruleidestroy() the code to actually release the necessary resources and call from mlxswspflowertmpltcreate() to plug the leak.
The issue was found during a review of Wentao Liang's patch referenced below.