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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1808276.ZJn2ZeULZY@aspire.rjw.lan>
Date:   Thu, 08 Feb 2018 10:51:41 +0100
From:   "Rafael J. Wysocki" <rjw@...ysocki.net>
To:     Jia-Ju Bai <baijiaju1990@...il.com>
Cc:     lenb@...nel.org, linux-acpi@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH] acpi: osl: Replace GFP_ATOMIC with GFP_KERNEL in acpi_os_execute

On Thursday, January 25, 2018 11:13:41 AM CET Jia-Ju Bai wrote:
> After checking all possible call chains to acpi_os_execute here,
> my tool finds that acpi_os_execute is never called in atomic context.
> And acpi_os_execute calls acpi_debugger_create_thread 
> which calls mutex_lock,
> thus it proves again that acpi_os_execute can 
> call functions which may sleep.
> Thus GFP_ATOMIC is not necessary, and it can be replaced with GFP_KERNEL.
> 
> This is found by a static analysis tool named DCNS written by myself.
> 
> Signed-off-by: Jia-Ju Bai <baijiaju1990@...il.com>
> ---
>  drivers/acpi/osl.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/acpi/osl.c b/drivers/acpi/osl.c
> index 3bb46cb..8ee605e 100644
> --- a/drivers/acpi/osl.c
> +++ b/drivers/acpi/osl.c
> @@ -1066,7 +1066,7 @@ acpi_status acpi_os_execute(acpi_execute_type type,
>  	 * having a static work_struct.
>  	 */
>  
> -	dpc = kzalloc(sizeof(struct acpi_os_dpc), GFP_ATOMIC);
> +	dpc = kzalloc(sizeof(struct acpi_os_dpc), GFP_KERNEL);
>  	if (!dpc)
>  		return AE_NO_MEMORY;
>  
> 

Applied, thanks!


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ