Linux-mtd Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Nikhilesh Reddy <reddyn@codeaurora.org>
To: linux-mtd@lists.infradead.org
Subject: ubi_assert(list_empty(&used)) in ubi_attach_fastmap
Date: Thu, 21 May 2015 17:31:14 -0700	[thread overview]
Message-ID: <555E78D2.9020307@codeaurora.org> (raw)

Hi

I am running kernel 3.10.

I recently saw an issue where ubi_assert(list_empty(&used)) in 
ubi_attach_fastmap always hits on a partition.

Searching this issue I found
http://git.infradead.org/linux-ubifs.git/commitdiff/a83832a7c8d023f446ec865926190951bd18a4b1?hp=36a87e44f642966442fd0d23f2ec536851e00236
diff --git a/drivers/mtd/ubi/fastmap.c b/drivers/mtd/ubi/fastmap.c
index 600c4f9..9858bfb 100644 (file)
--- a/drivers/mtd/ubi/fastmap.c
+++ b/drivers/mtd/ubi/fastmap.c
@@ -814,7 +814,9 @@ static int ubi_attach_fastmap(struct ubi_device *ubi,
         list_for_each_entry_safe(tmp_aeb, _tmp_aeb, &free, u.list)
                 list_move_tail(&tmp_aeb->u.list, &ai->free);

-       ubi_assert(list_empty(&used));
+       list_for_each_entry_safe(tmp_aeb, _tmp_aeb, &used, u.list)
+               list_move_tail(&tmp_aeb->u.list, &ai->erase);
+
         ubi_assert(list_empty(&eba_orphans));
         ubi_assert(list_empty(&free));


Can you please give me a background on this patch.
Is this safe to apply without any of patches in the list

http://lwn.net/Articles/618410/

Can this occur when trying to attach an empty partition?
i.e. one that doesn't contain a UBI image.

Please let me know.
I would really appreciate any help that you can give me.


-- 
Thanks
Nikhilesh Reddy

Qualcomm Innovation Center, Inc.
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project.

             reply	other threads:[~2015-05-22  0:31 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-22  0:31 Nikhilesh Reddy [this message]
2015-05-22  7:05 ` ubi_assert(list_empty(&used)) in ubi_attach_fastmap Richard Weinberger

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=555E78D2.9020307@codeaurora.org \
    --to=reddyn@codeaurora.org \
    --cc=linux-mtd@lists.infradead.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