]> git.baikalelectronics.ru Git - kernel.git/commit
habanalabs: prevent user buff overflow
authorMoti Haimovski <mhaimovski@habana.ai>
Wed, 19 Aug 2020 14:40:33 +0000 (17:40 +0300)
committerOded Gabbay <oded.gabbay@gmail.com>
Mon, 31 Aug 2020 12:10:27 +0000 (15:10 +0300)
commita2b8b43f087b20b3486b62172b8fc6fe709a05c4
treedb334ddac88a5e85ebdc9d9737274f87373fd00d
parentf4f651d6811862e2b654b3c762c03d70b5f86c95
habanalabs: prevent user buff overflow

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>
drivers/misc/habanalabs/common/debugfs.c