All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sasha Levin <sashal@kernel.org>
To: gregkh@linuxfoundation.org
Cc: arnd@arndb.de, martin.petersen@oracle.com, stable@vger.kernel.org
Subject: Re: FAILED: patch "[PATCH] scsi: fnic: fix invalid stack access" failed to apply to 4.9-stable tree
Date: Sun, 19 Jan 2020 10:53:43 -0500	[thread overview]
Message-ID: <20200119155343.GS1706@sasha-vm> (raw)
In-Reply-To: <157944140770121@kroah.com>

On Sun, Jan 19, 2020 at 02:43:27PM +0100, gregkh@linuxfoundation.org wrote:
>
>The patch below does not apply to the 4.9-stable tree.
>If someone wants it applied there, or to any other stable or longterm
>tree, then please email the backport, including the original git commit
>id to <stable@vger.kernel.org>.
>
>thanks,
>
>greg k-h
>
>------------------ original commit in Linus's tree ------------------
>
>From 42ec15ceaea74b5f7a621fc6686cbf69ca66c4cf Mon Sep 17 00:00:00 2001
>From: Arnd Bergmann <arnd@arndb.de>
>Date: Tue, 7 Jan 2020 21:15:49 +0100
>Subject: [PATCH] scsi: fnic: fix invalid stack access
>
>gcc -O3 warns that some local variables are not properly initialized:
>
>drivers/scsi/fnic/vnic_dev.c: In function 'fnic_dev_hang_notify':
>drivers/scsi/fnic/vnic_dev.c:511:16: error: 'a0' is used uninitialized in this function [-Werror=uninitialized]
>  vdev->args[0] = *a0;
>  ~~~~~~~~~~~~~~^~~~~
>drivers/scsi/fnic/vnic_dev.c:691:6: note: 'a0' was declared here
>  u64 a0, a1;
>      ^~
>drivers/scsi/fnic/vnic_dev.c:512:16: error: 'a1' is used uninitialized in this function [-Werror=uninitialized]
>  vdev->args[1] = *a1;
>  ~~~~~~~~~~~~~~^~~~~
>drivers/scsi/fnic/vnic_dev.c:691:10: note: 'a1' was declared here
>  u64 a0, a1;
>          ^~
>drivers/scsi/fnic/vnic_dev.c: In function 'fnic_dev_mac_addr':
>drivers/scsi/fnic/vnic_dev.c:512:16: error: 'a1' is used uninitialized in this function [-Werror=uninitialized]
>  vdev->args[1] = *a1;
>  ~~~~~~~~~~~~~~^~~~~
>drivers/scsi/fnic/vnic_dev.c:698:10: note: 'a1' was declared here
>  u64 a0, a1;
>          ^~
>
>Apparently the code relies on the local variables occupying adjacent memory
>locations in the same order, but this is of course not guaranteed.
>
>Use an array of two u64 variables where needed to make it work correctly.
>
>I suspect there is also an endianness bug here, but have not digged in deep
>enough to be sure.
>
>Fixes: 5df6d737dd4b ("[SCSI] fnic: Add new Cisco PCI-Express FCoE HBA")
>Fixes: mmtom ("init/Kconfig: enable -O3 for all arches")
>Cc: stable@vger.kernel.org
>Link: https://lore.kernel.org/r/20200107201602.4096790-1-arnd@arndb.de
>Signed-off-by: Arnd Bergmann <arnd@arndb.de>
>Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>

I've grabbed 36fe90b0f0bd ("scsi: fnic: use kernel's '%pM' format option
to print MAC") to resolve this conflict and queued both for 4.9 and 4.4

-- 
Thanks,
Sasha

      reply	other threads:[~2020-01-19 15:53 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-19 13:43 FAILED: patch "[PATCH] scsi: fnic: fix invalid stack access" failed to apply to 4.9-stable tree gregkh
2020-01-19 15:53 ` Sasha Levin [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200119155343.GS1706@sasha-vm \
    --to=sashal@kernel.org \
    --cc=arnd@arndb.de \
    --cc=gregkh@linuxfoundation.org \
    --cc=martin.petersen@oracle.com \
    --cc=stable@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.