From 754e5a6b2e91f8cb8987e448b545555f36615459 Mon Sep 17 00:00:00 2001 From: Bart Van Assche Date: Sat, 10 Nov 2018 17:48:04 +0000 Subject: [PATCH] scst_lib: Suppress two Coverity false positives about freeing stack memory git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7807 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- scst/src/scst_lib.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/scst/src/scst_lib.c b/scst/src/scst_lib.c index a88edb1c6..7fd4a327d 100644 --- a/scst/src/scst_lib.c +++ b/scst/src/scst_lib.c @@ -5888,6 +5888,7 @@ ssize_t scst_readv(struct file *file, const struct iovec *vec, if (ret < 0) return ret; ret = vfs_iter_read(file, &iter, pos, 0); + BUG_ON(iov == iovstack); kfree(iov); return ret; #elif LINUX_VERSION_CODE >= KERNEL_VERSION(4, 6, 0) || \ @@ -5926,6 +5927,7 @@ ssize_t scst_writev(struct file *file, const struct iovec *vec, file_start_write(file); ret = vfs_iter_write(file, &iter, pos, 0); file_end_write(file); + BUG_ON(iov == iovstack); kfree(iov); return ret; #elif LINUX_VERSION_CODE >= KERNEL_VERSION(4, 6, 0) || \