All of lore.kernel.org
 help / color / mirror / Atom feed
From: Shaohua Li <shli@kernel.org>
To: Bruno Wolff III <bruno@wolff.to>
Cc: weiping zhang <zwp10758@gmail.com>,
	Laura Abbott <labbott@redhat.com>, Jan Kara <jack@suse.cz>,
	Jens Axboe <axboe@kernel.dk>,
	linux-mm@kvack.org,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	regressions@leemhuis.info, linux-block@vger.kernel.org
Subject: Re: Regression with a0747a859ef6 ("bdi: add error handle for bdi_debug_register")
Date: Tue, 19 Dec 2017 10:24:52 -0800	[thread overview]
Message-ID: <20171219182452.vpmqpi3yb4g2ecad@kernel.org> (raw)
In-Reply-To: <20171219161743.GA6960@wolff.to>

On Tue, Dec 19, 2017 at 10:17:43AM -0600, Bruno Wolff III wrote:
> On Sun, Dec 17, 2017 at 21:43:50 +0800,
>  weiping zhang <zwp10758@gmail.com> wrote:
> > Hi, thanks for testing, I think you first reproduce this issue(got WARNING
> > at device_add_disk) by your own build, then add my debug patch.
> 
> The problem is still in rc4. Reverting the commit still fixes the problem. I
> tested that warning level messages should appear using lkdtm. While there
> could be something weird relating to the WARN_ON macro, more likely there is
> something different about the boots with the kernels I build (the exact way
> initramfs is built is probably different) and probably that (WARN_ON) code
> is not getting executed.

Not sure if this is MD related, but could you please check if this debug patch
changes anything?

diff --git a/drivers/md/md.c b/drivers/md/md.c
index 4e4dee0..c365179 100644
--- a/drivers/md/md.c
+++ b/drivers/md/md.c
@@ -518,7 +518,6 @@ static void mddev_put(struct mddev *mddev)
 	    mddev->ctime == 0 && !mddev->hold_active) {
 		/* Array is not configured at all, and not held active,
 		 * so destroy it */
-		list_del_init(&mddev->all_mddevs);
 		bs = mddev->bio_set;
 		sync_bs = mddev->sync_set;
 		mddev->bio_set = NULL;
@@ -5210,6 +5209,10 @@ static void md_free(struct kobject *ko)
 	}
 	percpu_ref_exit(&mddev->writes_pending);
 
+	spin_lock(&all_mddevs_lock);
+	list_del_init(&mddev->all_mddevs);
+	spin_unlock(&all_mddevs_lock);
+
 	kfree(mddev);
 }
 

WARNING: multiple messages have this Message-ID (diff)
From: Shaohua Li <shli@kernel.org>
To: Bruno Wolff III <bruno@wolff.to>
Cc: weiping zhang <zwp10758@gmail.com>,
	Laura Abbott <labbott@redhat.com>, Jan Kara <jack@suse.cz>,
	Jens Axboe <axboe@kernel.dk>,
	linux-mm@kvack.org,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	regressions@leemhuis.info, linux-block@vger.kernel.org
Subject: Re: Regression with a0747a859ef6 ("bdi: add error handle for bdi_debug_register")
Date: Tue, 19 Dec 2017 10:24:52 -0800	[thread overview]
Message-ID: <20171219182452.vpmqpi3yb4g2ecad@kernel.org> (raw)
In-Reply-To: <20171219161743.GA6960@wolff.to>

On Tue, Dec 19, 2017 at 10:17:43AM -0600, Bruno Wolff III wrote:
> On Sun, Dec 17, 2017 at 21:43:50 +0800,
>  weiping zhang <zwp10758@gmail.com> wrote:
> > Hi, thanks for testing, I think you first reproduce this issue(got WARNING
> > at device_add_disk) by your own build, then add my debug patch.
> 
> The problem is still in rc4. Reverting the commit still fixes the problem. I
> tested that warning level messages should appear using lkdtm. While there
> could be something weird relating to the WARN_ON macro, more likely there is
> something different about the boots with the kernels I build (the exact way
> initramfs is built is probably different) and probably that (WARN_ON) code
> is not getting executed.

Not sure if this is MD related, but could you please check if this debug patch
changes anything?

diff --git a/drivers/md/md.c b/drivers/md/md.c
index 4e4dee0..c365179 100644
--- a/drivers/md/md.c
+++ b/drivers/md/md.c
@@ -518,7 +518,6 @@ static void mddev_put(struct mddev *mddev)
 	    mddev->ctime == 0 && !mddev->hold_active) {
 		/* Array is not configured at all, and not held active,
 		 * so destroy it */
-		list_del_init(&mddev->all_mddevs);
 		bs = mddev->bio_set;
 		sync_bs = mddev->sync_set;
 		mddev->bio_set = NULL;
@@ -5210,6 +5209,10 @@ static void md_free(struct kobject *ko)
 	}
 	percpu_ref_exit(&mddev->writes_pending);
 
+	spin_lock(&all_mddevs_lock);
+	list_del_init(&mddev->all_mddevs);
+	spin_unlock(&all_mddevs_lock);
+
 	kfree(mddev);
 }
 

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

  reply	other threads:[~2017-12-19 18:24 UTC|newest]

Thread overview: 80+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-14  0:54 Regression with a0747a859ef6 ("bdi: add error handle for bdi_debug_register") Laura Abbott
2017-12-14  0:54 ` Laura Abbott
2017-12-14  8:24 ` Bruno Wolff III
2017-12-14  8:24   ` Bruno Wolff III
2017-12-14 10:09   ` weiping zhang
2017-12-14 10:09     ` weiping zhang
2017-12-14 10:29     ` Bruno Wolff III
2017-12-14 10:29       ` Bruno Wolff III
2017-12-14 15:41     ` Bruno Wolff III
2017-12-15  1:22       ` weiping zhang
2017-12-15  1:22         ` weiping zhang
2017-12-15  1:44         ` Bruno Wolff III
2017-12-15  1:44           ` Bruno Wolff III
2017-12-15  2:04           ` weiping zhang
2017-12-15  2:04             ` weiping zhang
2017-12-15  2:11             ` Bruno Wolff III
2017-12-15  2:11               ` Bruno Wolff III
2017-12-15 11:10             ` Bruno Wolff III
2017-12-15 11:10               ` Bruno Wolff III
2017-12-15 14:02               ` weiping zhang
2017-12-15 14:02                 ` weiping zhang
2017-12-15 16:30                 ` Bruno Wolff III
2017-12-15 16:30                   ` Bruno Wolff III
2017-12-15 17:18                   ` Laura Abbott
2017-12-15 17:18                     ` Laura Abbott
2017-12-15 17:40                     ` Bruno Wolff III
2017-12-15 17:40                       ` Bruno Wolff III
2017-12-15 19:51                 ` Bruno Wolff III
2017-12-15 19:51                   ` Bruno Wolff III
2017-12-16 16:32                   ` Bruno Wolff III
2017-12-16 16:32                     ` Bruno Wolff III
2017-12-17 13:43                     ` weiping zhang
2017-12-17 13:43                       ` weiping zhang
2017-12-17 15:54                       ` Bruno Wolff III
2017-12-17 15:54                         ` Bruno Wolff III
2017-12-18 21:53                       ` Bruno Wolff III
2017-12-18 21:53                         ` Bruno Wolff III
2017-12-19 16:17                       ` Bruno Wolff III
2017-12-19 16:17                         ` Bruno Wolff III
2017-12-19 18:24                         ` Shaohua Li [this message]
2017-12-19 18:24                           ` Shaohua Li
2017-12-19 19:48                           ` Bruno Wolff III
2017-12-19 19:48                             ` Bruno Wolff III
2017-12-20  0:20                           ` Bruno Wolff III
2017-12-21 13:00 ` Bruno Wolff III
2017-12-21 13:00   ` Bruno Wolff III
2017-12-21 14:01   ` weiping zhang
2017-12-21 14:01     ` weiping zhang
2017-12-21 15:18     ` Bruno Wolff III
2017-12-21 15:18       ` Bruno Wolff III
2017-12-21 15:31       ` weiping zhang
2017-12-21 15:31         ` weiping zhang
2017-12-21 15:36         ` Bruno Wolff III
2017-12-21 15:36           ` Bruno Wolff III
2017-12-21 15:48           ` weiping zhang
2017-12-21 15:48             ` weiping zhang
2017-12-21 16:42             ` Bruno Wolff III
2017-12-21 16:42               ` Bruno Wolff III
2017-12-21 17:02               ` Jens Axboe
2017-12-21 17:02                 ` Jens Axboe
2017-12-21 17:46                 ` weiping zhang
2017-12-21 17:46                   ` weiping zhang
2017-12-21 18:15                 ` Bruno Wolff III
2017-12-21 18:15                   ` Bruno Wolff III
2017-12-21 23:16                   ` Bruno Wolff III
2017-12-21 23:16                     ` Bruno Wolff III
2017-12-22  4:53                     ` Bruno Wolff III
2017-12-22 13:20                       ` weiping zhang
2017-12-22 13:20                         ` weiping zhang
2017-12-22 14:04                         ` Bruno Wolff III
2017-12-22 14:04                           ` Bruno Wolff III
2017-12-29 16:30                           ` weiping zhang
2017-12-29 16:30                             ` weiping zhang
2017-12-29 18:44                             ` Bruno Wolff III
2017-12-29 18:44                               ` Bruno Wolff III
2017-12-29 16:36                           ` weiping zhang
2017-12-29 16:36                             ` weiping zhang
2017-12-22  0:29                 ` James Bottomley
2017-12-22  0:29                   ` James Bottomley
2017-12-22  1:29                   ` weiping zhang

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=20171219182452.vpmqpi3yb4g2ecad@kernel.org \
    --to=shli@kernel.org \
    --cc=axboe@kernel.dk \
    --cc=bruno@wolff.to \
    --cc=jack@suse.cz \
    --cc=labbott@redhat.com \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=regressions@leemhuis.info \
    --cc=zwp10758@gmail.com \
    /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 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.