]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
habanalabs: prevent user buff overflow
authorMoti Haimovski <mhaimovski@habana.ai>
Wed, 19 Aug 2020 14:40:33 +0000 (17:40 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 23 Sep 2020 10:59:49 +0000 (12:59 +0200)
commit48ef8d42478f7d139a1da31f316b9736a75b6d79
treef65ea9cbdf88b8f36aa58828b1283c603d94ceba
parent201e44aeb0112177d6a6f1b59f7dbd8a87a6d02e
habanalabs: prevent user buff overflow

[ Upstream commit 6396feabf7a4104a4ddfecc00b8aac535c631a66 ]

This commit fixes a potential debugfs issue that may occur when
reading the clock gating mask into the user buffer since the
user buffer size was not taken into consideration.

Signed-off-by: Moti Haimovski <mhaimovski@habana.ai>
Reviewed-by: Oded Gabbay <oded.gabbay@gmail.com>
Signed-off-by: Oded Gabbay <oded.gabbay@gmail.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/misc/habanalabs/debugfs.c