ipmi: Fix kernel panic at ipmi_ssif_thread()
authorJoeseph Chang <joechang@codeaurora.org>
Tue, 28 Mar 2017 02:22:09 +0000 (20:22 -0600)
committerCorey Minyard <cminyard@mvista.com>
Fri, 7 Apr 2017 17:25:22 +0000 (12:25 -0500)
commit6de65fcfdb51835789b245203d1bfc8d14cb1e06
treed4c54a5c8abf83d416c72cde8374cc7224897c0c
parentea6200e84182989a3cce9687cf79a23ac44ec4db
ipmi: Fix kernel panic at ipmi_ssif_thread()

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>
Cc: stable@vger.kernel.org # 3.19-
drivers/char/ipmi/ipmi_ssif.c