linux-mtd.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Richard Weinberger <richard@nod.at>
To: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Artem Bityutskiy <dedekind1@gmail.com>,
	Adrian Hunter <adrian.hunter@intel.com>,
	Hyunchul Lee <hyc.lee@gmail.com>,
	Colin Ian King <colin.king@canonical.com>,
	Dan Carpenter <dan.carpenter@oracle.com>,
	linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] ubifs: Fix uninitialized variable in search_dh_cookie()
Date: Sun, 17 Sep 2017 18:53:28 +0200	[thread overview]
Message-ID: <3629896.LZWARU6us7@blindfold> (raw)
In-Reply-To: <1505637141-4700-1-git-send-email-geert@linux-m68k.org>

Am Sonntag, 17. September 2017, 10:32:20 CEST schrieb Geert Uytterhoeven:
> fs/ubifs/tnc.c: In function ‘search_dh_cookie’:
> fs/ubifs/tnc.c:1893: warning: ‘err’ is used uninitialized in this function
> 
> Indeed, err is always used uninitialized.
> 
> According to an original review comment from Hyunchul, acknowledged by
> Richard, err should be initialized to -ENOENT to avoid the first call to
> tnc_next().  But we can achieve the same by reordering the code.
> 
> Reported-by: Hyunchul Lee <hyc.lee@gmail.com>
> Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
> ---
> Compile-tested only.
> 
> Still needed in v4.14-rc1, so I'm sending out the patch I wrote in July.
> This avoids initializing err at the top, so we don't loose the ability to
> catch future uninitialized use.

Geez. ;-\
Applied for 4.14-rc2.

Thanks,
//richard

      reply	other threads:[~2017-09-17 16:53 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-17  8:32 [PATCH] ubifs: Fix uninitialized variable in search_dh_cookie() Geert Uytterhoeven
2017-09-17 16:53 ` Richard Weinberger [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=3629896.LZWARU6us7@blindfold \
    --to=richard@nod.at \
    --cc=adrian.hunter@intel.com \
    --cc=colin.king@canonical.com \
    --cc=dan.carpenter@oracle.com \
    --cc=dedekind1@gmail.com \
    --cc=geert@linux-m68k.org \
    --cc=hyc.lee@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mtd@lists.infradead.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).