* [PATCH 2.6.19-rc3 1/2] ehea: kzalloc GFP_ATOMIC fix
@ 2006-10-25 11:11 Jan-Bernd Themann
2006-10-27 3:13 ` Andrew Morton
2006-11-01 1:20 ` Jeff Garzik
0 siblings, 2 replies; 4+ messages in thread
From: Jan-Bernd Themann @ 2006-10-25 11:11 UTC (permalink / raw)
To: Jeff Garzik
Cc: Thomas Klein, Jan-Bernd Themann, netdev, linux-kernel, linux-ppc,
Christoph Raisch, Marcus Eder
This patch fixes kzalloc parameters (GFP_ATOMIC instead of GFP_KERNEL)
Signed-off-by: Jan-Bernd Themann <themann@de.ibm.com>
---
diff --git a/drivers/net/ehea/ehea_main.c b/drivers/net/ehea/ehea_main.c
index eb7d44d..4538c99 100644
--- a/drivers/net/ehea/ehea_main.c
+++ b/drivers/net/ehea/ehea_main.c
@@ -586,8 +586,8 @@ int ehea_sense_port_attr(struct ehea_por
u64 hret;
struct hcp_ehea_port_cb0 *cb0;
- cb0 = kzalloc(H_CB_ALIGNMENT, GFP_KERNEL);
- if (!cb0) {
+ cb0 = kzalloc(H_CB_ALIGNMENT, GFP_ATOMIC); /* May be called via */
+ if (!cb0) { /* ehea_neq_tasklet() */
ehea_error("no mem for cb0");
ret = -ENOMEM;
goto out;
@@ -765,8 +765,7 @@ static void ehea_parse_eqe(struct ehea_a
if (EHEA_BMASK_GET(NEQE_PORT_UP, eqe)) {
if (!netif_carrier_ok(port->netdev)) {
- ret = ehea_sense_port_attr(
- port);
+ ret = ehea_sense_port_attr(port);
if (ret) {
ehea_error("failed resensing port "
"attributes");
@@ -1502,7 +1501,7 @@ static void ehea_promiscuous(struct net_
if ((enable && port->promisc) || (!enable && !port->promisc))
return;
- cb7 = kzalloc(H_CB_ALIGNMENT, GFP_KERNEL);
+ cb7 = kzalloc(H_CB_ALIGNMENT, GFP_ATOMIC);
if (!cb7) {
ehea_error("no mem for cb7");
goto out;
@@ -1606,7 +1605,7 @@ static void ehea_add_multicast_entry(str
struct ehea_mc_list *ehea_mcl_entry;
u64 hret;
- ehea_mcl_entry = kzalloc(sizeof(*ehea_mcl_entry), GFP_KERNEL);
+ ehea_mcl_entry = kzalloc(sizeof(*ehea_mcl_entry), GFP_ATOMIC);
if (!ehea_mcl_entry) {
ehea_error("no mem for mcl_entry");
return;
^ permalink raw reply related [flat|nested] 4+ messages in thread* Re: [PATCH 2.6.19-rc3 1/2] ehea: kzalloc GFP_ATOMIC fix
2006-10-25 11:11 [PATCH 2.6.19-rc3 1/2] ehea: kzalloc GFP_ATOMIC fix Jan-Bernd Themann
@ 2006-10-27 3:13 ` Andrew Morton
2006-10-27 11:17 ` Christoph Raisch
2006-11-01 1:20 ` Jeff Garzik
1 sibling, 1 reply; 4+ messages in thread
From: Andrew Morton @ 2006-10-27 3:13 UTC (permalink / raw)
To: Jan-Bernd Themann
Cc: Thomas Klein, Jeff Garzik, Jan-Bernd Themann, netdev,
linux-kernel, linux-ppc, Christoph Raisch, Marcus Eder
On Wed, 25 Oct 2006 13:11:42 +0200
Jan-Bernd Themann <ossthema@de.ibm.com> wrote:
> This patch fixes kzalloc parameters (GFP_ATOMIC instead of GFP_KERNEL)
why?
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 2.6.19-rc3 1/2] ehea: kzalloc GFP_ATOMIC fix
2006-10-27 3:13 ` Andrew Morton
@ 2006-10-27 11:17 ` Christoph Raisch
0 siblings, 0 replies; 4+ messages in thread
From: Christoph Raisch @ 2006-10-27 11:17 UTC (permalink / raw)
To: Andrew Morton
Cc: Thomas Q Klein, Jeff Garzik, Jan-Bernd Themann, netdev,
linux-kernel, linux-ppc, Marcus Eder
Andrew Morton <akpm@osdl.org> wrote on 27.10.2006 05:13:13:
> On Wed, 25 Oct 2006 13:11:42 +0200
> Jan-Bernd Themann <ossthema@de.ibm.com> wrote:
>
> > This patch fixes kzalloc parameters (GFP_ATOMIC instead of GFP_KERNEL)
>
> why?
these few kcallocs run in atomic context in some situations.
therefore GFP_KERNEL is no good idea.
Christoph R.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 2.6.19-rc3 1/2] ehea: kzalloc GFP_ATOMIC fix
2006-10-25 11:11 [PATCH 2.6.19-rc3 1/2] ehea: kzalloc GFP_ATOMIC fix Jan-Bernd Themann
2006-10-27 3:13 ` Andrew Morton
@ 2006-11-01 1:20 ` Jeff Garzik
1 sibling, 0 replies; 4+ messages in thread
From: Jeff Garzik @ 2006-11-01 1:20 UTC (permalink / raw)
To: Jan-Bernd Themann
Cc: Thomas Klein, Jan-Bernd Themann, netdev, linux-kernel, linux-ppc,
Christoph Raisch, Marcus Eder
Jan-Bernd Themann wrote:
> This patch fixes kzalloc parameters (GFP_ATOMIC instead of GFP_KERNEL)
>
> Signed-off-by: Jan-Bernd Themann <themann@de.ibm.com>
applied to #upstream-fixes
In the future, please include a description of -why- patches like this
are needed (I got the info from your replies in this case)
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2006-11-01 1:20 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-10-25 11:11 [PATCH 2.6.19-rc3 1/2] ehea: kzalloc GFP_ATOMIC fix Jan-Bernd Themann
2006-10-27 3:13 ` Andrew Morton
2006-10-27 11:17 ` Christoph Raisch
2006-11-01 1:20 ` Jeff Garzik
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).