* linux-next: manual merge of the scsi tree with the rcu tree
@ 2019-10-29 4:08 Stephen Rothwell
2019-10-29 10:08 ` Paul E. McKenney
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Stephen Rothwell @ 2019-10-29 4:08 UTC (permalink / raw)
To: James Bottomley, Paul E. McKenney
Cc: Linux Next Mailing List, Linux Kernel Mailing List, Ryan Attard,
Martin K. Petersen
[-- Attachment #1: Type: text/plain, Size: 2057 bytes --]
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.
--
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)
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: linux-next: manual merge of the scsi tree with the rcu tree
2019-10-29 4:08 linux-next: manual merge of the scsi tree with the rcu tree Stephen Rothwell
@ 2019-10-29 10:08 ` Paul E. McKenney
2019-10-30 1:19 ` Martin K. Petersen
[not found] ` <CAEXS_ixkUAPTz4=ta+=+YLrsnmrAcuG43bLNX11Dzffi4L-Upg@mail.gmail.com>
2 siblings, 0 replies; 4+ messages in thread
From: Paul E. McKenney @ 2019-10-29 10:08 UTC (permalink / raw)
To: Stephen Rothwell
Cc: James Bottomley, Linux Next Mailing List,
Linux Kernel Mailing List, Ryan Attard, Martin K. Petersen
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)
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: linux-next: manual merge of the scsi tree with the rcu tree
2019-10-29 4:08 linux-next: manual merge of the scsi tree with the rcu tree Stephen Rothwell
2019-10-29 10:08 ` Paul E. McKenney
@ 2019-10-30 1:19 ` Martin K. Petersen
[not found] ` <CAEXS_ixkUAPTz4=ta+=+YLrsnmrAcuG43bLNX11Dzffi4L-Upg@mail.gmail.com>
2 siblings, 0 replies; 4+ messages in thread
From: Martin K. Petersen @ 2019-10-30 1:19 UTC (permalink / raw)
To: Stephen Rothwell
Cc: James Bottomley, Paul E. McKenney, Linux Next Mailing List,
Linux Kernel Mailing List, Ryan Attard, Martin K. Petersen
Stephen,
> 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.
Yes, this was expected. Fix is fine, thanks!
--
Martin K. Petersen Oracle Linux Engineering
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: linux-next: manual merge of the scsi tree with the rcu tree
[not found] ` <CAEXS_ixkUAPTz4=ta+=+YLrsnmrAcuG43bLNX11Dzffi4L-Upg@mail.gmail.com>
@ 2019-11-02 13:45 ` Paul E. McKenney
0 siblings, 0 replies; 4+ messages in thread
From: Paul E. McKenney @ 2019-11-02 13:45 UTC (permalink / raw)
To: Ryan Attard
Cc: Stephen Rothwell, James Bottomley, Linux Next Mailing List,
Linux Kernel Mailing List, Martin K. Petersen
On Fri, Nov 01, 2019 at 07:28:22PM -0500, Ryan Attard wrote:
> I can't quite tell if it's just the diff, but it looks like the paired
> kfree_rcu(vpd_pg89, rcu) from the original patch got lopped off. Is there
> somewhere I can see the full resultant file?
I see all four instances of kfree() in origin/master in -next:
git://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
But please do double-check.
Thanx, Paul
> Thanks,
> Ryan
>
> On Mon, Oct 28, 2019, 11:08 PM Stephen Rothwell <sfr@canb.auug.org.au>
> 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.
> >
> > --
> > 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)
> >
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2019-11-02 13:45 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-29 4:08 linux-next: manual merge of the scsi tree with the rcu tree Stephen Rothwell
2019-10-29 10:08 ` Paul E. McKenney
2019-10-30 1:19 ` Martin K. Petersen
[not found] ` <CAEXS_ixkUAPTz4=ta+=+YLrsnmrAcuG43bLNX11Dzffi4L-Upg@mail.gmail.com>
2019-11-02 13:45 ` Paul E. McKenney
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.