* [PATCH] net/mlx5e: kTLS, Fix GFP_KERNEL in spinlock context
@ 2020-09-03 11:45 Wei Xu
2020-09-03 12:38 ` Wei Xu
0 siblings, 1 reply; 2+ messages in thread
From: Wei Xu @ 2020-09-03 11:45 UTC (permalink / raw)
To: netdev
Cc: davem, saeedm, leon, xuwei5, linuxarm, shameerali.kolothum.thodi,
jonathan.cameron, john.garry, salil.mehta, shiju.jose, jinying,
zhangyi.ac, liguozhu, tangkunshan, huangdaode, Boris Pismenny,
Saeed Mahameed, Jakub Kicinski, Tariq Toukan, linux-rdma,
linux-kernel
Replace GFP_KERNEL with GFP_ATOMIC while resync_post_get_progress_params
is invoked in a spinlock context.
This code was detected with the help of Coccinelle.
Signed-off-by: Wei Xu <xuwei5@hisilicon.com>
---
drivers/net/ethernet/mellanox/mlx5/core/en_accel/ktls_rx.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_accel/ktls_rx.c b/drivers/net/ethernet/mellanox/mlx5/core/en_accel/ktls_rx.c
index acf6d80..1a32435 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/en_accel/ktls_rx.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/en_accel/ktls_rx.c
@@ -247,7 +247,7 @@ resync_post_get_progress_params(struct mlx5e_icosq *sq,
int err;
u16 pi;
- buf = kzalloc(sizeof(*buf), GFP_KERNEL);
+ buf = kzalloc(sizeof(*buf), GFP_ATOMIC);
if (unlikely(!buf)) {
err = -ENOMEM;
goto err_out;
--
2.8.1
^ permalink raw reply related [flat|nested] 2+ messages in thread* Re: [PATCH] net/mlx5e: kTLS, Fix GFP_KERNEL in spinlock context
2020-09-03 11:45 [PATCH] net/mlx5e: kTLS, Fix GFP_KERNEL in spinlock context Wei Xu
@ 2020-09-03 12:38 ` Wei Xu
0 siblings, 0 replies; 2+ messages in thread
From: Wei Xu @ 2020-09-03 12:38 UTC (permalink / raw)
To: netdev
Cc: davem, saeedm, leon, linuxarm, shameerali.kolothum.thodi,
jonathan.cameron, john.garry, salil.mehta, shiju.jose, jinying,
zhangyi.ac, liguozhu, tangkunshan, huangdaode, Boris Pismenny,
Saeed Mahameed, Jakub Kicinski, Tariq Toukan, linux-rdma,
linux-kernel
Hi All,
Sorry for the noise and please ignore it!
I found a nearly same patch has been sent out 2 days before.
Best Regards,
Wei
On 2020/9/3 19:45, Wei Xu wrote:
> Replace GFP_KERNEL with GFP_ATOMIC while resync_post_get_progress_params
> is invoked in a spinlock context.
> This code was detected with the help of Coccinelle.
>
> Signed-off-by: Wei Xu <xuwei5@hisilicon.com>
> ---
> drivers/net/ethernet/mellanox/mlx5/core/en_accel/ktls_rx.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_accel/ktls_rx.c b/drivers/net/ethernet/mellanox/mlx5/core/en_accel/ktls_rx.c
> index acf6d80..1a32435 100644
> --- a/drivers/net/ethernet/mellanox/mlx5/core/en_accel/ktls_rx.c
> +++ b/drivers/net/ethernet/mellanox/mlx5/core/en_accel/ktls_rx.c
> @@ -247,7 +247,7 @@ resync_post_get_progress_params(struct mlx5e_icosq *sq,
> int err;
> u16 pi;
>
> - buf = kzalloc(sizeof(*buf), GFP_KERNEL);
> + buf = kzalloc(sizeof(*buf), GFP_ATOMIC);
> if (unlikely(!buf)) {
> err = -ENOMEM;
> goto err_out;
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-09-03 13:56 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-09-03 11:45 [PATCH] net/mlx5e: kTLS, Fix GFP_KERNEL in spinlock context Wei Xu
2020-09-03 12:38 ` Wei Xu
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).