Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp1842736imm; Thu, 12 Jul 2018 08:41:51 -0700 (PDT) X-Google-Smtp-Source: AAOMgpcalWhY6/v3Zt7L++U2gQxu31Rjq7NDNDwdGVvzyt1ggt72ZXByoLNjUcMSC/gGU6D0XXbI X-Received: by 2002:a63:f45:: with SMTP id 5-v6mr2636019pgp.447.1531410111340; Thu, 12 Jul 2018 08:41:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1531410111; cv=none; d=google.com; s=arc-20160816; b=glXaOO2RaPA2Fm2qjWgp3gcXyW75LGa25/oqEoFR5Ljx7Cp3esKt1c9AuLHPYcIFFd Ai4vf7TeaJUYXaQ9v3SkfuXnr5l/CxgdJq/PDsUEQQMTfJzeiW+vuYCFc8mYKE7o1fDn TGAkB0Wn/6RxB71VeC0jIKiyCcCs0a9uLMZSZ2ok5zGXsmaTpOedfxWd2YV6IGu4mcgs NT7RkD7y9AzQmWIuMSjJqRElXQ5fX64IT9EFDAmgJ07HKl5OSgH6Zv90rYbQyjOLrCQ/ LsaL5TE/BfwSqRfj5HWzak9C9VGmf6GLQ/Ou4NdnpMuo7dj603owRqLnNAd7g/J/OvL6 9j/w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:arc-authentication-results; bh=A1rtpy2yu/DBBOqDL/oI6SN4KBp+JA6CnJOzJKyLYDY=; b=cDtrdq88lwQz6S17RbZhnn6B+db/E7EgapbcPupqOCIsojlKzIH8nDtn5FdQ30QjPS Ci5VBfOte4ygG0neXWXS34NeAZUV8td8yLvjm/2qlxys0DG7Db0Vdxc1FfAL3PKaljRZ ZPS1iD5y26g+P/63dni90yHrxFRUYArsyudBErAAZnK/W6Q/5VeA7Y+eKjetvuj884DF 19UfefLPSdGDnHCdXRJ/i7yOWb5o31yxpgY/bLCwsxth4r4jGNuUA3IE8H/tU2FtTit/ xfbmkL3S3i1ow7BSNe4YRJbgbsg05SBmdvlIYeXmBTMlK/jNc/f2i8l0TQqFk810Wrid 8lqw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r39-v6si21967347pld.83.2018.07.12.08.41.35; Thu, 12 Jul 2018 08:41:51 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732401AbeGLPuY (ORCPT + 99 others); Thu, 12 Jul 2018 11:50:24 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:52044 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726816AbeGLPuX (ORCPT ); Thu, 12 Jul 2018 11:50:23 -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 009BCDAB; Thu, 12 Jul 2018 15:40:17 +0000 (UTC) Date: Thu, 12 Jul 2018 17:40:15 +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: <20180712154015.GC13114@kroah.com> References: <20180706212220.GC3583@cisco.lan> <20180711160744.32074-1-tycho@tycho.ws> <20180712150438.GF22502@kroah.com> <20180712150822.GC13192@cisco.cisco.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180712150822.GC13192@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 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. thanks, greg k-h