Received: by 2002:a25:e74b:0:0:0:0:0 with SMTP id e72csp1946418ybh; Thu, 23 Jul 2020 23:59:35 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx4tjQPFSj8mQ2CAFluIbYvuJZFRtpKi6Cfi9Jqg2asAQNfV7BjgP1GoPFVSyma9GyH2Dnn X-Received: by 2002:a17:906:b313:: with SMTP id n19mr7638652ejz.325.1595573975494; Thu, 23 Jul 2020 23:59:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1595573975; cv=none; d=google.com; s=arc-20160816; b=1Fe9UeEGKS/okZNzbsyixfnGueUv97Zmh49s+hHrCViQuy/EYeeIFaOLJYlSNrRXkE wCS6XsW9BAfVfDGzh/VWgSrpdNymJipedR3xqh5qgj2BellamODRc0/Q3IQwVpLcBf4p iNYFnKP38dbQJ0VtI25Q6/sqY8vn8JApdzX39N6q07GZ2LJqyuBt1PTKLQVVBxfoxfND gaTTZy+4cTPlNKDx8xIVP6eARTpbJs8N2sIt98cDYDnGhlgypI3B5cFHfegzPjgclgsI NJzLqPCD0s52ROpq8ePL1wgAEOmiVAFWuT/J6DsXLf+cuejo+IOH0w+mewo6AqZePu/Y +Oaw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=VJAKxPBdixrXbpNZKy78Vim+KUv88dzE6slZZ7Oxy4Y=; b=y+fZRng0CcWVPnqzLcp+Rwoeo5cQPaOK/xWr9pvJ3Vpo8dfjyr1rQifR0dLqPlJfft PVWv+K+av0wVlmavO+4OyELFlgCyJN9iXRVjcvfl1uN58b2X26K86UyJmBuAnAaJmfWQ wYtctYfUfIB3EEXBuMjyRiGTZ3cWtNpPWCFicewAMS0V/ZFdiL4ZdujNF/40ihzqMsvC P9xGRKbCQt0XyBuR7MhjBTm+ffXWvFR+HXg/nY8DwK0zu9c+LXEZ4sJNzwW9xpi2gJc2 3lcpLA80u1bjPqARkZ53oiDEUh4XyCCiSx/2/R6OIkVpk0AvXNrCTrHMXhNpUvr7gzht +rUA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="aVCxZM/L"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id t19si15305ejj.568.2020.07.23.23.59.12; Thu, 23 Jul 2020 23:59:35 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="aVCxZM/L"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726834AbgGXG5p (ORCPT + 99 others); Fri, 24 Jul 2020 02:57:45 -0400 Received: from mail.kernel.org ([198.145.29.99]:44220 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725942AbgGXG5p (ORCPT ); Fri, 24 Jul 2020 02:57:45 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 875D520714; Fri, 24 Jul 2020 06:57:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1595573865; bh=adW6TyA/SPwSkxmNhrl3jn0h03AFaHiMV+zf1Zarero=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=aVCxZM/LaH60D7KBxpNKWQmpMxtoN+V+d3hy3Pc+GwgYUa3Rte5cUjjUueQtJ9Z9K HfqYiXKLnfXpxHfWySNj/Kez/LxKxpxF1uxkCoTRSF5nfhc+AQJv264RWPEWzI5txF 2al36PdHWZYTIg61KP+TwjqY4l2HwV8F1nOPevBU= Date: Fri, 24 Jul 2020 08:57:47 +0200 From: Greg KH To: Madhuparna Bhowmik Cc: David Miller , isdn@linux-pingi.de, arnd@arndb.de, edumazet@google.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, andrianov@ispras.ru, ldv-project@linuxtesting.org Subject: Re: [PATCH] drivers: isdn: capi: Fix data-race bug Message-ID: <20200724065747.GF3880088@kroah.com> References: <20200722172329.16727-1-madhuparnabhowmik10@gmail.com> <20200723.151158.2190104866687627036.davem@davemloft.net> <20200724044807.GA474@madhuparna-HP-Notebook> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200724044807.GA474@madhuparna-HP-Notebook> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jul 24, 2020 at 10:18:07AM +0530, Madhuparna Bhowmik wrote: > On Thu, Jul 23, 2020 at 03:11:58PM -0700, David Miller wrote: > > From: madhuparnabhowmik10@gmail.com > > Date: Wed, 22 Jul 2020 22:53:29 +0530 > > > > > From: Madhuparna Bhowmik > > > > > > In capi_init(), after register_chrdev() the file operation callbacks > > > can be called. However capinc_tty_init() is called later. > > > Since capiminors and capinc_tty_driver are initialized in > > > capinc_tty_init(), their initialization can race with their usage > > > in various callbacks like in capi_release(). > > > > > > Therefore, call capinc_tty_init() before register_chrdev to avoid > > > such race conditions. > > > > > > Found by Linux Driver Verification project (linuxtesting.org). > > > > > > Signed-off-by: Madhuparna Bhowmik > > > > I agree with Arnd that this just exchanges one set of problems for > > another. > > Thanks Arnd and David, for reviewing the patch. > Do you have any suggestions on how to fix this correctly? Based on the installed base of ISDN systems, and the fact that no one has ever actually hit this race and reported it ever, I wouldn't worry about it :) thanks, greg k-h