It makes sense.

I was going to give this a few hours before releasing 0.16.

There's one more new commit in git head, can you try the very latest
and make sure it works for you?

Quoting Mathias Gibbens ([email protected]):
>   This patch also seems to fix a segfault I encountered today after
> upgrading to lxcfs-0.15. My host is Debian jessie 64bit running
> unprivileged jessie containers with systemd as their init. lxcfs-0.13
> works, lxcfs-0.15 segfaults, and lxcfs-git@1204f57 works again.
> 
>   In the short time since lxcfs-0.15 is out, can anyone else confirm
> this?
> 
> Mathias
> 
> On Fri, 2016-01-08 at 20:10 +0000, Serge Hallyn wrote:
> > > From 24e98d74ca279ed2dc8e5a025add5a00737ba952 Mon Sep 17 00:00:00
> > 2001
> > > From: Wolfgang Bumiller <[email protected]>
> > > Date: Fri, 8 Jan 2016 11:09:57 +0100
> > > Subject: [PATCH lxcfs] cgfs: make dorealloc allocate the first
> > batch, too
> > > 
> > > With a short first line the case can be
> > >  *mem = NULL
> > >  oldlen = 0
> > >  newlen = 5 (anything < 50)
> > > making newbatches == oldbatches == 1 causing the
> > >  (newbatches <= oldbatches)
> > > condition to be true.
> > > 
> > > Let realloc() handle *mem==NULL and use
> > > (!*mem || newbatches > oldbatches) as the only condition.
> > > 
> > > Signed-off-by: Wolfgang Bumiller <[email protected]>
> > 
> > Acked-by: Serge E. Hallyn <[email protected]>
> > 
> > Looks good to me, thanks.
> > 
> > > ---
> > >  cgfs.c  | 9 +--------
> > >  lxcfs.c | 2 +-
> > >  2 files changed, 2 insertions(+), 9 deletions(-)
> > > 
> > > diff --git a/cgfs.c b/cgfs.c
> > > index 1f31ed1..e6330e3 100644
> > > --- a/cgfs.c
> > > +++ b/cgfs.c
> > > @@ -77,14 +77,7 @@ static void dorealloc(char **mem, size_t oldlen,
> > size_t
> > > newlen)
> > >       int newbatches = (newlen / BATCH_SIZE) + 1;
> > >       int oldbatches = (oldlen / BATCH_SIZE) + 1;
> > >  
> > > -     if (newbatches <= oldbatches)
> > > -             return;
> > > -
> > > -     if (!*mem) {
> > > -             do {
> > > -                     *mem = malloc(newbatches * BATCH_SIZE);
> > > -             } while (!*mem);
> > > -     } else {
> > > +     if (!*mem || newbatches > oldbatches) {
> > >               char *tmp;
> > >               do {
> > >                       tmp = realloc(*mem, newbatches * BATCH_SIZE);
> > > -- 
> > > 2.1.4
> > > 



> _______________________________________________
> lxc-devel mailing list
> [email protected]
> http://lists.linuxcontainers.org/listinfo/lxc-devel

_______________________________________________
lxc-devel mailing list
[email protected]
http://lists.linuxcontainers.org/listinfo/lxc-devel

Reply via email to