From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:40133) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RRMYb-0007gL-2a for qemu-devel@nongnu.org; Fri, 18 Nov 2011 06:24:34 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RRMYa-0007Hs-1V for qemu-devel@nongnu.org; Fri, 18 Nov 2011 06:24:33 -0500 Date: Fri, 18 Nov 2011 11:24:29 +0000 From: Stefan Hajnoczi Message-ID: <20111118112429.GC12781@stefanha-thinkpad.localdomain> References: <1321454627-19403-1-git-send-email-armbru@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1321454627-19403-1-git-send-email-armbru@redhat.com> Subject: Re: [Qemu-devel] [Qemu-trivial] [PATCH] monitor: Fix file_completion() to check for stat() failure List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Markus Armbruster Cc: qemu-trivial@nongnu.org, qemu-devel@nongnu.org On Wed, Nov 16, 2011 at 03:43:47PM +0100, Markus Armbruster wrote: > stat() can fail for a file name just read with readdir(). Easiest way > to trigger is a dangling symbolic link --- look ma, no race! When it > fails, file_completion() uses sb.st_mode uninitialized. If the > directory bit happens to be set, it appends a "/" to the completed > name. > > Signed-off-by: Markus Armbruster > --- > monitor.c | 4 ++-- > 1 files changed, 2 insertions(+), 2 deletions(-) Thanks, applied to the trivial patches tree: http://repo.or.cz/w/qemu/stefanha.git/shortlog/refs/heads/trivial-patches I have already sent a pull request including this patch for QEMU 1.0. Stefan