Re: [PATCH] 9pfs: Fix divide by zero bug

2019-11-23 Thread Greg Kurz
On Fri, 22 Nov 2019 22:53:09 +0100 Christian Schoenebeck wrote: > On Freitag, 22. November 2019 21:00:34 CET Dan Schatzberg wrote: > > Some filesystems may return 0s in statfs (trivially, a FUSE filesystem > > can do so). QEMU should handle this gracefully and just behave the > > same as if statf

Re: [PATCH] 9pfs: Fix divide by zero bug

2019-11-22 Thread Christian Schoenebeck
On Freitag, 22. November 2019 21:00:34 CET Dan Schatzberg wrote: > Some filesystems may return 0s in statfs (trivially, a FUSE filesystem > can do so). QEMU should handle this gracefully and just behave the > same as if statfs failed. Is that actually legal in non-error cases? Shouldn't a driver w

[PATCH] 9pfs: Fix divide by zero bug

2019-11-22 Thread Dan Schatzberg
Some filesystems may return 0s in statfs (trivially, a FUSE filesystem can do so). QEMU should handle this gracefully and just behave the same as if statfs failed. Signed-off-by: Dan Schatzberg --- hw/9pfs/9p.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/hw/9pfs/9p.