ipmi: Fix kernel panic at ipmi_ssif_thread()
authorJoeseph Chang <joechang@codeaurora.org>
Tue, 28 Mar 2017 02:22:09 +0000 (20:22 -0600)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 20 May 2017 12:49:51 +0000 (14:49 +0200)
commitd517be513311fd5800ed05d1e5f47b2337fbab9c
tree35b0e789e9840a6fb0353a32035a26240739fa0e
parent8f0fde5bc9a58d5b0a0d8a3857fbc19b6d859eda
ipmi: Fix kernel panic at ipmi_ssif_thread()

commit 6de65fcfdb51835789b245203d1bfc8d14cb1e06 upstream.

msg_written_handler() may set ssif_info->multi_data to NULL
when using ipmitool to write fru.

Before setting ssif_info->multi_data to NULL, add new local
pointer "data_to_send" and store correct i2c data pointer to
it to fix NULL pointer kernel panic and incorrect ssif_info->multi_pos.

Signed-off-by: Joeseph Chang <joechang@codeaurora.org>
Signed-off-by: Corey Minyard <cminyard@mvista.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/char/ipmi/ipmi_ssif.c