diff options
author | Lee, Chun-Yi <joeyli.kernel@gmail.com> | 2022-08-08 21:21:58 +0800 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2022-08-23 19:50:43 +0200 |
commit | 7931e28098a4c1a2a6802510b0cbe57546d2049d (patch) | |
tree | a1ae24264c8b266db0f0af7c2fb33b2b1825243d /crypto | |
parent | 1c23f9e627a7b412978b4e852793c5e3c3efc555 (diff) | |
download | linux-7931e28098a4c1a2a6802510b0cbe57546d2049d.tar.bz2 |
thermal/int340x_thermal: handle data_vault when the value is ZERO_SIZE_PTR
In some case, the GDDV returns a package with a buffer which has
zero length. It causes that kmemdup() returns ZERO_SIZE_PTR (0x10).
Then the data_vault_read() got NULL point dereference problem when
accessing the 0x10 value in data_vault.
[ 71.024560] BUG: kernel NULL pointer dereference, address:
0000000000000010
This patch uses ZERO_OR_NULL_PTR() for checking ZERO_SIZE_PTR or
NULL value in data_vault.
Signed-off-by: "Lee, Chun-Yi" <jlee@suse.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'crypto')
0 files changed, 0 insertions, 0 deletions