Before modifying the struct iscsi_bsg_reply definition, add a compile-time structure size check. Cc: Lee Duncan <lduncan@xxxxxxxx> Signed-off-by: Bart Van Assche <bvanassche@xxxxxxx> --- drivers/scsi/scsi_transport_iscsi.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/scsi/scsi_transport_iscsi.c b/drivers/scsi/scsi_transport_iscsi.c index bebfb355abdf..4f821118ea23 100644 --- a/drivers/scsi/scsi_transport_iscsi.c +++ b/drivers/scsi/scsi_transport_iscsi.c @@ -4729,6 +4729,9 @@ static __init int iscsi_transport_init(void) .groups = 1, .input = iscsi_if_rx, }; + + BUILD_BUG_ON(offsetof(struct iscsi_bsg_reply, reply_data) != 8); + printk(KERN_INFO "Loading iSCSI transport class v%s.\n", ISCSI_TRANSPORT_VERSION);