]> git.baikalelectronics.ru Git - kernel.git/commit
orangefs: handle zero size write in debugfs
authorDan Carpenter <dan.carpenter@oracle.com>
Fri, 14 Apr 2017 19:11:53 +0000 (22:11 +0300)
committerMike Marshall <hubcap@omnibond.com>
Wed, 26 Apr 2017 18:33:01 +0000 (14:33 -0400)
commit1aaa2be18d05fede6e42ce169570c578fd3a453d
tree482e24eb60a07687094903cf17af88645f3a2fca
parent45ad83b3ad19944e92f5019e6589e5a0148870f0
orangefs: handle zero size write in debugfs

If we write zero bytes to this debugfs file, then it will cause an
underflow when we do copy_from_user(buf, ubuf, count - 1).  Debugfs can
normally only be written to by root so the impact of this is low.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Mike Marshall <hubcap@omnibond.com>
fs/orangefs/orangefs-debugfs.c