public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Colin Ian King <colin.king@canonical.com>
Cc: Oleg Drokin <oleg.drokin@intel.com>,
	Andreas Dilger <andreas.dilger@intel.com>,
	James Simmons <jsimmons@infradead.org>,
	NeilBrown <neilb@suse.com>,
	lustre-devel@lists.lustre.org, devel@driverdev.osuosl.org,
	linux-kernel@vger.kernel.org
Subject: Re: staging: lustre: lnet: convert selftest to use workqueues
Date: Tue, 16 Jan 2018 17:53:47 +0100	[thread overview]
Message-ID: <20180116165347.GC3682@kroah.com> (raw)
In-Reply-To: <8724a144-6e84-7237-3a0a-21812901d88a@canonical.com>

On Tue, Jan 16, 2018 at 03:59:58PM +0000, Colin Ian King wrote:
> Hi,
> 
> CoverityScan detected a couple of issues, one of which was introduced
> with the following commit:
> 
> commit 6106c0f82481e686b337ee0c403821fb5c3c17ef
> Author: NeilBrown <neilb@suse.com>
> Date:   Thu Jan 11 15:06:40 2018 +1100
> 
> CoverityScan CID#1464078 ("Uninitialized scalar variable")
> 
> I'm not sure what the expected error return for these conditions are, so
> I've not fixed these as I didn't want to hazard a guess.
> 
> static int
> lnet_selftest_init(void)
> {
>         int nscheds;
>         int rc;
> 
> // note here rc is not initialized
> 
>         int i;
> 
>         lst_serial_wq = alloc_ordered_workqueue("lst_s", 0);
>         if (!lst_serial_wq) {
>                 CERROR("Failed to create serial WI scheduler for LST\n");
>                 return rc;
> 
> // garbage value in rc is returned
> 
>         }
>         lst_init_step = LST_INIT_WI_SERIAL;
> 
>         nscheds = cfs_cpt_number(lnet_cpt_table());
>         lst_test_wq = kvmalloc_array(nscheds, sizeof(lst_test_wq[0]),
>                                         GFP_KERNEL | __GFP_ZERO);
>         if (!lst_test_wq)
>                 goto error;
> 
> // this also returns garbage in rc

Already fixed in my tree by a patch from Arnd and me :)

thanks,

greg k-h

      reply	other threads:[~2018-01-16 16:54 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-16 15:59 staging: lustre: lnet: convert selftest to use workqueues Colin Ian King
2018-01-16 16:53 ` Greg Kroah-Hartman [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=20180116165347.GC3682@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=andreas.dilger@intel.com \
    --cc=colin.king@canonical.com \
    --cc=devel@driverdev.osuosl.org \
    --cc=jsimmons@infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lustre-devel@lists.lustre.org \
    --cc=neilb@suse.com \
    --cc=oleg.drokin@intel.com \
    /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