[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [qemu-xen stable-4.10] block/nfs: fix nfs_client_open for filesize greater than 1TB
commit 30e499bdc9ef2101e08d12ccbec5f8f692a8a70a Author: Peter Lieven <pl@xxxxxxx> AuthorDate: Mon Nov 27 17:00:07 2017 +0100 Commit: Michael Roth <mdroth@xxxxxxxxxxxxxxxxxx> CommitDate: Wed Dec 6 11:40:10 2017 -0600 block/nfs: fix nfs_client_open for filesize greater than 1TB DIV_ROUND_UP(st.st_size, BDRV_SECTOR_SIZE) was overflowing ret (int) if st.st_size is greater than 1TB. Cc: qemu-stable@xxxxxxxxxx Signed-off-by: Peter Lieven <pl@xxxxxxx> Message-id: 1511798407-31129-1-git-send-email-pl@xxxxxxx Signed-off-by: Max Reitz <mreitz@xxxxxxxxxx> (cherry picked from commit f1a7ff770f7d71ee7833ff019aac9d6cc3d13f71) Signed-off-by: Michael Roth <mdroth@xxxxxxxxxxxxxxxxxx> --- block/nfs.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/block/nfs.c b/block/nfs.c index bec16b7..addea26 100644 --- a/block/nfs.c +++ b/block/nfs.c @@ -1,7 +1,7 @@ /* * QEMU Block driver for native access to files on NFS shares * - * Copyright (c) 2014-2016 Peter Lieven <pl@xxxxxxx> + * Copyright (c) 2014-2017 Peter Lieven <pl@xxxxxxx> * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal @@ -496,7 +496,7 @@ out: static int64_t nfs_client_open(NFSClient *client, QDict *options, int flags, int open_flags, Error **errp) { - int ret = -EINVAL; + int64_t ret = -EINVAL; QemuOpts *opts = NULL; Error *local_err = NULL; struct stat st; @@ -686,8 +686,7 @@ static QemuOptsList nfs_create_opts = { static int nfs_file_create(const char *url, QemuOpts *opts, Error **errp) { - int ret = 0; - int64_t total_size = 0; + int64_t ret, total_size; NFSClient *client = g_new0(NFSClient, 1); QDict *options = NULL; -- generated by git-patchbot for /home/xen/git/qemu-xen.git#stable-4.10 _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |