From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751784AbcFYUj7 (ORCPT ); Sat, 25 Jun 2016 16:39:59 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:50683 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751357AbcFYUj6 (ORCPT ); Sat, 25 Jun 2016 16:39:58 -0400 Date: Sat, 25 Jun 2016 13:39:59 -0700 From: Greg Kroah-Hartman To: Nicolas Ferre Cc: linux-arm-kernel@lists.infradead.org, Alexandre Belloni , linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org, Boris BREZILLON , Ludovic Desroches Subject: Re: [PATCH 4/4] tty/serial: atmel: enforce tasklet init and termination sequences Message-ID: <20160625203959.GA22761@kroah.com> References: <5a52e1fbd8ec126bebfcd00f35bfe5af605ee914.1466157015.git.nicolas.ferre@atmel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <5a52e1fbd8ec126bebfcd00f35bfe5af605ee914.1466157015.git.nicolas.ferre@atmel.com> User-Agent: Mutt/1.6.1 (2016-04-27) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jun 17, 2016 at 12:05:49PM +0200, Nicolas Ferre wrote: > As some race conditions are identified in the termination process of tasklets, > enforce the atmel_shutdown() sequence. This way we make sure that no new > tasklets or software timer are scheduled during shutdown process. > > An atomic flag is positioned to give this information throughout the code. > > We also remove tasklet_disable() calls that were leading to deadlocks while > stopping the driver. A simpler init/kill sequence is used. > > Signed-off-by: Nicolas Ferre > --- > drivers/tty/serial/atmel_serial.c | 61 ++++++++++++++++++++++++--------------- > 1 file changed, 38 insertions(+), 23 deletions(-) You obviously didn't even test build this patch, as it breaks the build :( please be more careful... greg k-h