From: NeilBrown <neilb@suse.de>
To: Adam Kwolek <adam.kwolek@intel.com>
Cc: linux-raid@vger.kernel.org, dan.j.williams@intel.com,
ed.ciechanowski@intel.com, wojciech.neubauer@intel.com
Subject: Re: [PATCH] imsm: FIX: not all disks are released in free_imsm_disks()
Date: Mon, 31 Jan 2011 11:07:13 +1100 [thread overview]
Message-ID: <20110131110713.734364db@notabene.brown> (raw)
In-Reply-To: <20110128133750.16213.62160.stgit@gklab-128-013.igk.intel.com>
On Fri, 28 Jan 2011 14:37:51 +0100 Adam Kwolek <adam.kwolek@intel.com> wrote:
> Adding spare disks to imsm container fails due to problem with writing
> new_dev to sysfs. This problem was caused by not closed handle
> (opened exclusively) in Manage.c:803.
>
> Disk handle was not closed by free_imsm().
> This is due to not released disk_mgmt_list in free_imsm_disks().
>
> Proper release of imsm metadata allows for spare adding without problems.
> Memory leak was fixed also.
>
> Signed-off-by: Adam Kwolek <adam.kwolek@intel.com>
> ---
>
> super-intel.c | 5 +++++
> 1 files changed, 5 insertions(+), 0 deletions(-)
>
> diff --git a/super-intel.c b/super-intel.c
> index 958a02b..8bb21dd 100644
> --- a/super-intel.c
> +++ b/super-intel.c
> @@ -2687,6 +2687,11 @@ static void free_imsm_disks(struct intel_super *super)
> super->disks = d->next;
> __free_imsm_disk(d);
> }
> + while (super->disk_mgmt_list) {
> + d = super->disk_mgmt_list;
> + super->disk_mgmt_list = d->next;
> + __free_imsm_disk(d);
> + }
> while (super->missing) {
> d = super->missing;
> super->missing = d->next;
Applied, thanks.
NeilBrown
prev parent reply other threads:[~2011-01-31 0:07 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-01-28 13:37 [PATCH] imsm: FIX: not all disks are released in free_imsm_disks() Adam Kwolek
2011-01-31 0:07 ` NeilBrown [this message]
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=20110131110713.734364db@notabene.brown \
--to=neilb@suse.de \
--cc=adam.kwolek@intel.com \
--cc=dan.j.williams@intel.com \
--cc=ed.ciechanowski@intel.com \
--cc=linux-raid@vger.kernel.org \
--cc=wojciech.neubauer@intel.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 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).