From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.2 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_PASS,URIBL_BLOCKED,USER_AGENT_MUTT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0E802EB4D12 for ; Thu, 12 Jul 2018 18:25:52 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id C0FAC2147C for ; Thu, 12 Jul 2018 18:25:51 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C0FAC2147C Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=linuxfoundation.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726815AbeGLSgc (ORCPT ); Thu, 12 Jul 2018 14:36:32 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:44296 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726444AbeGLSgc (ORCPT ); Thu, 12 Jul 2018 14:36:32 -0400 Received: from localhost (LFbn-1-12247-202.w90-92.abo.wanadoo.fr [90.92.61.202]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id 769CDDC8; Thu, 12 Jul 2018 18:25:48 +0000 (UTC) Date: Thu, 12 Jul 2018 20:25:45 +0200 From: Greg Kroah-Hartman To: Tycho Andersen Cc: Jiri Slaby , linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org, "Serge E . Hallyn" Subject: Re: [PATCH v4] uart: fix race between uart_put_char() and uart_shutdown() Message-ID: <20180712182545.GA30099@kroah.com> References: <20180706212220.GC3583@cisco.lan> <20180711160744.32074-1-tycho@tycho.ws> <20180712150438.GF22502@kroah.com> <20180712150822.GC13192@cisco.cisco.com> <20180712154015.GC13114@kroah.com> <20180712181846.GD13192@cisco.cisco.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180712181846.GD13192@cisco.cisco.com> User-Agent: Mutt/1.10.0 (2018-05-17) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jul 12, 2018 at 12:18:46PM -0600, Tycho Andersen wrote: > On Thu, Jul 12, 2018 at 05:40:15PM +0200, Greg Kroah-Hartman wrote: > > On Thu, Jul 12, 2018 at 09:08:22AM -0600, Tycho Andersen wrote: > > > On Thu, Jul 12, 2018 at 05:04:38PM +0200, Greg Kroah-Hartman wrote: > > > > On Wed, Jul 11, 2018 at 10:07:44AM -0600, Tycho Andersen wrote: > > > > > + if (uport) > > > > > + spin_lock_irqsave(&uport->lock, flags); > > > > > > > > That's the same thing as just calling uart_port_lock(), why aren't you > > > > doing that? > > > > > > Because the compiler can't seem to "see" through the macros/ref calls, > > > and I get the warning I mentioned here if I use them: > > > > > > https://lkml.org/lkml/2018/7/6/840 > > > > What horrible version of gcc are you using that give you that? Don't > > open-code things just because of a broken compiler. > > I've tried with both 7.3.0 and 5.4.0. I think the reason we see this > here but not elsewhere in the file is because there's an actual > function call (free_page()) in the critical section. > > If we move that out, something like the below patch, it all works for > me. Ick. Which version of this series had the problem? Let me test it out here... thanks, greg k-h