public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Mika Westerberg <mika.westerberg@linux.intel.com>
To: "Rafael J. Wysocki" <rjw@rjwysocki.net>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Tejun Heo <tj@kernel.org>, Bjorn Helgaas <bhelgaas@google.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"James E.J. Bottomley" <JBottomley@parallels.com>,
	linux-ide@vger.kernel.org
Subject: Re: [PATCH] sysfs: handle duplicate removal attempts in sysfs_remove_group()
Date: Mon, 25 Nov 2013 12:11:54 +0200	[thread overview]
Message-ID: <20131125101154.GS2281@intel.com> (raw)
In-Reply-To: <3805095.rqdZNnA0Ng@vostro.rjw.lan>

On Sun, Nov 24, 2013 at 02:09:09AM +0100, Rafael J. Wysocki wrote:
> On Sunday, November 24, 2013 12:36:03 AM Rafael J. Wysocki wrote:
> > On Saturday, November 23, 2013 03:07:01 PM Greg Kroah-Hartman wrote:
> > > On Sun, Nov 24, 2013 at 12:12:59AM +0100, Rafael J. Wysocki wrote:
> > > > On Saturday, November 23, 2013 02:53:58 PM Greg Kroah-Hartman wrote:
> 
> [...]
> 
> > > > > 
> > > > > I can revert Mika's patch, as it would be good to catch these kinds of
> > > > > errors.
> > > > 
> > > > Then we'll need to untangle the SATA/SCSI mess triggered by Bjorn in
> > > > https://bugzilla.kernel.org/show_bug.cgi?id=65281. ;-)
> > > 
> > > I have no objection to fixing that, the scsi sysfs handling is "odd" to
> > > say the least...
> > > 
> > > If someone can unwind it, that would be great to see happen...
> > 
> > Well, if I'm bored to death during the xmas holidays, I may look into that.
> 
> In fact, I'm not exactly sure why ata_port_detach() calls ata_tport_delete()
> before scsi_remove_host()?  Is there any particular reason?  Because that
> doesn't seem to be exactly right ...

I tried so that I have your 'PCI: Move device_del() from pci_stop_dev() to
pci_destroy_dev()' applied and then I did following change as you
suggested.

diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c
index 81a94a3919db..07a03f93d640 100644
--- a/drivers/ata/libata-core.c
+++ b/drivers/ata/libata-core.c
@@ -6304,10 +6304,10 @@ static void ata_port_detach(struct ata_port *ap)
 		for (i = 0; i < SATA_PMP_MAX_PORTS; i++)
 			ata_tlink_delete(&ap->pmp_link[i]);
 	}
-	ata_tport_delete(ap);
-
 	/* remove the associated SCSI host */
 	scsi_remove_host(ap->scsi_host);
+
+	ata_tport_delete(ap);
 }
 
 /**

After both patches are applied the warnings are gone :) However, looks like
both are needed since if I only apply one or another, I still get warnings.

  parent reply	other threads:[~2013-11-25 10:05 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-19 13:09 [PATCH] sysfs: handle duplicate removal attempts in sysfs_remove_group() Mika Westerberg
2013-11-19 13:28 ` Rafael J. Wysocki
2013-11-20  6:18 ` Tejun Heo
2013-11-20  9:56   ` [PATCH v2] " Mika Westerberg
2013-11-22 15:43   ` [PATCH] " Bjorn Helgaas
2013-11-22 16:02     ` Tejun Heo
2013-11-25 10:29       ` James Bottomley
2013-11-25 12:43         ` Rafael J. Wysocki
2013-11-22 22:43     ` Rafael J. Wysocki
2013-11-23 22:56     ` Rafael J. Wysocki
2013-11-23 22:53       ` Greg Kroah-Hartman
2013-11-23 23:12         ` Rafael J. Wysocki
2013-11-23 23:07           ` Greg Kroah-Hartman
2013-11-23 23:36             ` Rafael J. Wysocki
2013-11-24  1:09               ` Rafael J. Wysocki
2013-11-24 15:05                 ` Tejun Heo
2013-11-25 10:11                 ` Mika Westerberg [this message]
2013-11-25 10:41                   ` Rafael J. Wysocki
2013-11-25 23:51                     ` Gwendal Grignou
2013-11-25 12:19                   ` [PATCH] ATA: Fix port removal ordering Rafael J. Wysocki
2013-11-27  1:58                     ` Rafael J. Wysocki
2013-11-27  4:34                     ` Jingoo Han
2013-11-27 18:56                     ` Tejun Heo
2013-11-24  0:17             ` [PATCH] PCI: Move device_del() from pci_stop_dev() to pci_destroy_dev() Rafael J. Wysocki
2013-11-25  4:54               ` Yinghai Lu
2013-11-25  4:58                 ` Yinghai Lu
2013-11-25 11:23                   ` Rafael J. Wysocki
2013-11-25 19:48                     ` Yinghai Lu
2013-11-25 11:22                 ` Rafael J. Wysocki
2013-11-25 19:45                   ` Yinghai Lu
2013-11-25 20:57                     ` Rafael J. Wysocki
2013-11-25  9:47               ` Mika Westerberg
2013-11-25 11:24                 ` Rafael J. Wysocki
2013-11-25 21:59               ` Bjorn Helgaas
2013-11-25 22:19                 ` Rafael J. Wysocki
2013-11-28  0:41                 ` Jingoo Han

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20131125101154.GS2281@intel.com \
    --to=mika.westerberg@linux.intel.com \
    --cc=JBottomley@parallels.com \
    --cc=bhelgaas@google.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-ide@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rjw@rjwysocki.net \
    --cc=tj@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox