]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
video: fbdev: sm712fb: Fix crash in smtcfb_write()
authorZheyu Ma <zheyuma97@gmail.com>
Wed, 2 Mar 2022 14:33:11 +0000 (22:33 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 8 Apr 2022 12:06:41 +0000 (14:06 +0200)
commitaeb635b49530b7d19e140949753409f759ba99be
treee1a08c4f4343746572877f1037e253f7576aa04b
parent1c709e8b71edc7f4929bfe3e263ed5664dac52ba
video: fbdev: sm712fb: Fix crash in smtcfb_write()

[ Upstream commit 4f01d09b2bbfbcb47b3eb305560a7f4857a32260 ]

When the sm712fb driver writes three bytes to the framebuffer, the
driver will crash:

    BUG: unable to handle page fault for address: ffffc90001ffffff
    RIP: 0010:smtcfb_write+0x454/0x5b0
    Call Trace:
     vfs_write+0x291/0xd60
     ? do_sys_openat2+0x27d/0x350
     ? __fget_light+0x54/0x340
     ksys_write+0xce/0x190
     do_syscall_64+0x43/0x90
     entry_SYSCALL_64_after_hwframe+0x44/0xae

Fix it by removing the open-coded endianness fixup-code.

Signed-off-by: Zheyu Ma <zheyuma97@gmail.com>
Signed-off-by: Helge Deller <deller@gmx.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/video/fbdev/sm712fb.c