From: Stephen Rothwell <sfr@canb.auug.org.au>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: linux-next@vger.kernel.org, linux-kernel@vger.kernel.org,
Wen Congyang <wency@cn.fujitsu.com>,
Yasuaki Ishimatsu <isimatu.yasuaki@jp.fujitsu.com>,
"Rafael J. Wysocki" <rjw@sisk.pl>
Subject: linux-next: manual merge of the akpm tree with the pm tree
Date: Mon, 5 Nov 2012 15:46:46 +1100 [thread overview]
Message-ID: <20121105154646.65ece287a8bd50e844085a9a@canb.auug.org.au> (raw)
[-- Attachment #1: Type: text/plain, Size: 1780 bytes --]
Hi Andrew,
Today's linux-next merge of the akpm tree got a conflict in
drivers/acpi/acpi_memhotplug.c between commits 85fcb3758c10 ("ACPI /
memory-hotplug: introduce a mutex lock to protect the list in
acpi_memory_device") and d0fbb400b6f3 ("ACPI / memory-hotplug: add memory
offline code to acpi_memory_device_remove()") from the pm tree and commit
"acpi_memhotplug.c: fix memory leak when memory device is unbound from
the module acpi_memhotplug" from the akpm tree.
I fixed it up (I think - see below) and can carry the fix as necessary
(no action is required).
--
Cheers,
Stephen Rothwell sfr@canb.auug.org.au
diff --cc drivers/acpi/acpi_memhotplug.c
index 92c973a,62c2c74..0000000
--- a/drivers/acpi/acpi_memhotplug.c
+++ b/drivers/acpi/acpi_memhotplug.c
@@@ -131,6 -125,16 +131,18 @@@ acpi_memory_get_resource(struct acpi_re
return AE_OK;
}
+ static void
+ acpi_memory_free_device_resources(struct acpi_memory_device *mem_device)
+ {
+ struct acpi_memory_info *info, *n;
+
++ mutex_lock(&mem_device->list_lock);
+ list_for_each_entry_safe(info, n, &mem_device->res_list, list)
+ kfree(info);
+ INIT_LIST_HEAD(&mem_device->res_list);
++ mutex_unlock(&mem_device->list_lock);
+ }
+
static int
acpi_memory_get_device_resources(struct acpi_memory_device *mem_device)
{
@@@ -504,13 -490,7 +519,13 @@@ static int acpi_memory_device_remove(st
if (!device || !acpi_driver_data(device))
return -EINVAL;
- acpi_memory_device_free(acpi_driver_data(device));
+ mem_device = acpi_driver_data(device);
+
+ result = acpi_memory_remove_memory(mem_device);
+ if (result)
+ return result;
+
- kfree(mem_device);
++ acpi_memory_device_free(mem_device);
return 0;
}
[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]
next reply other threads:[~2012-11-05 4:46 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-11-05 4:46 Stephen Rothwell [this message]
2018-12-04 5:54 linux-next: manual merge of the akpm tree with the pm tree Stephen Rothwell
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=20121105154646.65ece287a8bd50e844085a9a@canb.auug.org.au \
--to=sfr@canb.auug.org.au \
--cc=akpm@linux-foundation.org \
--cc=isimatu.yasuaki@jp.fujitsu.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-next@vger.kernel.org \
--cc=rjw@sisk.pl \
--cc=wency@cn.fujitsu.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).