From: Minfei Huang <mhuang@redhat.com>
To: Josh Poimboeuf <jpoimboe@redhat.com>
Cc: Minfei Huang <mnfhuang@gmail.com>,
sjenning@redhat.com, jkosina@suse.cz, vojtech@suse.cz,
live-patching@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v4] livepatch: Prevent to apply the patch once coming module notifier fails
Date: Fri, 15 May 2015 09:35:49 +0800 [thread overview]
Message-ID: <20150515013549.GA22709@dhcp-128-1.nay.redhat.com> (raw)
In-Reply-To: <20150514143031.GA28717@treble.redhat.com>
On 05/14/15 at 09:30am, Josh Poimboeuf wrote:
> On Thu, May 14, 2015 at 09:51:07AM +0800, Minfei Huang wrote:
> > @@ -891,22 +891,24 @@ static void klp_module_notify_coming(struct klp_patch *patch,
> > int ret;
> >
> > ret = klp_init_object_loaded(patch, obj);
> > - if (ret)
> > - goto err;
> > + if (ret) {
> > + pr_warn("failed to initialize patch '%s' for module '%s' (%d)\n",
> > + pmod->name, mod->name, ret);
> > + goto out;
> > + }
> >
> > if (patch->state == KLP_DISABLED)
> > - return;
> > + goto out;
> >
> > pr_notice("applying patch '%s' to loading module '%s'\n",
> > pmod->name, mod->name);
> >
> > ret = klp_enable_object(obj);
> > - if (!ret)
> > - return;
> > -
> > -err:
> > - pr_warn("failed to apply patch '%s' to module '%s' (%d)\n",
> > - pmod->name, mod->name, ret);
> > + if (ret)
> > + pr_warn("failed to apply patch '%s' to module '%s' (%d)\n",
> > + pmod->name, mod->name, ret);
> > +out:
> > + return ret;
>
> One more minor comment: the out label isn't needed. Instead of "goto
> out", they can just return directly.
Ok, I will remove the label "out" in the next version.
Thanks
Minfei
>
> Other than that, it looks good to me.
>
> Thanks!
>
> --
> Josh
next prev parent reply other threads:[~2015-05-15 1:32 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-14 1:51 Minfei Huang
2015-05-14 14:30 ` Josh Poimboeuf
2015-05-15 1:35 ` Minfei Huang [this message]
2015-05-14 15:05 ` Miroslav Benes
2015-05-15 1:44 ` Minfei Huang
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=20150515013549.GA22709@dhcp-128-1.nay.redhat.com \
--to=mhuang@redhat.com \
--cc=jkosina@suse.cz \
--cc=jpoimboe@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=live-patching@vger.kernel.org \
--cc=mnfhuang@gmail.com \
--cc=sjenning@redhat.com \
--cc=vojtech@suse.cz \
/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
all inboxes | Powered by JetHome®