netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] irda: GFP_ATOMIC cleanups
@ 2013-04-05 20:41 Mathias Krause
  2013-04-05 20:41 ` [PATCH 1/2] irda: use GFP_KERNEL in irda_create() Mathias Krause
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Mathias Krause @ 2013-04-05 20:41 UTC (permalink / raw)
  To: Samuel Ortiz, David S. Miller; +Cc: netdev, Mathias Krause

Hi Samuel, Dave,

this small series changes some obvious misusages of GFP_ATOMIC in the
irda code.

Please apply -- probably to net-next!


Mathias Krause (2):
  irda: use GFP_KERNEL in irda_create()
  irda: use GFP_KERNEL in irda_connect_response()

 net/irda/af_irda.c |    5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

-- 
1.7.10.4

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH 1/2] irda: use GFP_KERNEL in irda_create()
  2013-04-05 20:41 [PATCH 0/2] irda: GFP_ATOMIC cleanups Mathias Krause
@ 2013-04-05 20:41 ` Mathias Krause
  2013-04-05 20:41 ` [PATCH 2/2] irda: use GFP_KERNEL in irda_connect_response() Mathias Krause
  2013-04-08 16:10 ` [PATCH 0/2] irda: GFP_ATOMIC cleanups David Miller
  2 siblings, 0 replies; 4+ messages in thread
From: Mathias Krause @ 2013-04-05 20:41 UTC (permalink / raw)
  To: Samuel Ortiz, David S. Miller; +Cc: netdev, Mathias Krause

irda_create() is called from user context only, therefore has no need
for GFP_ATOMIC.

Signed-off-by: Mathias Krause <minipli@googlemail.com>
---
 net/irda/af_irda.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/irda/af_irda.c b/net/irda/af_irda.c
index d28e7f0..2846cf5 100644
--- a/net/irda/af_irda.c
+++ b/net/irda/af_irda.c
@@ -1120,7 +1120,7 @@ static int irda_create(struct net *net, struct socket *sock, int protocol,
 	}
 
 	/* Allocate networking socket */
-	sk = sk_alloc(net, PF_IRDA, GFP_ATOMIC, &irda_proto);
+	sk = sk_alloc(net, PF_IRDA, GFP_KERNEL, &irda_proto);
 	if (sk == NULL)
 		return -ENOMEM;
 
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH 2/2] irda: use GFP_KERNEL in irda_connect_response()
  2013-04-05 20:41 [PATCH 0/2] irda: GFP_ATOMIC cleanups Mathias Krause
  2013-04-05 20:41 ` [PATCH 1/2] irda: use GFP_KERNEL in irda_create() Mathias Krause
@ 2013-04-05 20:41 ` Mathias Krause
  2013-04-08 16:10 ` [PATCH 0/2] irda: GFP_ATOMIC cleanups David Miller
  2 siblings, 0 replies; 4+ messages in thread
From: Mathias Krause @ 2013-04-05 20:41 UTC (permalink / raw)
  To: Samuel Ortiz, David S. Miller; +Cc: netdev, Mathias Krause

The only call site of irda_connect_response() is irda_accept() -- a
function called from user context only. Therefore it has no need for
GFP_ATOMIC.

Signed-off-by: Mathias Krause <minipli@googlemail.com>
---
 net/irda/af_irda.c |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/net/irda/af_irda.c b/net/irda/af_irda.c
index 2846cf5..a7f6ef1 100644
--- a/net/irda/af_irda.c
+++ b/net/irda/af_irda.c
@@ -305,8 +305,7 @@ static void irda_connect_response(struct irda_sock *self)
 
 	IRDA_DEBUG(2, "%s()\n", __func__);
 
-	skb = alloc_skb(TTP_MAX_HEADER + TTP_SAR_HEADER,
-			GFP_ATOMIC);
+	skb = alloc_skb(TTP_MAX_HEADER + TTP_SAR_HEADER, GFP_KERNEL);
 	if (skb == NULL) {
 		IRDA_DEBUG(0, "%s() Unable to allocate sk_buff!\n",
 			   __func__);
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH 0/2] irda: GFP_ATOMIC cleanups
  2013-04-05 20:41 [PATCH 0/2] irda: GFP_ATOMIC cleanups Mathias Krause
  2013-04-05 20:41 ` [PATCH 1/2] irda: use GFP_KERNEL in irda_create() Mathias Krause
  2013-04-05 20:41 ` [PATCH 2/2] irda: use GFP_KERNEL in irda_connect_response() Mathias Krause
@ 2013-04-08 16:10 ` David Miller
  2 siblings, 0 replies; 4+ messages in thread
From: David Miller @ 2013-04-08 16:10 UTC (permalink / raw)
  To: minipli; +Cc: samuel, netdev

From: Mathias Krause <minipli@googlemail.com>
Date: Fri,  5 Apr 2013 22:41:26 +0200

> Hi Samuel, Dave,
> 
> this small series changes some obvious misusages of GFP_ATOMIC in the
> irda code.
> 
> Please apply -- probably to net-next!

Both applied, thanks.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2013-04-08 16:10 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-04-05 20:41 [PATCH 0/2] irda: GFP_ATOMIC cleanups Mathias Krause
2013-04-05 20:41 ` [PATCH 1/2] irda: use GFP_KERNEL in irda_create() Mathias Krause
2013-04-05 20:41 ` [PATCH 2/2] irda: use GFP_KERNEL in irda_connect_response() Mathias Krause
2013-04-08 16:10 ` [PATCH 0/2] irda: GFP_ATOMIC cleanups 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).