Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751287AbdCQXnz (ORCPT ); Fri, 17 Mar 2017 19:43:55 -0400 Received: from mail-pf0-f169.google.com ([209.85.192.169]:36095 "EHLO mail-pf0-f169.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751094AbdCQXnx (ORCPT ); Fri, 17 Mar 2017 19:43:53 -0400 Date: Fri, 17 Mar 2017 16:15:05 -0700 From: Stephen Hemminger To: Dexuan Cui Cc: "gregkh@linuxfoundation.org" , "Stephen Hemminger" , KY Srinivasan , Haiyang Zhang , "driverdev-devel@linuxdriverproject.org" , "linux-kernel@vger.kernel.org" Subject: Re: [PATCH] vmbus: remove hv_event_tasklet_disable/enable Message-ID: <20170317161505.0270a1b6@xeon-e3> In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1514 Lines: 35 On Thu, 2 Mar 2017 12:32:55 +0000 Dexuan Cui wrote: > With the recent introduction of per-channel tasklet, we need to update > the way we handle the 3 concurrency issues: > > 1. hv_process_channel_removal -> percpu_channel_deq vs. > vmbus_chan_sched -> list_for_each_entry(..., percpu_list); > > 2. vmbus_process_offer -> percpu_channel_enq/deq vs. vmbus_chan_sched. > > 3. vmbus_close_internal vs. the per-channel tasklet vmbus_on_event; > > The first 2 issues can be handled by Stephen's recent patch > "vmbus: use rcu for per-cpu channel list", and the third issue > can be handled by calling tasklet_disable in vmbus_close_internal here. > > We don't need the original hv_event_tasklet_disable/enable since we > now use per-channel tasklet instead of the previous per-CPU tasklet, > and actually we must remove them due to the side effect now: > vmbus_process_offer -> hv_event_tasklet_enable -> tasklet_schedule will > start the per-channel callback prematurely, cauing NULL dereferencing > (the channel may haven't been properly configured to run the callback yet). > > Fixes: 631e63a9f346 ("vmbus: change to per channel tasklet") > > Signed-off-by: Dexuan Cui > Cc: "K. Y. Srinivasan" > Cc: Haiyang Zhang > Cc: Stephen Hemminger It also fixes a number of missed interrupts causing stuck tasks on boot. Please put it in 4.11 Reviewed-by: Stephen Hemminger