[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH] xen: netback: do not unleash netback threads until initialisation is complete
Otherwise netbk_action_thread can reference &netbk->net_schedule_list (via tx_work_todo) before it is initialised. Until now it was zeroed which is probably safe but not exactly robust. Signed-off-by: Ian Campbell <ian.campbell@xxxxxxxxxx> Cc: Jeremy Fitzhardinge <jeremy@xxxxxxxx> Cc: Xu, Dongxiao <dongxiao.xu@xxxxxxxxx> Cc: Paul Durrant <Paul.Durrant@xxxxxxxxxx> --- drivers/xen/netback/netback.c | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/drivers/xen/netback/netback.c b/drivers/xen/netback/netback.c index 4121062..0ed7e61 100644 --- a/drivers/xen/netback/netback.c +++ b/drivers/xen/netback/netback.c @@ -1781,7 +1781,6 @@ static int __init netback_init(void) if (!IS_ERR(netbk->kthread.task)) { kthread_bind(netbk->kthread.task, group); - wake_up_process(netbk->kthread.task); } else { printk(KERN_ALERT "kthread_run() fails at netback\n"); @@ -1807,6 +1806,9 @@ static int __init netback_init(void) spin_lock_init(&netbk->net_schedule_list_lock); atomic_set(&netbk->netfront_count, 0); + + if (MODPARM_netback_kthread) + wake_up_process(netbk->kthread.task); } netbk_copy_skb_mode = NETBK_DONT_COPY_SKB; -- 1.5.6.5 _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |