[lxc-devel] [lxc/lxc] f655ba: lxc-cmd-stop: two fixes

GitHub noreply at github.com
Mon Apr 13 21:59:02 UTC 2015


  Branch: refs/heads/stable-1.1
  Home:   https://github.com/lxc/lxc
  Commit: f655ba6e1817dbc796d3e5ad17f51dde5f57c58d
      https://github.com/lxc/lxc/commit/f655ba6e1817dbc796d3e5ad17f51dde5f57c58d
  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: 81216170c1c2555498573e9fe200e20d3b433b14
      https://github.com/lxc/lxc/commit/81216170c1c2555498573e9fe200e20d3b433b14
  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: e310e136b9de89c9f8596c004afa217f308aea3d
      https://github.com/lxc/lxc/commit/e310e136b9de89c9f8596c004afa217f308aea3d
  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: 216113e77331881d3c45bd4e141a4f458c9a4565
      https://github.com/lxc/lxc/commit/216113e77331881d3c45bd4e141a4f458c9a4565
  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: 53caaac80f6850287251cc5e3a02479fb4a27087
      https://github.com/lxc/lxc/commit/53caaac80f6850287251cc5e3a02479fb4a27087
  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: 8721f7f43185208e0c1802ff2bc03108fd3e3204
      https://github.com/lxc/lxc/commit/8721f7f43185208e0c1802ff2bc03108fd3e3204
  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/1a607cf69a5f...8721f7f43185


More information about the lxc-devel mailing list