Re: [PATCH 7/9] qla2xxx: Fix a Coverity complaint in qla2100_fw_dump()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Bart,

On Sun, Jun 14, 2020 at 03:39:19PM -0700, Bart Van Assche wrote:
> @@ -1063,7 +1063,8 @@ qla2100_fw_dump(scsi_qla_host_t *vha)
>  	}
>  
>  	if (rval == QLA_SUCCESS)
> -		qla2xxx_copy_queues(ha, &fw->risc_ram[cnt]);
> +		qla2xxx_copy_queues(ha, (char *)fw +
> +				    offsetof(typeof(*fw), risc_ram) + cnt);

This looks pretty ugly to me. Any chance to write this in a way it's
understandable by humans and coverity is not annoyed?

Do I understand it correctly, it's valid to read after the end of risc_ram?

Thanks,
Daniel



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]

  Powered by Linux