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
| ||
|
Date: Wed, 19 Oct 2016 13:34:24 -0600 From: Ross Zwisler <ross.zwisler@...ux.intel.com> To: linux-kernel@...r.kernel.org Cc: Ross Zwisler <ross.zwisler@...ux.intel.com>, "Theodore Ts'o" <tytso@....edu>, Alexander Viro <viro@...iv.linux.org.uk>, Andreas Dilger <adilger.kernel@...ger.ca>, Andrew Morton <akpm@...ux-foundation.org>, Christoph Hellwig <hch@....de>, Dan Williams <dan.j.williams@...el.com>, Dave Chinner <david@...morbit.com>, Jan Kara <jack@...e.cz>, Matthew Wilcox <mawilcox@...rosoft.com>, linux-ext4@...r.kernel.org, linux-fsdevel@...r.kernel.org, linux-mm@...ck.org, linux-nvdimm@...ts.01.org, linux-xfs@...r.kernel.org Subject: [PATCH v8 05/16] dax: remove the last BUG_ON() from fs/dax.c Don't take down the kernel if we get an invalid 'from' and 'length' argument pair. Just warn once and return an error. Signed-off-by: Ross Zwisler <ross.zwisler@...ux.intel.com> Reviewed-by: Christoph Hellwig <hch@....de> Reviewed-by: Jan Kara <jack@...e.cz> --- fs/dax.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/fs/dax.c b/fs/dax.c index e52e754..219fa2b 100644 --- a/fs/dax.c +++ b/fs/dax.c @@ -1194,7 +1194,8 @@ int dax_zero_page_range(struct inode *inode, loff_t from, unsigned length, /* Block boundary? Nothing to do */ if (!length) return 0; - BUG_ON((offset + length) > PAGE_SIZE); + if (WARN_ON_ONCE((offset + length) > PAGE_SIZE)) + return -EINVAL; memset(&bh, 0, sizeof(bh)); bh.b_bdev = inode->i_sb->s_bdev; -- 2.7.4 -- To unsubscribe from this list: send the line "unsubscribe linux-ext4" in the body of a message to majordomo@...r.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists