All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jiri Kosina <jkosina@suse.cz>
To: Minfei Huang <mnfhuang@gmail.com>
Cc: jpoimboe@redhat.com, sjenning@redhat.com, vojtech@suse.cz,
	live-patching@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] livepatch: Enhance livepatch to support remove patch module dynamically
Date: Wed, 1 Apr 2015 16:13:31 +0200 (CEST)	[thread overview]
Message-ID: <alpine.LNX.2.00.1504011612460.843@pobox.suse.cz> (raw)
In-Reply-To: <CAKoi8FLePnSh+gpYw8GuUTiUiCOAvPdauK7-0TRgQXGUmm1HjQ@mail.gmail.com>

On Wed, 1 Apr 2015, Minfei Huang wrote:

> > > diff --git a/kernel/livepatch/core.c b/kernel/livepatch/core.c
> > > index 3f9f1d6..0266950 100644
> > > --- a/kernel/livepatch/core.c
> > > +++ b/kernel/livepatch/core.c
> > > @@ -502,6 +502,17 @@ static int __klp_disable_patch(struct klp_patch *patch)
> > >       return 0;
> > >  }
> > >
> > > +static int __klp_disable_patch_nolock(struct klp_patch *patch)
> > > +{
> > > +     int ret = 0;
> > > +
> > > +     ret = __klp_disable_patch(patch);
> > > +     if (ret)
> > > +             return ret;
> > > +     module_put(patch->mod);
> > > +     return ret;
> > > +}
> > > +
> >
> > Your patch doesn't solve the problem at all.
> >
> > There is no guarantee that once __klp_disable_patch() returns noone is
> > using the old code any more.
> >
> 
> Yes, thanks.
> 
> The __klp_disable_patch only guarantees that we will never call the
> function in patch module. For now, patch module can never be removed
> from the kernel once it was loaded. It may be inconvenience if we want
> re-load a new patch module replace the old patch module.

Patch stacking is possible though.

-- 
Jiri Kosina
SUSE Labs

  reply	other threads:[~2015-04-01 14:13 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CAKoi8FLeHsdyVnnWLcBxCibFw_B3yXKvV8DBncEOGqBy1_zzuw@mail.gmail.com>
2015-04-01 14:00 ` [PATCH] livepatch: Enhance livepatch to support remove patch module dynamically Minfei Huang
2015-04-01 14:13   ` Jiri Kosina [this message]
2015-04-01 14:40     ` Minfei Huang
2015-04-01 17:22       ` Josh Poimboeuf
     [not found] <1427893812-15936-1-git-send-email-minfei.huang@yahoo.com>
2015-04-01 13:35 ` Jiri Kosina

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=alpine.LNX.2.00.1504011612460.843@pobox.suse.cz \
    --to=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 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.