Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 319987
b: refs/heads/master
c: 65fed8f
h: refs/heads/master
i:
  319985: a1da2fb
  319983: 1ad506f
v: v3
  • Loading branch information
Octavian Purdila authored and Linus Torvalds committed Jul 31, 2012
1 parent 46e20c1 commit a655f5a
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: f7e1becb078c2b996420a61f2a411ef19335e2da
refs/heads/master: 65fed8f6f23070b56d0ed3841173ddd410130a89
24 changes: 23 additions & 1 deletion trunk/kernel/resource.c
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
* Arbitrary resource management.
*/

#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt

#include <linux/export.h>
#include <linux/errno.h>
#include <linux/ioport.h>
Expand Down Expand Up @@ -791,8 +793,28 @@ void __init reserve_region_with_split(struct resource *root,
resource_size_t start, resource_size_t end,
const char *name)
{
int abort = 0;

write_lock(&resource_lock);
__reserve_region_with_split(root, start, end, name);
if (root->start > start || root->end < end) {
pr_err("requested range [0x%llx-0x%llx] not in root %pr\n",
(unsigned long long)start, (unsigned long long)end,
root);
if (start > root->end || end < root->start)
abort = 1;
else {
if (end > root->end)
end = root->end;
if (start < root->start)
start = root->start;
pr_err("fixing request to [0x%llx-0x%llx]\n",
(unsigned long long)start,
(unsigned long long)end);
}
dump_stack();
}
if (!abort)
__reserve_region_with_split(root, start, end, name);
write_unlock(&resource_lock);
}

Expand Down

0 comments on commit a655f5a

Please sign in to comment.