Message ID | 1488822850-23070-2-git-send-email-groug@kaod.org |
---|---|
State | New |
Headers | show
Return-Path: <qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org> X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3vcSBC6PpSz9s8W for <incoming@patchwork.ozlabs.org>; Tue, 7 Mar 2017 04:55:31 +1100 (AEDT) Received: from localhost ([::1]:45340 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from <qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>) id 1ckwr3-0005Lq-9W for incoming@patchwork.ozlabs.org; Mon, 06 Mar 2017 12:55:29 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:50622) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from <groug@kaod.org>) id 1ckwqE-0005J0-J6 for qemu-devel@nongnu.org; Mon, 06 Mar 2017 12:54:41 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from <groug@kaod.org>) id 1ckwqB-0005dO-DE for qemu-devel@nongnu.org; Mon, 06 Mar 2017 12:54:38 -0500 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:37020) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from <groug@kaod.org>) id 1ckwqB-0005d6-3d for qemu-devel@nongnu.org; Mon, 06 Mar 2017 12:54:35 -0500 Received: from pps.filterd (m0098409.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.20/8.16.0.20) with SMTP id v26HrsHC092786 for <qemu-devel@nongnu.org>; Mon, 6 Mar 2017 12:54:32 -0500 Received: from e06smtp09.uk.ibm.com (e06smtp09.uk.ibm.com [195.75.94.105]) by mx0a-001b2d01.pphosted.com with ESMTP id 2917pm78mu-1 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT) for <qemu-devel@nongnu.org>; Mon, 06 Mar 2017 12:54:32 -0500 Received: from localhost by e06smtp09.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for <qemu-devel@nongnu.org> from <groug@kaod.org>; Mon, 6 Mar 2017 17:54:30 -0000 Received: from d06dlp03.portsmouth.uk.ibm.com (9.149.20.15) by e06smtp09.uk.ibm.com (192.168.101.139) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Mon, 6 Mar 2017 17:54:27 -0000 Received: from b06cxnps4075.portsmouth.uk.ibm.com (d06relay12.portsmouth.uk.ibm.com [9.149.109.197]) by d06dlp03.portsmouth.uk.ibm.com (Postfix) with ESMTP id D82631B0804B; Mon, 6 Mar 2017 17:57:31 +0000 (GMT) Received: from d06av21.portsmouth.uk.ibm.com (d06av21.portsmouth.uk.ibm.com [9.149.105.232]) by b06cxnps4075.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id v26HsRef7995894; Mon, 6 Mar 2017 17:54:27 GMT Received: from d06av21.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id A59AE52043; Mon, 6 Mar 2017 16:53:12 +0000 (GMT) Received: from smtp.lab.toulouse-stg.fr.ibm.com (unknown [9.101.4.1]) by d06av21.portsmouth.uk.ibm.com (Postfix) with ESMTP id 933C652041; Mon, 6 Mar 2017 16:53:12 +0000 (GMT) Received: from bahia.lan (icon-9-164-183-34.megacenter.de.ibm.com [9.164.183.34]) by smtp.lab.toulouse-stg.fr.ibm.com (Postfix) with ESMTP id D50CE220386; Mon, 6 Mar 2017 18:54:25 +0100 (CET) From: Greg Kurz <groug@kaod.org> To: qemu-devel@nongnu.org Date: Mon, 6 Mar 2017 18:54:05 +0100 X-Mailer: git-send-email 2.7.4 In-Reply-To: <1488822850-23070-1-git-send-email-groug@kaod.org> References: <1488822850-23070-1-git-send-email-groug@kaod.org> X-TM-AS-GCONF: 00 X-Content-Scanned: Fidelis XPS MAILER x-cbid: 17030617-0036-0000-0000-0000037AD785 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 17030617-0037-0000-0000-0000155A9AD2 Message-Id: <1488822850-23070-2-git-send-email-groug@kaod.org> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:, , definitions=2017-03-06_17:, , signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 suspectscore=4 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1702020001 definitions=main-1703060146 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [generic] [fuzzy] X-Received-From: 148.163.156.1 Subject: [Qemu-devel] [PULL 1/6] 9pfs: fix bogus fd check in local_remove() X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: <qemu-devel.nongnu.org> List-Unsubscribe: <https://lists.nongnu.org/mailman/options/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=unsubscribe> List-Archive: <http://lists.nongnu.org/archive/html/qemu-devel/> List-Post: <mailto:qemu-devel@nongnu.org> List-Help: <mailto:qemu-devel-request@nongnu.org?subject=help> List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=subscribe> Cc: Peter Maydell <peter.maydell@linaro.org>, Greg Kurz <groug@kaod.org> Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" <qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org> |
diff --git a/hw/9pfs/9p-local.c b/hw/9pfs/9p-local.c index f22a3c3654db..5db7104334d6 100644 --- a/hw/9pfs/9p-local.c +++ b/hw/9pfs/9p-local.c @@ -1008,7 +1008,7 @@ static int local_remove(FsContext *ctx, const char *path) int err = -1; dirfd = local_opendir_nofollow(ctx, dirpath); - if (dirfd) { + if (dirfd == -1) { goto out; }