summaryrefslogtreecommitdiffstats
path: root/mm/ksm.c
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2019-05-15 12:33:22 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-05-24 21:03:28 +0200
commitbd17cc5a20ae9aaa3ed775f360b75ff93cd66a1d (patch)
treec3b0dd4722b8fe45db470145875937c91cb0b9f9 /mm/ksm.c
parent110080cea0d0e4dfdb0b536e7f8a5633ead6a781 (diff)
downloadlinux-bd17cc5a20ae9aaa3ed775f360b75ff93cd66a1d.tar.gz
linux-bd17cc5a20ae9aaa3ed775f360b75ff93cd66a1d.tar.bz2
linux-bd17cc5a20ae9aaa3ed775f360b75ff93cd66a1d.zip
test_firmware: Use correct snprintf() limit
The limit here is supposed to be how much of the page is left, but it's just using PAGE_SIZE as the limit. The other thing to remember is that snprintf() returns the number of bytes which would have been copied if we had had enough room. So that means that if we run out of space then this code would end up passing a negative value as the limit and the kernel would print an error message. I have change the code to use scnprintf() which returns the number of bytes that were successfully printed (not counting the NUL terminator). Fixes: c92316bf8e94 ("test_firmware: add batched firmware tests") Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Cc: stable <stable@vger.kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'mm/ksm.c')
0 files changed, 0 insertions, 0 deletions