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]
Message-ID: <CA+sq2CdzDfCRc9ZOG7hznm8pJOwozgVgFK-vnqq69VbB_percg@mail.gmail.com>
Date:   Thu, 25 Oct 2018 09:48:19 +0530
From:   Sunil Kovvuri <sunil.kovvuri@...il.com>
To:     weiyongjun1@...wei.com
Cc:     Sunil Goutham <sgoutham@...vell.com>,
        Linu Cherian <lcherian@...vell.com>,
        Geetha sowjanya <gakula@...vell.com>, jerinj@...vell.com,
        Linux Netdev List <netdev@...r.kernel.org>,
        kernel-janitors@...r.kernel.org
Subject: Re: [PATCH] octeontx2-af: Use GFP_ATOMIC under spin lock

On Thu, Oct 25, 2018 at 7:02 AM Wei Yongjun <weiyongjun1@...wei.com> wrote:
>
> The function nix_update_mce_list() is called from
> nix_update_bcast_mce_list(), and a spin lock is held
> here, so we should use GFP_ATOMIC instead.
>
> Fixes: 4b05528ebf0c ("octeontx2-af: Update bcast list upon NIXLF alloc/free")
> Signed-off-by: Wei Yongjun <weiyongjun1@...wei.com>
> ---
>  drivers/net/ethernet/marvell/octeontx2/af/rvu_nix.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/net/ethernet/marvell/octeontx2/af/rvu_nix.c b/drivers/net/ethernet/marvell/octeontx2/af/rvu_nix.c
> index 8890c95..a618e48 100644
> --- a/drivers/net/ethernet/marvell/octeontx2/af/rvu_nix.c
> +++ b/drivers/net/ethernet/marvell/octeontx2/af/rvu_nix.c
> @@ -1294,7 +1294,7 @@ static int nix_update_mce_list(struct nix_mce_list *mce_list,
>                 return 0;
>
>         /* Add a new one to the list, at the tail */
> -       mce = kzalloc(sizeof(*mce), GFP_KERNEL);
> +       mce = kzalloc(sizeof(*mce), GFP_ATOMIC);
>         if (!mce)
>                 return -ENOMEM;
>         mce->idx = idx;
>

Thanks for pointing this and for the patch.
FYI, this driver is no where near to complete, after net-next is open we will
start submitting rest of the patches. There is a subsequent patch
which changes most of the locks to mutex from spinlock, which will
fix this issue as well.

It would be great if above patch is ignored for now, as in it's
current state driver is
not complete and usable. Otherwise also fine, I will change change/fix
this again.

Regards,
Sunil.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ