]> git.baikalelectronics.ru Git - kernel.git/commit
thermal: int340x: Fix attr.show callback prototype
authorKees Cook <keescook@chromium.org>
Thu, 21 Apr 2022 16:55:04 +0000 (09:55 -0700)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Thu, 21 Apr 2022 18:13:47 +0000 (20:13 +0200)
commit02bb9f3188ae54ce0a591934df4c4f7cd79ef124
treef5a70349233e07ad77a1256f3e26c2c087507876
parent0e63df2d0d54b39e7363398ea63d214be3dfe228
thermal: int340x: Fix attr.show callback prototype

Control Flow Integrity (CFI) instrumentation of the kernel noticed that
the caller, dev_attr_show(), and the callback, odvp_show(), did not have
matching function prototypes, which would cause a CFI exception to be
raised. Correct the prototype by using struct device_attribute instead
of struct kobj_attribute.

Reported-and-tested-by: Joao Moreira <joao@overdrivepizza.com>
Link: https://lore.kernel.org/lkml/067ce8bd4c3968054509831fa2347f4f@overdrivepizza.com/
Fixes: 394bcc140d06 ("thermal/int340x_thermal: Export OEM vendor variables")
Cc: 5.8+ <stable@vger.kernel.org> # 5.8+
Signed-off-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/thermal/intel/int340x_thermal/int3400_thermal.c