From: <gregkh@linuxfoundation.org>
To: arnd@arndb.de, gregkh@linuxfoundation.org
Cc: <stable@vger.kernel.org>, <stable-commits@vger.kernel.org>
Subject: Patch "IB/ehca: fix maybe-uninitialized warnings" has been added to the 3.18-stable tree
Date: Thu, 04 May 2017 15:37:25 -0700 [thread overview]
Message-ID: <1493937445134255@kroah.com> (raw)
In-Reply-To: <20170504205209.498721-8-arnd@arndb.de>
This is a note to let you know that I've just added the patch titled
IB/ehca: fix maybe-uninitialized warnings
to the 3.18-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
ib-ehca-fix-maybe-uninitialized-warnings.patch
and it can be found in the queue-3.18 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@vger.kernel.org> know about it.
>From arnd@arndb.de Thu May 4 15:31:46 2017
From: Arnd Bergmann <arnd@arndb.de>
Date: Thu, 4 May 2017 22:52:03 +0200
Subject: IB/ehca: fix maybe-uninitialized warnings
To: gregkh@linuxfoundation.org
Cc: stable@vger.kernel.org, Arnd Bergmann <arnd@arndb.de>
Message-ID: <20170504205209.498721-8-arnd@arndb.de>
From: Arnd Bergmann <arnd@arndb.de>
The driver causes two warnings about possibly uninitialized variables:
drivers/infiniband/hw/ehca/ehca_mrmw.c: In function 'ehca_set_pagebuf':
drivers/infiniband/hw/ehca/ehca_mrmw.c:1908:4: warning: 'prev_pgaddr' may be used uninitialized in this function [-Wmaybe-uninitialized]
drivers/infiniband/hw/ehca/ehca_mrmw.c:1924:14: note: 'prev_pgaddr' was declared here
drivers/infiniband/hw/ehca/ehca_mrmw.c: In function 'ehca_reg_mr':
drivers/infiniband/hw/ehca/ehca_mrmw.c:2430:5: warning: 'hret' may be used uninitialized in this function [-Wmaybe-uninitialized]
The first one is definitely a false positive, the second one may or may not
be one. In both cases, adding an intialization is the safe and easy
workaround.
The driver was removed in mainline in commit e581d111dad3
("staging/rdma: remove deprecated ehca driver"), in linux-4.6.
In 4.4, the file is located in drivers/staging/rdma/ehca/ehca_mrmw.c,
and the fix still applies.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/infiniband/hw/ehca/ehca_mrmw.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
--- a/drivers/infiniband/hw/ehca/ehca_mrmw.c
+++ b/drivers/infiniband/hw/ehca/ehca_mrmw.c
@@ -1921,7 +1921,7 @@ static int ehca_set_pagebuf_user2(struct
u64 *kpage)
{
int ret = 0;
- u64 pgaddr, prev_pgaddr;
+ u64 pgaddr, prev_pgaddr = 0;
u32 j = 0;
int kpages_per_hwpage = pginfo->hwpage_size / PAGE_SIZE;
int nr_kpages = kpages_per_hwpage;
@@ -2417,6 +2417,7 @@ static int ehca_reg_bmap_mr_rpages(struc
ehca_err(&shca->ib_device, "kpage alloc failed");
return -ENOMEM;
}
+ hret = H_SUCCESS;
for (top = 0; top < EHCA_MAP_ENTRIES; top++) {
if (!ehca_bmap_valid(ehca_bmap->top[top]))
continue;
Patches currently in stable-queue which might be from arnd@arndb.de are
queue-3.18/ib-iser-fix-sparse-warnings.patch
queue-3.18/cred-userns-define-current_user_ns-as-a-function.patch
queue-3.18/pci-xilinx-fix-harmless-format-string-warning.patch
queue-3.18/arm64-build-vdso-without-libgcov.patch
queue-3.18/arm64-provide-a-namespace-to-ncaps.patch
queue-3.18/alsa-ppc-awacs-shut-up-maybe-uninitialized-warning.patch
queue-3.18/net-tg3-avoid-uninitialized-variable-warning.patch
queue-3.18/tty-isicom-fix-big-endian-compile-warning.patch
queue-3.18/mtd-avoid-stack-overflow-in-mtd-cfi-code.patch
queue-3.18/ib-qib-rename-bits_per_page-to-rvt_bits_per_page.patch
queue-3.18/ips-remove-pointless-warning.patch
queue-3.18/powerpc-ptrace-fix-out-of-bounds-array-access-warning.patch
queue-3.18/staging-imx-drm-fix-indentation-warning.patch
queue-3.18/mlx5-avoid-build-warnings-on-32-bit.patch
queue-3.18/mm-cma-silence-warnings-due-to-max-usage.patch
queue-3.18/misdn-avoid-arch-specific-__builtin_return_address-call.patch
queue-3.18/staging-bcm-add-32-bit-host-dependency.patch
queue-3.18/staging-vt6655-fix-overly-large-stack-usage.patch
queue-3.18/drbd-avoid-redefinition-of-bits_per_page.patch
queue-3.18/infiniband-mlx5-avoid-a-compile-time-warning.patch
queue-3.18/arm-cns3xxx-shut-up-frame-size-warning.patch
queue-3.18/ib-ehca-fix-maybe-uninitialized-warnings.patch
next prev parent reply other threads:[~2017-05-04 22:37 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-04 20:51 [PATCH 00/13] [3.18-stable] backported build fixes Arnd Bergmann
2017-05-04 20:51 ` [PATCH 01/13] [3.18-stable] ARM: cns3xxx: shut up frame size warning Arnd Bergmann
2017-05-04 22:27 ` Greg KH
2017-05-04 22:37 ` Patch "ARM: cns3xxx: shut up frame size warning" has been added to the 3.18-stable tree gregkh
2017-05-04 20:51 ` [PATCH 02/13] [3.18-stable] arm64: Provide a namespace to NCAPS Arnd Bergmann
2017-05-04 20:51 ` [PATCH 03/13] [3.18-stable] staging: vt6655: fix overly large stack usage Arnd Bergmann
2017-05-04 22:37 ` Patch "staging: vt6655: fix overly large stack usage" has been added to the 3.18-stable tree gregkh
2017-05-04 20:52 ` [PATCH 04/13] [3.18-stable] staging: imx-drm: fix indentation warning Arnd Bergmann
2017-05-04 22:37 ` Patch "staging: imx-drm: fix indentation warning" has been added to the 3.18-stable tree gregkh
2017-05-04 20:52 ` [PATCH 05/13] [3.18-stable] staging: bcm: add 32-bit host dependency Arnd Bergmann
2017-05-04 22:37 ` Patch "staging: bcm: add 32-bit host dependency" has been added to the 3.18-stable tree gregkh
2017-05-04 20:52 ` [PATCH 06/13] [3.18-stable] IB/qib: rename BITS_PER_PAGE to RVT_BITS_PER_PAGE Arnd Bergmann
2017-05-04 22:37 ` Patch "IB/qib: rename BITS_PER_PAGE to RVT_BITS_PER_PAGE" has been added to the 3.18-stable tree gregkh
2017-05-04 22:37 ` Patch "IB/qib: rename BITS_PER_PAGE to RVT_BITS_PER_PAGE" has been added to the 4.4-stable tree gregkh
2017-05-04 20:52 ` [PATCH 07/13] [3.18-stable] IB/ehca: fix maybe-uninitialized warnings Arnd Bergmann
2017-05-04 22:37 ` gregkh [this message]
2017-05-04 22:37 ` Patch "IB/ehca: fix maybe-uninitialized warnings" has been added to the 4.4-stable tree gregkh
2017-05-04 20:52 ` [PATCH 08/13] [3.18-stable] tty/isicom: fix big-endian compile warning Arnd Bergmann
2017-05-04 20:52 ` [PATCH 09/13] [3.18-stable] infiniband: mlx5: avoid a compile-time warning Arnd Bergmann
2017-05-04 20:52 ` [PATCH 10/13] [3.18-stable] ips: remove pointless #warning Arnd Bergmann
2017-05-04 20:52 ` [PATCH 11/13] [3.18-stable] mISDN: avoid arch specific __builtin_return_address call Arnd Bergmann
2017-05-04 20:52 ` [PATCH 12/13] [3.18-stable] arm64: build vdso without libgcov Arnd Bergmann
2017-05-04 20:52 ` [PATCH 13/13] [3.18-stable] mm/cma: silence warnings due to max() usage Arnd Bergmann
2017-05-04 22:39 ` [PATCH 00/13] [3.18-stable] backported build fixes Greg KH
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=1493937445134255@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=arnd@arndb.de \
--cc=stable-commits@vger.kernel.org \
--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.