]> git.baikalelectronics.ru Git - kernel.git/commit
vfs: fs_context: fix up param length parsing in legacy_parse_param
authorJamie Hill-Daniel <jamie@hill-daniel.co.uk>
Tue, 18 Jan 2022 07:06:04 +0000 (08:06 +0100)
committerLinus Torvalds <torvalds@linux-foundation.org>
Tue, 18 Jan 2022 07:23:19 +0000 (09:23 +0200)
commit25e8b8e9dbde56d29d088f1b120b4cd9bc95ee92
treed2c1b136bdbac7375aa5c7e8c37726f2999ae2c7
parent6ab06353b3cf275b81f1d32bdc6f7b0e11feeeb3
vfs: fs_context: fix up param length parsing in legacy_parse_param

The "PAGE_SIZE - 2 - size" calculation in legacy_parse_param() is an
unsigned type so a large value of "size" results in a high positive
value instead of a negative value as expected.  Fix this by getting rid
of the subtraction.

Signed-off-by: Jamie Hill-Daniel <jamie@hill-daniel.co.uk>
Signed-off-by: William Liu <willsroot@protonmail.com>
Tested-by: Salvatore Bonaccorso <carnil@debian.org>
Tested-by: Thadeu Lima de Souza Cascardo <cascardo@canonical.com>
Acked-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
fs/fs_context.c