[lxc-devel] [lxc/lxc] 62e041: lxc-cmd-stop: two fixes

GitHub noreply at github.com
Mon Apr 13 21:58:25 UTC 2015


  Branch: refs/heads/master
  Home:   https://github.com/lxc/lxc
  Commit: 62e041610609c8913c3d397a521716819a91f850
      https://github.com/lxc/lxc/commit/62e041610609c8913c3d397a521716819a91f850
  Author: Serge Hallyn <serge.hallyn at ubuntu.com>
  Date:   2015-04-13 (Mon, 13 Apr 2015)

  Changed paths:
    M src/lxc/commands.c

  Log Message:
  -----------
  lxc-cmd-stop: two fixes

These are two fixes for long, long-standing bugs.

1. When we stop a container from the lxc_cmd stop handler, we kill its
init task, then we unfreeze the container to make sure it receives the
signal.  When that unfreeze succeeds, we were immediately returning 0,
without sending a response to the invoker.

2. lxc_cmd returns the length of the field received.  In the case of
an lxc_cmd_stop this is 16.  But a comment claims we expect no response,
only a 0.  In fact the handler does send a response, which may or may
not include an error.  So don't call an error just because we got back a
response.

Signed-off-by: Serge Hallyn <serge.hallyn at ubuntu.com>
Acked-by: Stéphane Graber <stgraber at ubuntu.com>


  Commit: 70642c33073faa6e44e34278633e5f00f4aaf618
      https://github.com/lxc/lxc/commit/70642c33073faa6e44e34278633e5f00f4aaf618
  Author: Tycho Andersen <tycho.andersen at canonical.com>
  Date:   2015-04-13 (Mon, 13 Apr 2015)

  Changed paths:
    M src/lxc/utils.c

  Log Message:
  -----------
  fix integer overflow in setproctitle

1. don't cast to long
2. check overflow before addition

v2: just remove the cast, don't change the type of the variables

Reported-by: Coverity
Signed-off-by: Tycho Andersen <tycho.andersen at canonical.com>
Acked-by: Stéphane Graber <stgraber at ubuntu.com>


  Commit: 284c4b01ccc887c8cee6cf4b59d7e206a09535b9
      https://github.com/lxc/lxc/commit/284c4b01ccc887c8cee6cf4b59d7e206a09535b9
  Author: Tycho Andersen <tycho.andersen at canonical.com>
  Date:   2015-04-13 (Mon, 13 Apr 2015)

  Changed paths:
    M src/lxc/lxccontainer.c

  Log Message:
  -----------
  c/r: no double fclose() of mnts

Reported-by: Coverity
Signed-off-by: Tycho Andersen <tycho.andersen at canonical.com>
Acked-by: Serge E. Hallyn <serge.hallyn at ubuntu.com>


  Commit: dcd1e262744cd37f054264254a7e1472255e6936
      https://github.com/lxc/lxc/commit/dcd1e262744cd37f054264254a7e1472255e6936
  Author: Tycho Andersen <tycho.andersen at canonical.com>
  Date:   2015-04-13 (Mon, 13 Apr 2015)

  Changed paths:
    M src/lxc/lxccontainer.c

  Log Message:
  -----------
  fix NULL dereference

lxc_console dereferences C, so we should check that it is not null and fail if
it is.

Reported-by: Coverity
Signed-off-by: Tycho Andersen <tycho.andersen at canonical.com>
Acked-by: Serge E. Hallyn <serge.hallyn at ubuntu.com>


  Commit: e438ef7c9a4cf256038d1f93c671ded60d09571e
      https://github.com/lxc/lxc/commit/e438ef7c9a4cf256038d1f93c671ded60d09571e
  Author: Tycho Andersen <tycho.andersen at canonical.com>
  Date:   2015-04-13 (Mon, 13 Apr 2015)

  Changed paths:
    M src/lxc/lxccontainer.c

  Log Message:
  -----------
  fix dead code

We've already checked that c is not null above, so the false branch can never
be taken here.

Reported-by: Coverity
Signed-off-by: Tycho Andersen <tycho.andersen at canonical.com>
Acked-by: Serge E. Hallyn <serge.hallyn at ubuntu.com>


  Commit: e97aa8176f8b497ae1dd2fc634f4d94b3bc4632c
      https://github.com/lxc/lxc/commit/e97aa8176f8b497ae1dd2fc634f4d94b3bc4632c
  Author: Laurent Vivier <Laurent at vivier.eu>
  Date:   2015-04-13 (Mon, 13 Apr 2015)

  Changed paths:
    M templates/lxc-fedora.in

  Log Message:
  -----------
  lxc-fedora: manage secondary architectures

URL for packages and LiveOS differs from x86, x86_64 and ARM.

This patch allows to select the good mirror URL according to
the architecture.

Primary architecture: http://mirrors.kernel.org/fedora
Secondary architecture: http://mirrors.kernel.org/fedora-secondary

The managed secondary architectures are only ppc64 and s390x,
the secondary architectures for Fedora 20 (the base of initial bootstrap).

Signed-off-by: Laurent Vivier <Laurent at Vivier.EU>
Acked-by: Serge E. Hallyn <serge.hallyn at ubuntu.com>


Compare: https://github.com/lxc/lxc/compare/4a49dda2341a...e97aa8176f8b


More information about the lxc-devel mailing list