configfs: Return -EFBIG from configfs_write_bin_file.
authorPhil Turnbull <phil.turnbull@oracle.com>
Thu, 15 Sep 2016 16:20:12 +0000 (12:20 -0400)
committerChristoph Hellwig <hch@lst.de>
Fri, 16 Sep 2016 10:58:28 +0000 (12:58 +0200)
commit42857cf512cb34c2c8cb50f1e766689d979d64e0
tree6092425f1347606feb4861f799022a56eb1c3e0c
parent024c7e3756d8a42fc41fe8a9488488b9b09d1dcc
configfs: Return -EFBIG from configfs_write_bin_file.

The check for writing more than cb_max_size bytes does not 'goto out' so
it is a no-op which allows users to vmalloc an arbitrary amount.

Fixes: 03607ace807b ("configfs: implement binary attributes")
Cc: stable@kernel.org
Signed-off-by: Phil Turnbull <phil.turnbull@oracle.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
fs/configfs/file.c