lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1593977393-21446-2-git-send-email-joshi.k@samsung.com>
Date:   Mon,  6 Jul 2020 00:59:53 +0530
From:   Kanchan Joshi <joshi.k@...sung.com>
To:     axboe@...nel.dk
Cc:     linux-block@...r.kernel.org, linux-kernel@...r.kernel.org,
        Damien.LeMoal@....com, Kanchan Joshi <joshi.k@...sung.com>,
        Selvakumar S <selvakuma.s1@...sung.com>,
        Nitesh Shetty <nj.shetty@...sung.com>,
        Javier Gonzalez <javier.gonz@...sung.com>
Subject: [PATCH v2] block: fix error code for zone-append

Avoid returning success when max_append_sectors is zero. This prevents
infinite loop in bio_iov_iter_get_pages().

Signed-off-by: Kanchan Joshi <joshi.k@...sung.com>
Signed-off-by: Selvakumar S <selvakuma.s1@...sung.com>
Signed-off-by: Nitesh Shetty <nj.shetty@...sung.com>
Signed-off-by: Javier Gonzalez <javier.gonz@...sung.com>
Reviewed-by: Damien Le Moal <damien.lemoal@....com>
---
 block/bio.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/block/bio.c b/block/bio.c
index a7366c0..0cecdbc 100644
--- a/block/bio.c
+++ b/block/bio.c
@@ -1044,7 +1044,7 @@ static int __bio_iov_append_get_pages(struct bio *bio, struct iov_iter *iter)
 	size_t offset;
 
 	if (WARN_ON_ONCE(!max_append_sectors))
-		return 0;
+		return -EINVAL;
 
 	/*
 	 * Move page array up in the allocated memory for the bio vecs as far as
-- 
2.7.4

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ