Commit e2c6949
ipmi: Fix handling of messages with provided receive message pointer
Prior to commit b52da40 ("ipmi: Rework user message limit handling"),
i_ipmi_request() used to increase the user reference counter if the receive
message is provided by the caller of IPMI API functions. This is no longer
the case. However, ipmi_free_recv_msg() is still called and decreases the
reference counter. This results in the reference counter reaching zero,
the user data pointer is released, and all kinds of interesting crashes are
seen.
Fix the problem by increasing user reference counter if the receive message
has been provided by the caller.
Fixes: b52da40 ("ipmi: Rework user message limit handling")
Reported-by: Eric Dumazet <[email protected]>
Cc: Eric Dumazet <[email protected]>
Cc: Greg Thelen <[email protected]>
Signed-off-by: Guenter Roeck <[email protected]>
Message-ID: <[email protected]>
Signed-off-by: Corey Minyard <[email protected]>1 parent 4af66c2 commit e2c6949
1 file changed
Lines changed: 4 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2301 | 2301 | | |
2302 | 2302 | | |
2303 | 2303 | | |
2304 | | - | |
| 2304 | + | |
2305 | 2305 | | |
| 2306 | + | |
| 2307 | + | |
| 2308 | + | |
2306 | 2309 | | |
2307 | 2310 | | |
2308 | 2311 | | |
| |||
0 commit comments