* [PATCH net] xen-netback: Use GFP_ATOMIC to allocate hash
@ 2017-03-02 10:50 Anoob Soman
2017-03-02 10:51 ` Paul Durrant
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Anoob Soman @ 2017-03-02 10:50 UTC (permalink / raw)
To: netdev, xen-devel; +Cc: paul.durrant, wei.liu2, Anoob Soman
Allocation of new_hash, inside xenvif_new_hash(), always happen
in softirq context, so use GFP_ATOMIC instead of GFP_KERNEL for new
hash allocation.
Signed-off-by: Anoob Soman <anoob.soman@citrix.com>
---
drivers/net/xen-netback/hash.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/xen-netback/hash.c b/drivers/net/xen-netback/hash.c
index e8c5ddd..3c4c58b 100644
--- a/drivers/net/xen-netback/hash.c
+++ b/drivers/net/xen-netback/hash.c
@@ -39,7 +39,7 @@ static void xenvif_add_hash(struct xenvif *vif, const u8 *tag,
unsigned long flags;
bool found;
- new = kmalloc(sizeof(*entry), GFP_KERNEL);
+ new = kmalloc(sizeof(*entry), GFP_ATOMIC);
if (!new)
return;
--
2.7.4
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH net] xen-netback: Use GFP_ATOMIC to allocate hash
2017-03-02 10:50 [PATCH net] xen-netback: Use GFP_ATOMIC to allocate hash Anoob Soman
@ 2017-03-02 10:51 ` Paul Durrant
2017-03-02 10:52 ` Wei Liu
2017-03-02 22:43 ` David Miller
2 siblings, 0 replies; 4+ messages in thread
From: Paul Durrant @ 2017-03-02 10:51 UTC (permalink / raw)
To: Anoob Soman, netdev@vger.kernel.org,
xen-devel@lists.xenproject.org
Cc: Wei Liu, Anoob Soman
> -----Original Message-----
> From: Anoob Soman [mailto:anoob.soman@citrix.com]
> Sent: 02 March 2017 10:50
> To: netdev@vger.kernel.org; xen-devel@lists.xenproject.org
> Cc: Paul Durrant <Paul.Durrant@citrix.com>; Wei Liu <wei.liu2@citrix.com>;
> Anoob Soman <anoob.soman@citrix.com>
> Subject: [PATCH net] xen-netback: Use GFP_ATOMIC to allocate hash
>
> Allocation of new_hash, inside xenvif_new_hash(), always happen
> in softirq context, so use GFP_ATOMIC instead of GFP_KERNEL for new
> hash allocation.
>
> Signed-off-by: Anoob Soman <anoob.soman@citrix.com>
Acked-by: Paul Durrant <paul.durrant@citrix.com>
> ---
> drivers/net/xen-netback/hash.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/net/xen-netback/hash.c b/drivers/net/xen-
> netback/hash.c
> index e8c5ddd..3c4c58b 100644
> --- a/drivers/net/xen-netback/hash.c
> +++ b/drivers/net/xen-netback/hash.c
> @@ -39,7 +39,7 @@ static void xenvif_add_hash(struct xenvif *vif, const u8
> *tag,
> unsigned long flags;
> bool found;
>
> - new = kmalloc(sizeof(*entry), GFP_KERNEL);
> + new = kmalloc(sizeof(*entry), GFP_ATOMIC);
> if (!new)
> return;
>
> --
> 2.7.4
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH net] xen-netback: Use GFP_ATOMIC to allocate hash
2017-03-02 10:50 [PATCH net] xen-netback: Use GFP_ATOMIC to allocate hash Anoob Soman
2017-03-02 10:51 ` Paul Durrant
@ 2017-03-02 10:52 ` Wei Liu
2017-03-02 22:43 ` David Miller
2 siblings, 0 replies; 4+ messages in thread
From: Wei Liu @ 2017-03-02 10:52 UTC (permalink / raw)
To: Anoob Soman; +Cc: netdev, paul.durrant, wei.liu2, xen-devel
On Thu, Mar 02, 2017 at 10:50:20AM +0000, Anoob Soman wrote:
> Allocation of new_hash, inside xenvif_new_hash(), always happen
> in softirq context, so use GFP_ATOMIC instead of GFP_KERNEL for new
> hash allocation.
>
> Signed-off-by: Anoob Soman <anoob.soman@citrix.com>
Acked-by: Wei Liu <wei.liu2@citrix.com>
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH net] xen-netback: Use GFP_ATOMIC to allocate hash
2017-03-02 10:50 [PATCH net] xen-netback: Use GFP_ATOMIC to allocate hash Anoob Soman
2017-03-02 10:51 ` Paul Durrant
2017-03-02 10:52 ` Wei Liu
@ 2017-03-02 22:43 ` David Miller
2 siblings, 0 replies; 4+ messages in thread
From: David Miller @ 2017-03-02 22:43 UTC (permalink / raw)
To: anoob.soman; +Cc: netdev, paul.durrant, wei.liu2, xen-devel
From: Anoob Soman <anoob.soman@citrix.com>
Date: Thu, 2 Mar 2017 10:50:20 +0000
> Allocation of new_hash, inside xenvif_new_hash(), always happen
> in softirq context, so use GFP_ATOMIC instead of GFP_KERNEL for new
> hash allocation.
>
> Signed-off-by: Anoob Soman <anoob.soman@citrix.com>
Applied.
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2017-03-02 22:43 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-03-02 10:50 [PATCH net] xen-netback: Use GFP_ATOMIC to allocate hash Anoob Soman
2017-03-02 10:51 ` Paul Durrant
2017-03-02 10:52 ` Wei Liu
2017-03-02 22:43 ` David Miller
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).