From: Oren Laadan Subject: Re: [PATCH] Fix restored pipe usage counts Date: Thu, 03 Feb 2011 08:08:50 -0500 Message-ID: <4D4AA8E2.6040403@cs.columbia.edu> References: <1296586032-5658-1-git-send-email-danms@us.ibm.com> <20110203034756.GR16432@count0.beaverton.ibm.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20110203034756.GR16432-52DBMbEzqgQ/wnmkkaCWp/UQ3DHhIser@public.gmane.org> 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: Matt Helsley Cc: containers-qjLDD68F18O7TbgM5vRIOg@public.gmane.org, Dan Smith List-Id: containers.vger.kernel.org [...] >> + file = fget(fds[1-which]); >> + if (!file) /* this should _never_ happen ! */ > > If it should never happen then this should be: > > BUG_ON(!file); > > that way we see the bug as soon as it's detected rather than having to > dig through the stack and 'step' through the code to figure out the > source of EBADF. I noticed Oren applied this patch and the same never > assertion was made in a few other places so I've inlined a patch. Ok. Queued for v23-rc2. Oren.