Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[SCSI] fc-transport: Use packed modifier for fc_bsg_request structure.

The 32bit kernel does not add padding bytes in the fc_bsg_request structure
whereas the 64bit kernel adds padding bytes in the fc_bsg_request structure.
Due to this, structure elements gets mismatched with 32bit application and
64bit kernel.To resolve this, used packed modifier to avoid adding padding bytes.
Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>

authored by

Harish Zunjarrao and committed by
James Bottomley
eda05a28 368bbe07

+1 -1
+1 -1
include/scsi/scsi_bsg_fc.h
··· 292 292 struct fc_bsg_rport_els r_els; 293 293 struct fc_bsg_rport_ct r_ct; 294 294 } rqst_data; 295 - }; 295 + } __attribute__((packed)); 296 296 297 297 298 298 /* response (request sense data) structure of the sg_io_v4 */