ipmi: Rework user message limit handling
commit b52da4054ee0bf9ecb44996f2c83236ff50b3812 upstream
This patch required quite a bit of work to backport due to a number
of unrelated changes that do not make sense to backport. This has
been run against my test suite and passes all tests.
The limit on the number of user messages had a number of issues,
improper counting in some cases and a use after free.
Restructure how this is all done to handle more in the receive message
allocation routine, so all refcouting and user message limit counts
are done in that routine. It's a lot cleaner and safer.
Reported-by: Gilles BULOZ <[email protected]>
Closes: https://lore.kernel.org/lkml/[email protected]/
Fixes: 8e76741c3d8b ("ipmi: Add a limit on the number of users that may use IPMI")
Cc: <[email protected]> # 4.19
Signed-off-by: Corey Minyard <[email protected]>
Tested-by: Gilles BULOZ <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 file changed