[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20210127012124.22241-1-leeman.duncan@gmail.com>
Date: Tue, 26 Jan 2021 17:21:24 -0800
From: Lee Duncan <leeman.duncan@...il.com>
To: linux-scsi@...r.kernel.org, linux-kernel@...r.kernel.org
Cc: Hannes Reinecke <hare@...e.de>, stable@...r.kernel.org,
Lee Duncan <lduncan@...e.com>
Subject: [PATCH] fnic: fixup patch to resolve stack frame issues
From: Hannes Reinecke <hare@...e.de>
Commit 42ec15ceaea7 fixed a gcc issue with unused variables, but
introduced errors since it allocated an array of two u64-s but
then used more than that. Set the arrays to the proper size.
Fixes: 42ec15ceaea74b5f7a621fc6686cbf69ca66c4cf
Cc: stable@...r.kernel.org
Signed-off-by: Hannes Reinecke <hare@...e.de>
Signed-off-by: Lee Duncan <lduncan@...e.com>
---
drivers/scsi/fnic/vnic_dev.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/scsi/fnic/vnic_dev.c b/drivers/scsi/fnic/vnic_dev.c
index 5988c300cc82..d29999064b89 100644
--- a/drivers/scsi/fnic/vnic_dev.c
+++ b/drivers/scsi/fnic/vnic_dev.c
@@ -697,7 +697,7 @@ int vnic_dev_hang_notify(struct vnic_dev *vdev)
int vnic_dev_mac_addr(struct vnic_dev *vdev, u8 *mac_addr)
{
- u64 a[2] = {};
+ u64 a[ETH_ALEN] = {};
int wait = 1000;
int err, i;
@@ -734,7 +734,7 @@ void vnic_dev_packet_filter(struct vnic_dev *vdev, int directed, int multicast,
void vnic_dev_add_addr(struct vnic_dev *vdev, u8 *addr)
{
- u64 a[2] = {};
+ u64 a[ETH_ALEN] = {};
int wait = 1000;
int err;
int i;
@@ -749,7 +749,7 @@ void vnic_dev_add_addr(struct vnic_dev *vdev, u8 *addr)
void vnic_dev_del_addr(struct vnic_dev *vdev, u8 *addr)
{
- u64 a[2] = {};
+ u64 a[ETH_ALEN] = {};
int wait = 1000;
int err;
int i;
--
2.26.2
Powered by blists - more mailing lists