summaryrefslogtreecommitdiffstats
path: root/net/iucv
diff options
context:
space:
mode:
Diffstat (limited to 'net/iucv')
-rw-r--r--net/iucv/af_iucv.c1
-rw-r--r--net/iucv/iucv.c25
2 files changed, 21 insertions, 5 deletions
diff --git a/net/iucv/af_iucv.c b/net/iucv/af_iucv.c
index bda71015885..29f7baa2511 100644
--- a/net/iucv/af_iucv.c
+++ b/net/iucv/af_iucv.c
@@ -644,6 +644,7 @@ static int iucv_sock_sendmsg(struct kiocb *iocb, struct socket *sock,
}
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);
diff --git a/net/iucv/iucv.c b/net/iucv/iucv.c
index cc34ac769a3..a598c738484 100644
--- a/net/iucv/iucv.c
+++ b/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, 1);
- preempt_enable();
+ put_online_cpus();
}
/**
@@ -521,16 +521,22 @@ static int iucv_enable(void)
goto out;
/* Declare per cpu buffers. */
rc = -EIO;
- preempt_disable();
+ get_online_cpus();
for_each_online_cpu(cpu)
+<<<<<<< HEAD:net/iucv/iucv.c
+ smp_call_function_single(cpu, iucv_declare_cpu, NULL, 0, 1);
+=======
smp_call_function_single(cpu, iucv_declare_cpu, NULL, 1);
preempt_enable();
+>>>>>>> 5b664cb235e97afbf34db9c4d77f08ebd725335e:net/iucv/iucv.c
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 +551,13 @@ out:
*/
static void iucv_disable(void)
{
+<<<<<<< HEAD:net/iucv/iucv.c
+ get_online_cpus();
+ on_each_cpu(iucv_retrieve_cpu, NULL, 0, 1);
+ put_online_cpus();
+=======
on_each_cpu(iucv_retrieve_cpu, NULL, 1);
+>>>>>>> 5b664cb235e97afbf34db9c4d77f08ebd725335e:net/iucv/iucv.c
kfree(iucv_path_table);
}
@@ -564,8 +576,11 @@ static int __cpuinit iucv_cpu_notify(struct notifier_block *self,
return NOTIFY_BAD;
iucv_param[cpu] = kmalloc_node(sizeof(union iucv_param),
GFP_KERNEL|GFP_DMA, cpu_to_node(cpu));
- if (!iucv_param[cpu])
+ if (!iucv_param[cpu]) {
+ kfree(iucv_irq_data[cpu]);
+ iucv_irq_data[cpu] = NULL;
return NOTIFY_BAD;
+ }
break;
case CPU_UP_CANCELED:
case CPU_UP_CANCELED_FROZEN:
@@ -598,7 +613,7 @@ static int __cpuinit iucv_cpu_notify(struct notifier_block *self,
return NOTIFY_OK;
}
-static struct notifier_block __cpuinitdata iucv_cpu_notifier = {
+static struct notifier_block __refdata iucv_cpu_notifier = {
.notifier_call = iucv_cpu_notify,
};