Bjorn Helgaas
a98959fdbd
resource: Include resource end in walk_*() interfaces
find_next_iomem_res() finds an iomem resource that covers part of a range
described by "start, end". All callers expect that range to be inclusive,
i.e., both start and end are included, but find_next_iomem_res() doesn't
handle the end address correctly.
If it finds an iomem resource that contains exactly the end address, it
skips it, e.g., if "start, end" is [0x0-0x10000] and there happens to be an
iomem resource [mem 0x10000-0x10000] (the single byte at 0x10000), we skip
it:
find_next_iomem_res(...)
{
start = 0x0;
end = 0x10000;
for (p = next_resource(...)) {
# p->start = 0x10000;
# p->end = 0x10000;
# we *should* return this resource, but this condition is false:
if ((p->end >= start) && (p->start < end))
break;
Adjust find_next_iomem_res() so it allows a resource that includes the
single byte at the end of the range. This is a corner case that we
probably don't see in practice.
Fixes: 58c1b5b079 ("[PATCH] memory hotadd fixes: find_next_system_ram catch range fix")
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Signed-off-by: Borislav Petkov <bp@suse.de>
CC: Andrew Morton <akpm@linux-foundation.org>
CC: Brijesh Singh <brijesh.singh@amd.com>
CC: Dan Williams <dan.j.williams@intel.com>
CC: H. Peter Anvin <hpa@zytor.com>
CC: Lianbo Jiang <lijiang@redhat.com>
CC: Takashi Iwai <tiwai@suse.de>
CC: Thomas Gleixner <tglx@linutronix.de>
CC: Tom Lendacky <thomas.lendacky@amd.com>
CC: Vivek Goyal <vgoyal@redhat.com>
CC: Yaowei Bai <baiyaowei@cmss.chinamobile.com>
CC: bhe@redhat.com
CC: dan.j.williams@intel.com
CC: dyoung@redhat.com
CC: kexec@lists.infradead.org
CC: mingo@redhat.com
CC: x86-ml <x86@kernel.org>
Link: http://lkml.kernel.org/r/153805812254.1157.16736368485811773752.stgit@bhelgaas-glaptop.roam.corp.google.com
2018-10-09 17:18:34 +02:00
..
2018-09-12 23:30:02 +02:00
2018-08-24 13:19:27 -07:00
2018-06-15 07:15:28 +09:00
2018-06-12 16:19:22 -07:00
2018-09-01 15:42:28 +02:00
2018-09-10 14:01:46 +02:00
2018-06-08 18:56:02 +09:00
2018-08-13 10:47:26 -07:00
2018-08-20 18:33:50 +02:00
2018-09-10 14:00:01 +02:00
2018-08-15 00:07:08 +02:00
2018-09-13 19:37:08 -10:00
2018-08-13 11:25:07 -07:00
2018-09-10 10:31:37 +02:00
2018-09-06 23:38:35 +02:00
2018-09-17 18:15:11 -04:00
2018-01-04 16:45:09 -08:00
2018-02-06 18:32:44 -08:00
2018-05-18 14:58:22 +02:00
2018-08-17 09:41:28 -07:00
2018-07-18 11:43:36 -04:00
2018-07-17 14:45:08 -04:00
2018-02-23 11:22:22 -05:00
2018-06-19 10:39:54 -04:00
2018-08-15 10:46:54 -07:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2018-06-24 14:39:47 +02:00
2017-07-31 13:09:49 +02:00
2018-09-06 15:21:38 +02:00
2018-08-22 10:52:47 -07:00
2018-04-27 14:34:51 +02:00
2018-05-16 07:23:35 +02:00
2017-11-02 11:10:55 +01:00
2018-05-16 07:23:35 +02:00
2018-07-21 12:57:35 -05:00
2018-02-21 16:54:06 +01:00
2018-06-21 12:33:19 +02:00
2018-09-04 16:45:02 -07:00
2018-08-06 12:35:20 +02:00
2017-11-02 11:10:55 +01:00
2018-08-20 18:23:00 +02:00
2017-12-14 16:00:49 -08:00
2018-08-22 10:52:47 -07:00
2018-05-15 23:08:33 -07:00
2018-01-08 19:43:15 +01:00
2018-09-10 10:15:48 +02:00
2018-08-14 19:12:29 -03:00
2017-11-02 11:10:55 +01:00
2018-08-02 08:06:54 +09:00
2018-06-15 07:55:24 +09:00
2018-10-06 12:01:51 +02:00
2018-06-12 16:19:22 -07:00
2017-11-02 11:10:55 +01:00
2018-07-16 12:31:57 -07:00
2017-09-08 18:26:51 -07:00
2018-06-21 17:33:42 +02:00
2017-07-12 16:25:59 -07:00
2018-08-13 11:25:07 -07:00
2018-07-18 01:18:05 +09:00
2018-08-25 18:43:59 -07:00
2018-07-02 11:36:17 +02:00
2018-07-02 11:36:17 +02:00
2018-08-22 10:52:47 -07:00
2018-01-05 18:43:00 +11:00
2018-06-14 12:21:18 +09:00
2018-04-11 10:28:37 -07:00
2018-04-03 19:15:32 -07:00
2018-09-20 22:01:11 +02:00
2018-02-06 18:32:46 -08:00
2017-11-02 11:10:55 +01:00
2018-08-06 12:35:20 +02:00
2018-06-15 07:55:24 +09:00
2018-10-09 17:18:34 +02:00
2018-07-10 22:18:52 +02:00
2018-06-06 16:34:00 -07:00
2018-08-22 12:34:08 -07:00
2018-10-09 16:51:11 +02:00
2018-07-03 09:20:44 +02:00
2017-11-02 11:10:55 +01:00
2018-08-03 15:52:10 +02:00
2018-08-13 11:25:07 -07:00
2018-06-10 10:17:09 -07:00
2018-09-20 22:01:11 +02:00
2018-04-16 11:26:49 +02:00
2018-08-23 18:48:43 -07:00
2017-12-17 13:57:15 +01:00
2018-02-06 18:32:46 -08:00
2018-06-21 12:33:05 +02:00
2018-06-25 11:30:10 -07:00
2018-08-22 10:52:47 -07:00
2018-04-05 21:36:27 -07:00
2018-04-02 20:15:59 +02:00
2018-04-02 20:15:30 +02:00
2018-06-07 16:56:28 -04:00
2018-10-09 16:51:11 +02:00
2018-08-11 02:05:53 -05:00
2018-08-22 10:52:47 -07:00
2018-08-11 02:05:53 -05:00
2018-04-11 10:28:35 -07:00
2018-08-30 12:56:40 +02:00
2018-08-30 12:56:40 +02:00
2018-05-18 08:47:13 -07:00
2018-08-30 12:56:40 +02:00