From nobody Sat Apr 27 22:59:02 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1497906089006800.0354869966442; Mon, 19 Jun 2017 14:01:29 -0700 (PDT) Received: from localhost ([::1]:44319 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dN3nb-00013V-3w for importer@patchew.org; Mon, 19 Jun 2017 17:01:27 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:49683) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dN3mU-0000S9-8u for qemu-devel@nongnu.org; Mon, 19 Jun 2017 17:00:19 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dN3mP-00037A-ES for qemu-devel@nongnu.org; Mon, 19 Jun 2017 17:00:18 -0400 Received: from inet-orm.provo.novell.com ([137.65.248.124]:60352 helo=mail.novell.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dN3mP-000369-8J; Mon, 19 Jun 2017 17:00:13 -0400 Received: from brogers1.provo.novell.com (brogers1.dnsdhcp.provo.novell.com [137.65.133.7]) by mail.novell.com with ESMTP (NOT encrypted); Mon, 19 Jun 2017 14:59:57 -0600 From: Bruce Rogers To: qemu-devel@nongnu.org Date: Mon, 19 Jun 2017 14:59:52 -0600 Message-Id: <20170619205952.8601-1-brogers@suse.com> X-Mailer: git-send-email 2.12.2 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [fuzzy] X-Received-From: 137.65.248.124 Subject: [Qemu-devel] [PATCH] 9pfs: local: remove: use correct path component X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Bruce Rogers , groug@kaod.org, qemu-stable@nongnu.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Commit a0e640a8 introduced a path processing error. Pass fstatat the dirpath based path component instead of the entire path. Signed-off-by: Bruce Rogers --- hw/9pfs/9p-local.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/9pfs/9p-local.c b/hw/9pfs/9p-local.c index 1e78b7c9e9..83952eff0a 100644 --- a/hw/9pfs/9p-local.c +++ b/hw/9pfs/9p-local.c @@ -1100,7 +1100,7 @@ static int local_remove(FsContext *ctx, const char *p= ath) goto out; } =20 - if (fstatat(dirfd, path, &stbuf, AT_SYMLINK_NOFOLLOW) < 0) { + if (fstatat(dirfd, name, &stbuf, AT_SYMLINK_NOFOLLOW) < 0) { goto err_out; } =20 --=20 2.12.2