iucv / af_iucv patches for net-2.6.26
Subsystems (4)
cover iucv / af_iucv patches for net-2.6.26
Signature · 10 lines
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
PATCH 1/3 iucv: fix section mismatch warning.
From: Heiko Carstens <[email protected]>
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.
---
net/iucv/iucv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
net/iucv/iucv.c +1 -1
@@ -598,7 +598,7 @@ static int __cpuinit iucv_cpu_notify(strreturn NOTIFY_OK ; } -static struct notifier_block __cpuinitdata iucv_cpu_notifier = { +static struct notifier_block __refdata iucv_cpu_notifier = { .notifier_call = iucv_cpu_notify, };
PATCH 2/3 iucv: prevent cpu hotplug when walking cpu_online_map.
In reply to Ursula BraunFrom: Heiko Carstens <[email protected]>
The code used preempt_disable() to prevent cpu hotplug, however that doesn't protect for cpus being added. So use get_online_cpus() instead.
---
net/iucv/iucv.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-)
net/iucv/iucv.c +7 -4
@@ -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); }
PATCH 3/3 af_iucv: exploit target message class support of IUCV
In reply to Ursula BraunFrom: Ursula Braun <[email protected]>
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.
---
net/iucv/af_iucv.c | 1 + 1 file changed, 1 insertion(+)
net/iucv/af_iucv.c +1 -0
@@ -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);
David Miller
maintainerFrom: Ursula Braun <[email protected]>
Date: Thu, 05 Jun 2008 11:08:37 +0200
Quoted 6 lines
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!