From: Greg KH <gregkh@linuxfoundation.org>
To: James Simmons <jsimmons@infradead.org>
Cc: Oleg Drokin <oleg.drokin@intel.com>,
devel@driverdev.osuosl.org, andreas.dilger@intel.com,
kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org,
Christophe JAILLET <christophe.jaillet@wanadoo.fr>,
emoly.liu@intel.com, lustre-devel@lists.lustre.org
Subject: Re: [PATCH 2/2] staging: lustre: obdclass: Add handling of error returned by lustre_cfg_new
Date: Mon, 7 Nov 2016 11:40:30 +0100 [thread overview]
Message-ID: <20161107104030.GB19871@kroah.com> (raw)
In-Reply-To: <alpine.LFD.2.20.1611070404180.21293@casper.infradead.org>
On Mon, Nov 07, 2016 at 04:10:16AM +0000, James Simmons wrote:
>
> > On Nov 6, 2016, at 12:11 PM, Christophe JAILLET wrote:
> >
> > > 'lustre_cfg_new()' can return ERR_PTR(-ENOMEM).
> > > Handle these errors and propagate the error code to the callers.
> > >
> > > Error handling has been rearranged in 'lustre_process_log()' with the
> > > addition of a label in order to free some resources.
> >
> > I wonder if we should just make it return NULL on allocation failure,
> > and then at least the other error handling that is there (i.e. in your other patch)
> > would become correct.
> > This would make handling in mgc_apply_recover_logs incorrect, but it's already
> > geared towards this sort of handling anyway, as it discards the passed error
> > and sets ENOMEM unconditionally (just need to revert 3092c34a in a way).
>
> The header lustre_cfg.h is meant to be a UAPI header file. It is used for
> our userland tools but with the current shape of lustre_cfg.h upstream our
> tools will not build with it. So having kzalloc and kfree in this header
> is incorrect. To do this right I need to update our user land tools as
> well so we should hold off on these patches.
Ok, but the code as-is today is incorrect, so that should get fixed
somehow, soon...
thanks,
greg k-h
next prev parent reply other threads:[~2016-11-07 10:40 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-11-06 17:11 Christophe JAILLET
2016-11-06 17:26 ` Oleg Drokin
2016-11-07 4:10 ` James Simmons
2016-11-07 10:40 ` Greg KH [this message]
2016-11-07 21:33 ` Dilger, Andreas
2016-11-07 22:46 ` Oleg Drokin
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=20161107104030.GB19871@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=andreas.dilger@intel.com \
--cc=christophe.jaillet@wanadoo.fr \
--cc=devel@driverdev.osuosl.org \
--cc=emoly.liu@intel.com \
--cc=jsimmons@infradead.org \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lustre-devel@lists.lustre.org \
--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
Powered by JetHome