Re: [PATCH 2/2] cgroups: fix cgroup_event_listener error handling

2013-01-08 Thread Tejun Heo
On Tue, Jan 08, 2013 at 02:28:44PM +0800, Li Zefan wrote: > > cgroups: fix cgroup_event_listener error handling > > > > The error handling in cgroup_event_listener.c did not correctly deal > > with either an error opening either or > > cgroup.event_control. Due to an uninitialized variable the

Re: [PATCH 2/2] cgroups: fix cgroup_event_listener error handling

2013-01-08 Thread Tejun Heo
On Tue, Jan 08, 2013 at 02:28:44PM +0800, Li Zefan wrote: cgroups: fix cgroup_event_listener error handling The error handling in cgroup_event_listener.c did not correctly deal with either an error opening either control_file or cgroup.event_control. Due to an uninitialized variable

Re: [PATCH 2/2] cgroups: fix cgroup_event_listener error handling

2013-01-07 Thread Li Zefan
> cgroups: fix cgroup_event_listener error handling > > The error handling in cgroup_event_listener.c did not correctly deal > with either an error opening either or > cgroup.event_control. Due to an uninitialized variable the program > exit code was undefined if either of these opens failed. >

Re: [PATCH 2/2] cgroups: fix cgroup_event_listener error handling

2013-01-07 Thread Greg Thelen
On Mon, Jan 07 2013, Tejun Heo wrote: > On Fri, Jan 04, 2013 at 01:05:18PM -0800, Greg Thelen wrote: >> If the command line parameter cannot >> be opened, then cgroup_event_listener prints an error message and >> tries to return an error. However, due to an uninitialized variable >> the return

Re: [PATCH 2/2] cgroups: fix cgroup_event_listener error handling

2013-01-07 Thread Tejun Heo
On Fri, Jan 04, 2013 at 01:05:18PM -0800, Greg Thelen wrote: > If the command line parameter cannot > be opened, then cgroup_event_listener prints an error message and > tries to return an error. However, due to an uninitialized variable > the return value was undefined. > > With this patch

Re: [PATCH 2/2] cgroups: fix cgroup_event_listener error handling

2013-01-07 Thread Tejun Heo
On Fri, Jan 04, 2013 at 01:05:18PM -0800, Greg Thelen wrote: If the absolute-path-to-control-file command line parameter cannot be opened, then cgroup_event_listener prints an error message and tries to return an error. However, due to an uninitialized variable the return value was undefined.

Re: [PATCH 2/2] cgroups: fix cgroup_event_listener error handling

2013-01-07 Thread Greg Thelen
On Mon, Jan 07 2013, Tejun Heo wrote: On Fri, Jan 04, 2013 at 01:05:18PM -0800, Greg Thelen wrote: If the absolute-path-to-control-file command line parameter cannot be opened, then cgroup_event_listener prints an error message and tries to return an error. However, due to an uninitialized

Re: [PATCH 2/2] cgroups: fix cgroup_event_listener error handling

2013-01-07 Thread Li Zefan
cgroups: fix cgroup_event_listener error handling The error handling in cgroup_event_listener.c did not correctly deal with either an error opening either control_file or cgroup.event_control. Due to an uninitialized variable the program exit code was undefined if either of these opens

[PATCH 2/2] cgroups: fix cgroup_event_listener error handling

2013-01-04 Thread Greg Thelen
If the command line parameter cannot be opened, then cgroup_event_listener prints an error message and tries to return an error. However, due to an uninitialized variable the return value was undefined. With this patch such failures always return non-zero error. Compiler warning found this:

[PATCH 2/2] cgroups: fix cgroup_event_listener error handling

2013-01-04 Thread Greg Thelen
If the absolute-path-to-control-file command line parameter cannot be opened, then cgroup_event_listener prints an error message and tries to return an error. However, due to an uninitialized variable the return value was undefined. With this patch such failures always return non-zero error.