Commit 9731166d authored by Kashyap, Desai's avatar Kashyap, Desai Committed by James Bottomley

[SCSI] mptsas : NULL pointer on big endian systems causing Expander not to tear off

On Big endian system kernel will crash due to address translation
is not handle properly.
Signed-off-by: default avatarKashyap Desai <kashyap.desai@lsi.com>
Signed-off-by: default avatarJames Bottomley <James.Bottomley@suse.de>
parent 29c7630a
...@@ -3314,6 +3314,7 @@ mptsas_send_expander_event(struct fw_event_work *fw_event) ...@@ -3314,6 +3314,7 @@ mptsas_send_expander_event(struct fw_event_work *fw_event)
expander_data = (MpiEventDataSasExpanderStatusChange_t *) expander_data = (MpiEventDataSasExpanderStatusChange_t *)
fw_event->event_data; fw_event->event_data;
memcpy(&sas_address, &expander_data->SASAddress, sizeof(__le64)); memcpy(&sas_address, &expander_data->SASAddress, sizeof(__le64));
sas_address = le64_to_cpu(sas_address);
port_info = mptsas_find_portinfo_by_sas_address(ioc, sas_address); port_info = mptsas_find_portinfo_by_sas_address(ioc, sas_address);
if (expander_data->ReasonCode == MPI_EVENT_SAS_EXP_RC_ADDED) { if (expander_data->ReasonCode == MPI_EVENT_SAS_EXP_RC_ADDED) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment