[lxc-devel] [PATCH] coverity: ifr_name buffer not NULL terminated

2013-10-29 Thread Dwight Engen
The kernel (net/core/dev_ioctl.c:dev_ioctl()) is going to NULL terminate this name after the copy-in of the ifr, so even though this is a fixed sized array the last byte isn't usable as part of the name. All the ioctls we're using go through this code path. Use the ifr name in the DEBUG message

Re: [lxc-devel] [PATCH] coverity: ifr_name buffer not NULL terminated

2013-10-29 Thread Serge Hallyn
Quoting Dwight Engen (dwight.en...@oracle.com): The kernel (net/core/dev_ioctl.c:dev_ioctl()) is going to NULL terminate this name after the copy-in of the ifr, so even though this is a fixed sized array the last byte isn't usable as part of the name. All the ioctls we're using go through this

[lxc-devel] [lxc/lxc] 5da6aa: coverity: ifr_name buffer not NULL terminated

2013-10-29 Thread GitHub
Branch: refs/heads/master Home: https://github.com/lxc/lxc Commit: 5da6aa8c717f11f99a1e169cb5df47db7656f662 https://github.com/lxc/lxc/commit/5da6aa8c717f11f99a1e169cb5df47db7656f662 Author: Dwight Engen dwight.en...@oracle.com Date: 2013-10-29 (Tue, 29 Oct 2013) Changed

[lxc-devel] [PATCH] coverity 1097618: check for NULL return from calloc before deref

2013-10-29 Thread Dwight Engen
Signed-off-by: Dwight Engen dwight.en...@oracle.com --- src/lxc/cgroup.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/lxc/cgroup.c b/src/lxc/cgroup.c index cf1605a..6aa4495 100644 --- a/src/lxc/cgroup.c +++ b/src/lxc/cgroup.c @@ -1688,6 +1688,8 @@ char *cgroup_to_absolute_path(struct

Re: [lxc-devel] [PATCH] fix free() of args to startl

2013-10-29 Thread Stéphane Graber
On Tue, Oct 29, 2013 at 02:38:00PM -0400, Dwight Engen wrote: Coverity 1076328 marked this as Use after free, which it isn't really, its actually just free()ing the wrong 2nd, 3rd, etc... pointers. Test by passing two or more args to startl, without this change you get segfault when free()ing

Re: [lxc-devel] [PATCH] coverity 1097618: check for NULL return from calloc before deref

2013-10-29 Thread Stéphane Graber
On Tue, Oct 29, 2013 at 02:49:16PM -0400, Dwight Engen wrote: Signed-off-by: Dwight Engen dwight.en...@oracle.com Acked-by: Stéphane Graber stgra...@ubuntu.com --- src/lxc/cgroup.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/lxc/cgroup.c b/src/lxc/cgroup.c index

[lxc-devel] [lxc/lxc] 4e03ae: fix free() of args to startl

2013-10-29 Thread GitHub
Branch: refs/heads/master Home: https://github.com/lxc/lxc Commit: 4e03ae57eddef788856415673b6d9bc0e3370795 https://github.com/lxc/lxc/commit/4e03ae57eddef788856415673b6d9bc0e3370795 Author: Dwight Engen dwight.en...@oracle.com Date: 2013-10-29 (Tue, 29 Oct 2013) Changed

[lxc-devel] [PATCH 1/2] fix cgpath test

2013-10-29 Thread Dwight Engen
Commit 1ea59ad28 sets memory.use_hierarchy, which means that this test cannot use memory.swappiness as its dummy cgroup item to set/unset since writing to it with use_hierarchy set gets -EINVAL. Change test to use memory.soft_limit_in_bytes instead. Signed-off-by: Dwight Engen

[lxc-devel] [PATCH 2/2] coverity 1097616: don't deref NULL when subsystem doesn't have a '.'

2013-10-29 Thread Dwight Engen
Signed-off-by: Dwight Engen dwight.en...@oracle.com --- src/lxc/cgroup.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lxc/cgroup.c b/src/lxc/cgroup.c index 6aa4495..01ed040 100644 --- a/src/lxc/cgroup.c +++ b/src/lxc/cgroup.c @@ -1242,7 +1242,7 @@ char