From: <gregkh@linuxfoundation.org>
To: arnd@arndb.de, gregkh@linuxfoundation.org
Cc: <stable@vger.kernel.org>, <stable-commits@vger.kernel.org>
Subject: Patch "gfs2: remove IS_ERR_VALUE abuse" has been added to the 3.18-stable tree
Date: Fri, 05 May 2017 10:47:23 -0700 [thread overview]
Message-ID: <1494006443222125@kroah.com> (raw)
In-Reply-To: <20170505115725.1424772-10-arnd@arndb.de>
This is a note to let you know that I've just added the patch titled
gfs2: remove IS_ERR_VALUE abuse
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:
gfs2-remove-is_err_value-abuse.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 Fri May 5 10:45:31 2017
From: Arnd Bergmann <arnd@arndb.de>
Date: Fri, 5 May 2017 13:57:25 +0200
Subject: gfs2: remove IS_ERR_VALUE abuse
To: gregkh@linuxfoundation.org
Cc: stable@vger.kernel.org, Arnd Bergmann <arnd@arndb.de>
Message-ID: <20170505115725.1424772-10-arnd@arndb.de>
From: Arnd Bergmann <arnd@arndb.de>
Picked from commit 287980e49ffc0f6d911601e7e352a812ed27768e ("remove lots
of IS_ERR_VALUE abuses") upstream.
The original fix that was backported to 3.18 already addressed the warning
in some configurations, but not in others, leaving us with the same output:
../fs/gfs2/dir.c: In function 'get_first_leaf':
../fs/gfs2/dir.c:768:9: warning: 'leaf_no' may be used uninitialized in this function [-Wmaybe-uninitialized]
error = get_leaf(dip, leaf_no, bh_out);
^
../fs/gfs2/dir.c: In function 'dir_split_leaf.isra.20':
../fs/gfs2/dir.c:987:8: warning: 'leaf_no' may be used uninitialized in this function [-Wmaybe-uninitialized]
This takes the approach that we took in later versions in mainline,
but does not backport the entire patch, as that would be too large
for stable and IIRC caused regressions in other drivers.
Fixes: 9d46d31e9aea ("gfs2: avoid uninitialized variable warning")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
fs/gfs2/dir.c | 15 +++++++++------
1 file changed, 9 insertions(+), 6 deletions(-)
--- a/fs/gfs2/dir.c
+++ b/fs/gfs2/dir.c
@@ -749,12 +749,15 @@ static int get_leaf_nr(struct gfs2_inode
u64 *leaf_out)
{
__be64 *hash;
+ int error;
hash = gfs2_dir_get_hash_table(dip);
- if (IS_ERR(hash))
- return PTR_ERR(hash);
- *leaf_out = be64_to_cpu(*(hash + index));
- return 0;
+ error = PTR_ERR_OR_ZERO(hash);
+
+ if (!error)
+ *leaf_out = be64_to_cpu(*(hash + index));
+
+ return error;
}
static int get_first_leaf(struct gfs2_inode *dip, u32 index,
@@ -764,7 +767,7 @@ static int get_first_leaf(struct gfs2_in
int error;
error = get_leaf_nr(dip, index, &leaf_no);
- if (!IS_ERR_VALUE(error))
+ if (!error)
error = get_leaf(dip, leaf_no, bh_out);
return error;
@@ -980,7 +983,7 @@ static int dir_split_leaf(struct inode *
index = name->hash >> (32 - dip->i_depth);
error = get_leaf_nr(dip, index, &leaf_no);
- if (IS_ERR_VALUE(error))
+ if (error)
return error;
/* Get the old leaf block */
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/mips-elf2ecoff-ignore-pt_mips_abiflags-program-headers.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/mips-jz4740-fix-build-error-in-irq.h.patch
queue-3.18/modpost-don-t-emit-section-mismatch-warnings-for-compiler-optimizations.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/cpumask_set_cpu_local_first-cpumask_local_spread-lament.patch
queue-3.18/ib-qib-rename-bits_per_page-to-rvt_bits_per_page.patch
queue-3.18/modpost-expand-pattern-matching-to-support-substring-matches.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/scsi-advansys-remove-warning-message.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/e1000e-fix-call-to-do_div-to-use-u64-arg.patch
queue-3.18/gfs2-remove-is_err_value-abuse.patch
queue-3.18/message-i2o-fix-64bit-build-warnings.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/kbuild-mergeconfig-fix-jobserver-unavailable-warning.patch
queue-3.18/arm-cns3xxx-shut-up-frame-size-warning.patch
queue-3.18/ib-ehca-fix-maybe-uninitialized-warnings.patch
queue-3.18/mips-elf2ecoff-fix-warning-due-to-dead-code.patch
queue-3.18/staging-unisys-correctly-handle-return-value-from-queue_delayed_work.patch
next prev parent reply other threads:[~2017-05-05 17:47 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-05 11:57 [PATCH 0/9] [3.18-stable] fixes for all remaining known warnings Arnd Bergmann
2017-05-05 11:57 ` [PATCH 1/9] [3.18-stable] kbuild: mergeconfig: fix "jobserver unavailable" warning Arnd Bergmann
2017-05-05 17:14 ` Greg KH
2017-05-05 17:46 ` Greg KH
2017-05-05 11:57 ` [PATCH 2/9] [3.18-stable] modpost: expand pattern matching to support substring matches Arnd Bergmann
2017-05-05 11:57 ` [PATCH 3/9] [3.18-stable] modpost: don't emit section mismatch warnings for compiler optimizations Arnd Bergmann
2017-05-05 11:57 ` [PATCH 4/9] [3.18-stable] cpumask_set_cpu_local_first => cpumask_local_spread, lament Arnd Bergmann
2017-05-05 11:57 ` [PATCH 5/9] [3.18-stable] e1000e: fix call to do_div() to use u64 arg Arnd Bergmann
2017-05-05 11:57 ` [PATCH 6/9] [3.18-stable] scsi: advansys: remove #warning message Arnd Bergmann
2017-05-05 17:43 ` Greg KH
2017-05-05 17:47 ` Patch "scsi: advansys: remove #warning message" has been added to the 3.18-stable tree gregkh
2017-05-05 11:57 ` [PATCH 7/9] [3.18-stable] i2o: hide unsafe ioctl on 64-bit Arnd Bergmann
2017-05-05 17:13 ` Greg KH
2017-05-05 18:36 ` Arnd Bergmann
2017-05-05 20:07 ` Greg KH
2017-05-05 11:57 ` [PATCH 8/9] [3.18-stable] staging: unisys: correctly handle return value from queue_delayed_work() Arnd Bergmann
2017-05-05 17:44 ` Greg KH
2017-05-05 11:57 ` [PATCH 9/9] [3.18-stable] gfs2: remove IS_ERR_VALUE abuse Arnd Bergmann
2017-05-05 17:47 ` gregkh [this message]
2017-05-05 17:48 ` [PATCH 0/9] [3.18-stable] fixes for all remaining known warnings 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=1494006443222125@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.