]> 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)
commit35f12296d6f47e1bee2791216772f1070f48e867
treedb334ddac88a5e85ebdc9d9737274f87373fd00d
parentbeea5f8bd9170d3d0e6476d33bde88d795ce40b0
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