ipmi: Fix kernel panic at ipmi_ssif_thread()
commit35df2085ec0289bd34218e0fb4b4ffb2f9554e35
authorJoeseph Chang <joechang@codeaurora.org>
Tue, 28 Mar 2017 02:22:09 +0000 (27 20:22 -0600)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 20 May 2017 12:27:03 +0000 (20 14:27 +0200)
tree75a699933ecbcb9039da6654ccd2eed001d6bdf5
parentd4392269f7ce3567e3bd7c2b43883433c4d64a37
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