linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Liu Bo <bo.li.liu@oracle.com>
To: linux-btrfs@vger.kernel.org
Subject: [PATCH 3/4] Btrfs-progs: delete fs_devices itself from fs_uuid list before freeing
Date: Thu, 20 Jun 2013 20:05:29 +0800	[thread overview]
Message-ID: <1371729930-22497-4-git-send-email-bo.li.liu@oracle.com> (raw)
In-Reply-To: <1371729930-22497-1-git-send-email-bo.li.liu@oracle.com>

Otherwise we will access illegal addresses while searching on fs_uuid list.

Signed-off-by: Liu Bo <bo.li.liu@oracle.com>
---
 disk-io.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/disk-io.c b/disk-io.c
index 21b410d..2892300 100644
--- a/disk-io.c
+++ b/disk-io.c
@@ -1277,6 +1277,7 @@ static int close_all_devices(struct btrfs_fs_info *fs_info)
 		kfree(device->label);
 		kfree(device);
 	}
+	list_del(&fs_info->fs_devices->list);
 	kfree(fs_info->fs_devices);
 	return 0;
 }
-- 
1.7.7


  parent reply	other threads:[~2013-06-20 12:05 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-20 12:05 [PATCH 0/4] multiple disks restore support of btrfs-image Liu Bo
2013-06-20 12:05 ` [PATCH 1/4] Btrfs-progs: fix misuse of skinny metadata in btrfs-image Liu Bo
2013-06-20 12:05 ` [PATCH 2/4] Btrfs-progs: skip open devices which is missing Liu Bo
2013-06-20 12:05 ` Liu Bo [this message]
2013-06-20 12:05 ` [PATCH 4/4] Btrfs-progs: exhance btrfs-image to restore image onto multiple disks Liu Bo
2013-06-20 12:24   ` Josef Bacik
2013-06-20 12:39     ` Josef Bacik
2013-06-20 13:39       ` Liu Bo
2013-06-20 14:40       ` Liu Bo
2013-06-20 12:47     ` Chris Mason
2013-06-21  1:10   ` Chris Mason
2013-06-21  1:12     ` Liu Bo

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=1371729930-22497-4-git-send-email-bo.li.liu@oracle.com \
    --to=bo.li.liu@oracle.com \
    --cc=linux-btrfs@vger.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;
as well as URLs for NNTP newsgroup(s).