Home Home > GIT Browse
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Beulich <jbeulich@suse.com>2013-07-02 11:34:13 +0200
committerJan Beulich <jbeulich@suse.com>2013-07-02 11:34:13 +0200
commitcf995dba9b987188fd305920f43b691606df02a6 (patch)
tree184d0dbebd0964e4951ab6de9bcf4355bc54061a
parent30b4eb63ccbfd0455705038ab859c94a198a009b (diff)
-rw-r--r--arch/x86/kernel/process-xen.c12
-rw-r--r--arch/x86/platform/efi/efi-xen.c5
-rw-r--r--drivers/xen/netback/common.h2
-rw-r--r--drivers/xen/netback/netback.c9
-rw-r--r--include/xen/net-util.h3
-rw-r--r--kernel/context_tracking.c7
6 files changed, 14 insertions, 24 deletions
diff --git a/arch/x86/kernel/process-xen.c b/arch/x86/kernel/process-xen.c
index 2762d9cdf3a0..cc8dfc804fd6 100644
--- a/arch/x86/kernel/process-xen.c
+++ b/arch/x86/kernel/process-xen.c
@@ -268,18 +268,6 @@ void exit_idle(void)
}
#endif
-void arch_cpu_idle_prepare(void)
-{
- /*
- * If we're the non-boot CPU, nothing set the stack canary up
- * for us. CPU0 already has it initialized but no harm in
- * doing it again. This is a good place for updating it, as
- * we wont ever return from this function (so the invalid
- * canaries already on the stack wont ever trigger).
- */
- boot_init_stack_canary();
-}
-
void arch_cpu_idle_enter(void)
{
local_touch_nmi();
diff --git a/arch/x86/platform/efi/efi-xen.c b/arch/x86/platform/efi/efi-xen.c
index 9a44a82c38ad..2fe7ea5b2b4b 100644
--- a/arch/x86/platform/efi/efi-xen.c
+++ b/arch/x86/platform/efi/efi-xen.c
@@ -618,7 +618,10 @@ efi_status_t efi_query_variable_store(u32 attributes, unsigned long size)
* that by attempting to use more space than is available.
*/
unsigned long dummy_size = remaining_size + 1024;
- void *dummy = kmalloc(dummy_size, GFP_ATOMIC|__GFP_ZERO);
+ void *dummy = kzalloc(dummy_size, GFP_ATOMIC);
+
+ if (!dummy)
+ return EFI_OUT_OF_RESOURCES;
status = xen_efi_set_variable(efi_dummy_name, &EFI_DUMMY_GUID,
EFI_VARIABLE_NON_VOLATILE |
diff --git a/drivers/xen/netback/common.h b/drivers/xen/netback/common.h
index 76fed2268f72..234f18ef7859 100644
--- a/drivers/xen/netback/common.h
+++ b/drivers/xen/netback/common.h
@@ -269,7 +269,7 @@ struct xen_netbk {
netif_tx_request_t slots[XEN_NETIF_NR_SLOTS_MIN];
} tx;
- wait_queue_head_t netbk_action_wq;
+ wait_queue_head_t action_wq;
struct task_struct *task;
struct xen_netbk_rx {
diff --git a/drivers/xen/netback/netback.c b/drivers/xen/netback/netback.c
index c79a97868ebb..d75a6ffd19b8 100644
--- a/drivers/xen/netback/netback.c
+++ b/drivers/xen/netback/netback.c
@@ -233,8 +233,7 @@ static void flush_notify_list(netif_t *list, unsigned int idx,
static void netbk_rx_schedule(struct xen_netbk_rx *netbk)
{
if (use_kthreads)
- wake_up(&container_of(netbk, struct xen_netbk,
- rx)->netbk_action_wq);
+ wake_up(&container_of(netbk, struct xen_netbk, rx)->action_wq);
else
tasklet_schedule(&netbk->tasklet);
}
@@ -242,7 +241,7 @@ static void netbk_rx_schedule(struct xen_netbk_rx *netbk)
static void netbk_tx_schedule(struct xen_netbk *netbk)
{
if (use_kthreads)
- wake_up(&netbk->netbk_action_wq);
+ wake_up(&netbk->action_wq);
else
tasklet_schedule(&netbk->tx.tasklet);
}
@@ -2012,7 +2011,7 @@ static int netbk_action_thread(void *index)
struct xen_netbk *netbk = &xen_netbk[group];
while (!kthread_should_stop()) {
- wait_event_interruptible(netbk->netbk_action_wq,
+ wait_event_interruptible(netbk->action_wq,
rx_work_todo(netbk) ||
tx_work_todo(netbk) ||
kthread_should_stop());
@@ -2103,7 +2102,7 @@ static int __init netback_init(void)
}
if (use_kthreads) {
- init_waitqueue_head(&netbk->netbk_action_wq);
+ init_waitqueue_head(&netbk->action_wq);
netbk->task = kthread_create(netbk_action_thread,
(void *)(long)group,
"netback/%u", group);
diff --git a/include/xen/net-util.h b/include/xen/net-util.h
index 7b3c52135f79..1defff555dc6 100644
--- a/include/xen/net-util.h
+++ b/include/xen/net-util.h
@@ -14,6 +14,7 @@ static inline int skb_checksum_setup(struct sk_buff *skb,
__be16 *csum = NULL;
int err = -EPROTO;
+ skb_reset_network_header(skb);
if (skb->ip_summed != CHECKSUM_PARTIAL) {
/* A non-CHECKSUM_PARTIAL SKB does not require setup. */
if (!skb_is_gso(skb))
@@ -61,6 +62,8 @@ static inline int skb_checksum_setup(struct sk_buff *skb,
skb->ip_summed = CHECKSUM_PARTIAL;
}
+ skb_probe_transport_header(skb, 0);
+
err = 0;
out:
return err;
diff --git a/kernel/context_tracking.c b/kernel/context_tracking.c
index 6db9776faf0e..e6776de8ea24 100644
--- a/kernel/context_tracking.c
+++ b/kernel/context_tracking.c
@@ -15,7 +15,6 @@
*/
#include <linux/context_tracking.h>
-#include <linux/kconfig.h>
#include <linux/rcupdate.h>
#include <linux/sched.h>
#include <linux/hardirq.h>
@@ -143,9 +142,7 @@ void user_exit(void)
local_irq_restore(flags);
}
-#if IS_ENABLED(CONFIG_KVM)
-
-#include <linux/kvm_host.h>
+#ifndef CONFIG_XEN
void guest_enter(void)
{
@@ -165,7 +162,7 @@ void guest_exit(void)
}
EXPORT_SYMBOL_GPL(guest_exit);
-#endif
+#endif /* CONFIG_XEN */
/**
* context_tracking_task_switch - context switch the syscall callbacks