lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Fri, 21 Aug 2020 10:30:28 +0530
From:   Viresh Kumar <viresh.kumar@...aro.org>
To:     Yue Hu <zbestahu@...il.com>
Cc:     rui.zhang@...el.com, daniel.lezcano@...aro.org,
        amit.kucheria@...durent.com, linux-pm@...r.kernel.org,
        linux-kernel@...r.kernel.org, huyue2@...ong.com,
        zhangwen@...ong.com
Subject: Re: [PATCH] thermal: sysfs: Fall back to vmalloc() for cooling
 device's statistics

On 21-08-20, 10:44, Yue Hu wrote:
> From: Yue Hu <huyue2@...ong.com>
> 
> We observed warning about kzalloc() when register thermal cooling device
> in backlight_device_register(). backlight display can be a cooling device
> since reducing screen brightness will can help reduce temperature.
> 
> However, ->get_max_state of backlight will assign max brightness of 1024
> to states. The memory size can be getting 1MB+ due to states * states.
> That is so large to trigger kmalloc() warning.
> 
> So, let's use kvzalloc() to avoid the issue, also change kfree -> kvfree.
> 
> Suggested-by: Amit Kucheria <amitk@...nel.org>
> Signed-off-by: Yue Hu <huyue2@...ong.com>
> ---
>  drivers/thermal/thermal_sysfs.c | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)

Acked-by: Viresh Kumar <viresh.kumar@...aro.org>

-- 
viresh

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ