qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] 9pfs: local: remove: use correct path component
@ 2017-06-19 20:59 Bruce Rogers
  2017-06-20  7:48 ` Greg Kurz
  0 siblings, 1 reply; 2+ messages in thread
From: Bruce Rogers @ 2017-06-19 20:59 UTC (permalink / raw)
  To: qemu-devel; +Cc: groug, qemu-stable, Bruce Rogers

Commit a0e640a8 introduced a path processing error.
Pass fstatat the dirpath based path component instead
of the entire path.

Signed-off-by: Bruce Rogers <brogers@suse.com>
---
 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 *path)
         goto out;
     }
 
-    if (fstatat(dirfd, path, &stbuf, AT_SYMLINK_NOFOLLOW) < 0) {
+    if (fstatat(dirfd, name, &stbuf, AT_SYMLINK_NOFOLLOW) < 0) {
         goto err_out;
     }
 
-- 
2.12.2

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [Qemu-devel] [PATCH] 9pfs: local: remove: use correct path component
  2017-06-19 20:59 [Qemu-devel] [PATCH] 9pfs: local: remove: use correct path component Bruce Rogers
@ 2017-06-20  7:48 ` Greg Kurz
  0 siblings, 0 replies; 2+ messages in thread
From: Greg Kurz @ 2017-06-20  7:48 UTC (permalink / raw)
  To: Bruce Rogers; +Cc: qemu-devel, qemu-stable

[-- Attachment #1: Type: text/plain, Size: 894 bytes --]

On Mon, 19 Jun 2017 14:59:52 -0600
Bruce Rogers <brogers@suse.com> wrote:

> Commit a0e640a8 introduced a path processing error.
> Pass fstatat the dirpath based path component instead
> of the entire path.
> 

Good catch. Thanks!

Pushed to https://github.com/gkurz/qemu/commits/9p-next

> Signed-off-by: Bruce Rogers <brogers@suse.com>
> ---
>  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 *path)
>          goto out;
>      }
>  
> -    if (fstatat(dirfd, path, &stbuf, AT_SYMLINK_NOFOLLOW) < 0) {
> +    if (fstatat(dirfd, name, &stbuf, AT_SYMLINK_NOFOLLOW) < 0) {
>          goto err_out;
>      }
>  


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 181 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-06-20  7:48 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-06-19 20:59 [Qemu-devel] [PATCH] 9pfs: local: remove: use correct path component Bruce Rogers
2017-06-20  7:48 ` Greg Kurz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).