[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <739a3639944f099a76d145eb119b77701f13444d.camel@linux.ibm.com>
Date: Sun, 03 Jan 2021 09:00:45 -0800
From: James Bottomley <jejb@...ux.ibm.com>
To: Arnd Bergmann <arnd@...nel.org>, Phil Oester <kernel@...uxace.com>
Cc: Arnd Bergmann <arnd@...db.de>,
Kashyap Desai <kashyap.desai@...adcom.com>,
Sumit Saxena <sumit.saxena@...adcom.com>,
Shivasharan S <shivasharan.srikanteshwara@...adcom.com>,
"Martin K. Petersen" <martin.petersen@...cle.com>,
Christoph Hellwig <hch@...radead.org>,
"# 3.4.x" <stable@...r.kernel.org>,
Anand Lodnoor <anand.lodnoor@...adcom.com>,
Chandrakanth Patil <chandrakanth.patil@...adcom.com>,
Hannes Reinecke <hare@...e.de>, megaraidlinux.pdl@...adcom.com,
linux-scsi <linux-scsi@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 2/3] scsi: megaraid_sas: check user-provided offsets
On Sun, 2021-01-03 at 17:26 +0100, Arnd Bergmann wrote:
[...]
> @@ -8209,7 +8208,7 @@ megasas_mgmt_fw_ioctl(struct megasas_instance
> *instance,
> if (instance->consistent_mask_64bit)
> put_unaligned_le64(sense_handle, sense_ptr);
> else
> - put_unaligned_le32(sense_handle, sense_ptr);
> + put_unaligned_le64(sense_handle, sense_ptr);
> }
This hunk can't be right. It effectively means removing the if.
However, the if is needed because sense_handle is a dma_addr_t which
can be either 32 or 64 bit. What about changing the if to
if (sizeof(dma_addr_t) == 8)
instead?
James
Powered by blists - more mailing lists