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.6 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_AGENT_SANE_1 autolearn=no 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 BF1FECA9EAE for ; Tue, 29 Oct 2019 10:08:46 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 8DEBB21479 for ; Tue, 29 Oct 2019 10:08:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1572343726; bh=ZANRd+WQW3JT8mVuvajQ37u5wGVAQvgdGCj3+V1EpA0=; h=Date:From:To:Cc:Subject:Reply-To:References:In-Reply-To:List-ID: From; b=dAw+EJgOtFtMlgjcgdACc5aTFdav0Vjo6ekuNtgA55bsGF+LjYHZ+RfJdc1DF+SbD Ckw/jzI8P0rdZkhUCtCv5644hJX4Y8Scw5phMwyr1NqywbD9U1zrdpz0irqJioyFiu bifCAwQZ8o1jhWSEAvtjbrjxeYiBSs2Yq9R2Wejc= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727206AbfJ2KIq (ORCPT ); Tue, 29 Oct 2019 06:08:46 -0400 Received: from mail.kernel.org ([198.145.29.99]:56568 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725867AbfJ2KIq (ORCPT ); Tue, 29 Oct 2019 06:08:46 -0400 Received: from paulmck-ThinkPad-P72.home (50-39-105-78.bvtn.or.frontiernet.net [50.39.105.78]) (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 2957E20830; Tue, 29 Oct 2019 10:08:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1572343725; bh=ZANRd+WQW3JT8mVuvajQ37u5wGVAQvgdGCj3+V1EpA0=; h=Date:From:To:Cc:Subject:Reply-To:References:In-Reply-To:From; b=uj0QeNso2Sj8RsEHDZh6RtZvohVQsmgYcJD7ng6ur1eqIxUFuK8nMMuWiRICpawc5 HXE0zf41GeAwhOSn/jOWu8GQRgj6Va9V8Xdzh+RfMe+DuDWmz3xaWTCkz58k76+R+G gLWkco3GElfCPhEUI6Ds9x8F76mgBq215og8xGhU= Received: by paulmck-ThinkPad-P72.home (Postfix, from userid 1000) id 032BD3521071; Tue, 29 Oct 2019 03:08:45 -0700 (PDT) Date: Tue, 29 Oct 2019 03:08:44 -0700 From: "Paul E. McKenney" To: Stephen Rothwell Cc: James Bottomley , Linux Next Mailing List , Linux Kernel Mailing List , Ryan Attard , "Martin K. Petersen" Subject: Re: linux-next: manual merge of the scsi tree with the rcu tree Message-ID: <20191029100844.GJ20975@paulmck-ThinkPad-P72> Reply-To: paulmck@kernel.org References: <20191029150826.38c26ef8@canb.auug.org.au> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20191029150826.38c26ef8@canb.auug.org.au> User-Agent: Mutt/1.9.4 (2018-02-28) Sender: linux-next-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-next@vger.kernel.org On Tue, Oct 29, 2019 at 03:08:26PM +1100, Stephen Rothwell wrote: > Hi all, > > Today's linux-next merge of the scsi tree got a conflict in: > > drivers/scsi/scsi_sysfs.c > > between commit: > > 81db81f82993 ("drivers/scsi: Replace rcu_swap_protected() with rcu_replace()") > > from the rcu tree and commit: > > d188b0675b21 ("scsi: core: Add sysfs attributes for VPD pages 0h and 89h") > > from the scsi tree. > > I fixed it up (see below) and can carry the fix as necessary. This > is now fixed as far as linux-next is concerned, but any non trivial > conflicts should be mentioned to your upstream maintainer when your tree > is submitted for merging. You may also want to consider cooperating > with the maintainer of the conflicting tree to minimise any particularly > complex conflicts. Looks good to me, thank you very much! Thanx, Paul > -- > Cheers, > Stephen Rothwell > > diff --cc drivers/scsi/scsi_sysfs.c > index cc51f4756077,0fa2ed343c7f..000000000000 > --- a/drivers/scsi/scsi_sysfs.c > +++ b/drivers/scsi/scsi_sysfs.c > @@@ -466,12 -467,18 +467,18 @@@ static void scsi_device_dev_release_use > sdev->request_queue = NULL; > > mutex_lock(&sdev->inquiry_mutex); > - rcu_swap_protected(sdev->vpd_pg0, vpd_pg0, > - lockdep_is_held(&sdev->inquiry_mutex)); > - rcu_swap_protected(sdev->vpd_pg80, vpd_pg80, > - lockdep_is_held(&sdev->inquiry_mutex)); > - rcu_swap_protected(sdev->vpd_pg83, vpd_pg83, > - lockdep_is_held(&sdev->inquiry_mutex)); > - rcu_swap_protected(sdev->vpd_pg89, vpd_pg89, > - lockdep_is_held(&sdev->inquiry_mutex)); > ++ vpd_pg0 = rcu_replace_pointer(sdev->vpd_pg0, vpd_pg0, > ++ lockdep_is_held(&sdev->inquiry_mutex)); > + vpd_pg80 = rcu_replace_pointer(sdev->vpd_pg80, vpd_pg80, > + lockdep_is_held(&sdev->inquiry_mutex)); > + vpd_pg83 = rcu_replace_pointer(sdev->vpd_pg83, vpd_pg83, > + lockdep_is_held(&sdev->inquiry_mutex)); > ++ vpd_pg89 = rcu_replace_pointer(sdev->vpd_pg89, vpd_pg89, > ++ lockdep_is_held(&sdev->inquiry_mutex)); > mutex_unlock(&sdev->inquiry_mutex); > > + if (vpd_pg0) > + kfree_rcu(vpd_pg0, rcu); > if (vpd_pg83) > kfree_rcu(vpd_pg83, rcu); > if (vpd_pg80)