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] [day] [month] [year] [list]
Date:   Sun, 8 Jan 2023 15:08:33 +0200
From:   Leon Romanovsky <leon@...nel.org>
To:     Geetha sowjanya <gakula@...vell.com>
Cc:     netdev@...r.kernel.org, linux-kernel@...r.kernel.org,
        kuba@...nel.org, pabeni@...hat.com, davem@...emloft.net,
        edumazet@...gle.com, sbhatta@...vell.com, hkelam@...vell.com,
        sgoutham@...vell.com
Subject: Re: [net PATCH] octeontx2-pf: Use GFP_ATOMIC in atomic context

On Sat, Jan 07, 2023 at 10:11:39AM +0530, Geetha sowjanya wrote:
> Use GFP_ATOMIC flag instead of GFP_KERNEL while allocating memory
> in atomic context.

Awesome, but the changed functions don't run in atomic context.

> 
> Fixes: 4af1b64f80fb ("octeontx2-pf: Fix lmtst ID used in aura free")
> Signed-off-by: Sunil Goutham <sgoutham@...vell.com>
> Signed-off-by: Geetha sowjanya <gakula@...vell.com>
> ---
>  drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.c b/drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.c
> index 88f8772a61cd..12e4365d53df 100644
> --- a/drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.c
> +++ b/drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.c
> @@ -886,7 +886,7 @@ static int otx2_sq_init(struct otx2_nic *pfvf, u16 qidx, u16 sqb_aura)
>  	}
>  
>  	sq->sqe_base = sq->sqe->base;
> -	sq->sg = kcalloc(qset->sqe_cnt, sizeof(struct sg_list), GFP_KERNEL);
> +	sq->sg = kcalloc(qset->sqe_cnt, sizeof(struct sg_list), GFP_ATOMIC);
>  	if (!sq->sg)
>  		return -ENOMEM;
>  
> @@ -1378,7 +1378,7 @@ int otx2_sq_aura_pool_init(struct otx2_nic *pfvf)
>  
>  		sq = &qset->sq[qidx];
>  		sq->sqb_count = 0;
> -		sq->sqb_ptrs = kcalloc(num_sqbs, sizeof(*sq->sqb_ptrs), GFP_KERNEL);
> +		sq->sqb_ptrs = kcalloc(num_sqbs, sizeof(*sq->sqb_ptrs), GFP_ATOMIC);
>  		if (!sq->sqb_ptrs) {
>  			err = -ENOMEM;
>  			goto err_mem;
> -- 
> 2.25.1
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ