From: Tejun Heo Subject: Re: [PATCH 2/2] cgroups: fix cgroup_event_listener error handling Date: Tue, 8 Jan 2013 10:08:28 -0800 Message-ID: <20130108180828.GA3926@htj.dyndns.org> References: <1357333518-28899-1-git-send-email-gthelen@google.com> <1357333518-28899-2-git-send-email-gthelen@google.com> <20130107174427.GM3926@htj.dyndns.org> <50EBBC9C.7060909@huawei.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:sender:date:from:to:cc:subject:message-id:references :mime-version:content-type:content-disposition:in-reply-to :user-agent; bh=vsrnf/FreI3Wiyfp1pyeE+IcF/ehZkg2oN5VxiBIeqw=; b=GMv5dxiX5QDKlHQMyLk42y7MwkMW1M2t+eCnu2aN7tlyraRsydThd3+5HYSVEZqVGU 7KNjIuCxRmSOO2cgduNPt/lg6RcjFXEL+i/ENGLnGMUXvXvtqtDIKagr6rAzsqiLqEKp setQ7CgAiUZjQgdGm0T6nPcfqITcVf9+qKHvkzaZD3slteA/SBOSXLZ6uKozMOojfH5P bhIR94AeZMykn1CizkmjpOOtX1R/uSQqHsnOX0GV+pmeS3ap+oGOM74Ytb945jX+AvK+ e2XQR9Dmg6tTipab5mZ8ApY0ZHBFcqGClmezZRvlntaZTK21tRXOyMcERzSDrMLvcz9j Ry+Q== Content-Disposition: inline In-Reply-To: <50EBBC9C.7060909-hv44wF8Li93QT0dZR+AlfA@public.gmane.org> List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: containers-bounces-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org Errors-To: containers-bounces-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org To: Li Zefan Cc: containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org, linux-doc-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, cgroups-u79uwXL29TY76Z2rM5mHXA@public.gmane.org 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 program > > exit code was undefined if either of these opens failed. > > > > This patch simplifies and corrects cgroup_event_listener.c error > > handling by: > > 1. using err*() rather than printf(),exit() > > 2. depending on process exit to close open files > > > > With this patch failures always return non-zero error. > > > > Signed-off-by: Greg Thelen > > Acked-by: Li Zefan Applied to cgroup/for-3.9. Thanks. -- tejun