netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [patch 0/3] iucv / af_iucv patches for net-2.6.26
@ 2008-06-05  9:08 Ursula Braun
  2008-06-05  9:08 ` [patch 1/3] iucv: fix section mismatch warning Ursula Braun
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Ursula Braun @ 2008-06-05  9:08 UTC (permalink / raw)
  To: davem, netdev, linux-s390

-- 
Dave,

the following 3 small patches are intended for 2.6.26.
They are built against git/davem/net-2.6.26
They contain:
iucv:    remove WARNING              (from Heiko Carstens)
iucv:    cpu hotplug fix             (from Heiko Carstens)
af_iucv: exploit message class field (from Ursula Braun)

Regards, Ursula


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

* [patch 1/3] iucv: fix section mismatch warning.
  2008-06-05  9:08 [patch 0/3] iucv / af_iucv patches for net-2.6.26 Ursula Braun
@ 2008-06-05  9:08 ` Ursula Braun
  2008-06-05  9:08 ` [patch 2/3] iucv: prevent cpu hotplug when walking cpu_online_map Ursula Braun
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: Ursula Braun @ 2008-06-05  9:08 UTC (permalink / raw)
  To: davem, netdev, linux-s390; +Cc: Heiko Carstens

[-- Attachment #1: 605-iucv-sections.diff --]
[-- Type: text/plain, Size: 1143 bytes --]

From: Heiko Carstens <heiko.carstens@de.ibm.com>

WARNING: net/iucv/built-in.o(.exit.text+0x9c): Section mismatch in
reference from the function iucv_exit() to the variable
.cpuinit.data:iucv_cpu_notifier

This warning is caused by a reference from unregister_hotcpu_notifier()
from an exit function to a cpuinitdata annotated data structurre.
This is a false positive warning since for the non CPU_HOTPLUG case
unregister_hotcpu_notifier() is a nop.
Use __refdata instead of __cpuinitdata to get rid of the warning.

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Ursula Braun <braunu@de.ibm.com>
---

 net/iucv/iucv.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Index: net-2.6-uschi/net/iucv/iucv.c
===================================================================
--- net-2.6-uschi.orig/net/iucv/iucv.c
+++ net-2.6-uschi/net/iucv/iucv.c
@@ -598,7 +598,7 @@ static int __cpuinit iucv_cpu_notify(str
 	return NOTIFY_OK;
 }
 
-static struct notifier_block __cpuinitdata iucv_cpu_notifier = {
+static struct notifier_block __refdata iucv_cpu_notifier = {
 	.notifier_call = iucv_cpu_notify,
 };
 

-- 

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

* [patch 2/3] iucv: prevent cpu hotplug when walking cpu_online_map.
  2008-06-05  9:08 [patch 0/3] iucv / af_iucv patches for net-2.6.26 Ursula Braun
  2008-06-05  9:08 ` [patch 1/3] iucv: fix section mismatch warning Ursula Braun
@ 2008-06-05  9:08 ` Ursula Braun
  2008-06-05  9:08 ` [patch 3/3] af_iucv: exploit target message class support of IUCV Ursula Braun
  2008-06-09 22:52 ` [patch 0/3] iucv / af_iucv patches for net-2.6.26 David Miller
  3 siblings, 0 replies; 5+ messages in thread
From: Ursula Braun @ 2008-06-05  9:08 UTC (permalink / raw)
  To: davem, netdev, linux-s390; +Cc: Heiko Carstens, Martin Schwidefsky

[-- Attachment #1: 604-iucv-hotplug.diff --]
[-- Type: text/plain, Size: 1693 bytes --]

From: Heiko Carstens <heiko.carstens@de.ibm.com>

The code used preempt_disable() to prevent cpu hotplug, however that
doesn't protect for cpus being added. So use get_online_cpus() instead.

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: Ursula Braun <braunu@de.ibm.com>
---

 net/iucv/iucv.c |   11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

Index: net-2.6-uschi/net/iucv/iucv.c
===================================================================
--- net-2.6-uschi.orig/net/iucv/iucv.c
+++ net-2.6-uschi/net/iucv/iucv.c
@@ -474,14 +474,14 @@ static void iucv_setmask_mp(void)
 {
 	int cpu;
 
-	preempt_disable();
+	get_online_cpus();
 	for_each_online_cpu(cpu)
 		/* Enable all cpus with a declared buffer. */
 		if (cpu_isset(cpu, iucv_buffer_cpumask) &&
 		    !cpu_isset(cpu, iucv_irq_cpumask))
 			smp_call_function_single(cpu, iucv_allow_cpu,
 						 NULL, 0, 1);
-	preempt_enable();
+	put_online_cpus();
 }
 
 /**
@@ -521,16 +521,17 @@ static int iucv_enable(void)
 		goto out;
 	/* Declare per cpu buffers. */
 	rc = -EIO;
-	preempt_disable();
+	get_online_cpus();
 	for_each_online_cpu(cpu)
 		smp_call_function_single(cpu, iucv_declare_cpu, NULL, 0, 1);
-	preempt_enable();
 	if (cpus_empty(iucv_buffer_cpumask))
 		/* No cpu could declare an iucv buffer. */
 		goto out_path;
+	put_online_cpus();
 	return 0;
 
 out_path:
+	put_online_cpus();
 	kfree(iucv_path_table);
 out:
 	return rc;
@@ -545,7 +546,9 @@ out:
  */
 static void iucv_disable(void)
 {
+	get_online_cpus();
 	on_each_cpu(iucv_retrieve_cpu, NULL, 0, 1);
+	put_online_cpus();
 	kfree(iucv_path_table);
 }
 

-- 

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

* [patch 3/3] af_iucv: exploit target message class support of IUCV
  2008-06-05  9:08 [patch 0/3] iucv / af_iucv patches for net-2.6.26 Ursula Braun
  2008-06-05  9:08 ` [patch 1/3] iucv: fix section mismatch warning Ursula Braun
  2008-06-05  9:08 ` [patch 2/3] iucv: prevent cpu hotplug when walking cpu_online_map Ursula Braun
@ 2008-06-05  9:08 ` Ursula Braun
  2008-06-09 22:52 ` [patch 0/3] iucv / af_iucv patches for net-2.6.26 David Miller
  3 siblings, 0 replies; 5+ messages in thread
From: Ursula Braun @ 2008-06-05  9:08 UTC (permalink / raw)
  To: davem, netdev, linux-s390

[-- Attachment #1: 603-af_iucv-class.diff --]
[-- Type: text/plain, Size: 849 bytes --]

From: Ursula Braun <braunu@de.ibm.com>

The first 4 bytes of data to be sent are stored additionally into
the message class field of the send request. A receiving target
program (not an af_iucv socket program) can make use of this
information to pre-screen incoming messages.

Signed-off-by: Ursula Braun <braunu@de.ibm.com>
---

 net/iucv/af_iucv.c |    1 +
 1 file changed, 1 insertion(+)

Index: net-2.6-uschi/net/iucv/af_iucv.c
===================================================================
--- net-2.6-uschi.orig/net/iucv/af_iucv.c
+++ net-2.6-uschi/net/iucv/af_iucv.c
@@ -644,6 +644,7 @@ static int iucv_sock_sendmsg(struct kioc
 		}
 
 		txmsg.class = 0;
+		memcpy(&txmsg.class, skb->data, skb->len >= 4 ? 4 : skb->len);
 		txmsg.tag = iucv->send_tag++;
 		memcpy(skb->cb, &txmsg.tag, 4);
 		skb_queue_tail(&iucv->send_skb_q, skb);

-- 

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

* Re: [patch 0/3] iucv / af_iucv patches for net-2.6.26
  2008-06-05  9:08 [patch 0/3] iucv / af_iucv patches for net-2.6.26 Ursula Braun
                   ` (2 preceding siblings ...)
  2008-06-05  9:08 ` [patch 3/3] af_iucv: exploit target message class support of IUCV Ursula Braun
@ 2008-06-09 22:52 ` David Miller
  3 siblings, 0 replies; 5+ messages in thread
From: David Miller @ 2008-06-09 22:52 UTC (permalink / raw)
  To: braunu; +Cc: netdev, linux-s390

From: Ursula Braun <braunu@de.ibm.com>
Date: Thu, 05 Jun 2008 11:08:37 +0200

> the following 3 small patches are intended for 2.6.26.
> They are built against git/davem/net-2.6.26
> They contain:
> iucv:    remove WARNING              (from Heiko Carstens)
> iucv:    cpu hotplug fix             (from Heiko Carstens)
> af_iucv: exploit message class field (from Ursula Braun)

All applied and pushed out to net-2.6.26, thanks!

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

end of thread, other threads:[~2008-06-09 22:52 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-06-05  9:08 [patch 0/3] iucv / af_iucv patches for net-2.6.26 Ursula Braun
2008-06-05  9:08 ` [patch 1/3] iucv: fix section mismatch warning Ursula Braun
2008-06-05  9:08 ` [patch 2/3] iucv: prevent cpu hotplug when walking cpu_online_map Ursula Braun
2008-06-05  9:08 ` [patch 3/3] af_iucv: exploit target message class support of IUCV Ursula Braun
2008-06-09 22:52 ` [patch 0/3] iucv / af_iucv patches for net-2.6.26 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).