qemu-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-commits] [qemu/qemu] 0e5fc9: hw/9pfs: fix error handing in local_i


From: GitHub
Subject: [Qemu-commits] [qemu/qemu] 0e5fc9: hw/9pfs: fix error handing in local_ioc_getversion...
Date: Mon, 10 Feb 2014 11:00:03 -0800

  Branch: refs/heads/master
  Home:   https://github.com/qemu/qemu
  Commit: 0e5fc994d24af4f4f9a1368bf9c2e730c120c549
      
https://github.com/qemu/qemu/commit/0e5fc994d24af4f4f9a1368bf9c2e730c120c549
  Author: Kirill A. Shutemov <address@hidden>
  Date:   2014-02-02 (Sun, 02 Feb 2014)

  Changed paths:
    M hw/9pfs/virtio-9p-local.c

  Log Message:
  -----------
  hw/9pfs: fix error handing in local_ioc_getversion()

v9fs_co_st_gen() expects to see error code in errno, not in return code.

Let's fix this.

Signed-off-by: Kirill A. Shutemov <address@hidden>
Signed-off-by: Aneesh Kumar K.V <address@hidden>


  Commit: b9317661d13230ec9fd1162625b7f812c0cacd37
      
https://github.com/qemu/qemu/commit/b9317661d13230ec9fd1162625b7f812c0cacd37
  Author: Kirill A. Shutemov <address@hidden>
  Date:   2014-02-02 (Sun, 02 Feb 2014)

  Changed paths:
    M hw/9pfs/virtio-9p-handle.c

  Log Message:
  -----------
  hw/9pfs: handle undefined FS_IOC_GETVERSION case in handle_ioc_getversion()

All get_st_gen() implementations except handle_ioc_getversion() have
guard for undefined FS_IOC_GETVERSION. Let's add it there too.

Signed-off-by: Kirill A. Shutemov <address@hidden>
Signed-off-by: Aneesh Kumar K.V <address@hidden>


  Commit: 1a9978a51a17a26fd07e1b46f31ceeb9772fc191
      
https://github.com/qemu/qemu/commit/1a9978a51a17a26fd07e1b46f31ceeb9772fc191
  Author: Kirill A. Shutemov <address@hidden>
  Date:   2014-02-02 (Sun, 02 Feb 2014)

  Changed paths:
    M hw/9pfs/virtio-9p-handle.c
    M hw/9pfs/virtio-9p-local.c
    M hw/9pfs/virtio-9p-proxy.c

  Log Message:
  -----------
  hw/9pfs: make get_st_gen() return ENOTTY error on special files

Currently we silently ignore getversion requests for anything except
file or directory. Let's instead return ENOTTY error to indicate that
getversion is not supported. It makes implementation consistent on
all not-supported cases.

Signed-off-by: Kirill A. Shutemov <address@hidden>
Signed-off-by: Aneesh Kumar K.V <address@hidden>


  Commit: f8b7ee38b3ed4ec2da5cc0529cf0cf82c8589805
      
https://github.com/qemu/qemu/commit/f8b7ee38b3ed4ec2da5cc0529cf0cf82c8589805
  Author: Kirill A. Shutemov <address@hidden>
  Date:   2014-02-02 (Sun, 02 Feb 2014)

  Changed paths:
    M hw/9pfs/cofile.c
    M hw/9pfs/virtio-9p.c

  Log Message:
  -----------
  hw/9pfs: fix P9_STATS_GEN handling

Currently we fail getattr request altogether if we can't read
P9_STATS_GEN for some reason. It breaks valid use cases:

E.g let's assume we have non-readable directory with execution bit set
on host and we export it to client over 9p On host we can chdir into
directory, but not open directory on read and list content.

But if client will try to call getattr (as part of chdir(2)) for the
directory it will fail with -EACCES. It happens because we try to open
the directory on read to call ioctl(FS_IOC_GETVERSION), it fails and we
return the error code to client.

It's excessive. The solution is to make P9_STATS_GEN failure non-fatal
for getattr request. Just don't set P9_STATS_GEN flag in result mask on
failure.

Signed-off-by: Kirill A. Shutemov <address@hidden>
Signed-off-by: Aneesh Kumar K.V <address@hidden>


  Commit: 702f6df9602a445103c55ac21af11c7aaedb9b34
      
https://github.com/qemu/qemu/commit/702f6df9602a445103c55ac21af11c7aaedb9b34
  Author: Peter Maydell <address@hidden>
  Date:   2014-02-10 (Mon, 10 Feb 2014)

  Changed paths:
    M hw/9pfs/cofile.c
    M hw/9pfs/virtio-9p-handle.c
    M hw/9pfs/virtio-9p-local.c
    M hw/9pfs/virtio-9p-proxy.c
    M hw/9pfs/virtio-9p.c

  Log Message:
  -----------
  Merge remote-tracking branch 'remotes/kvaneesh/for-upstream' into staging

* remotes/kvaneesh/for-upstream:
  hw/9pfs: fix P9_STATS_GEN handling
  hw/9pfs: make get_st_gen() return ENOTTY error on special files
  hw/9pfs: handle undefined FS_IOC_GETVERSION case in handle_ioc_getversion()
  hw/9pfs: fix error handing in local_ioc_getversion()

Signed-off-by: Peter Maydell <address@hidden>


Compare: https://github.com/qemu/qemu/compare/a87f39543a92...702f6df9602a

reply via email to

[Prev in Thread] Current Thread [Next in Thread]