Skip to content

Commit

Permalink
avr32: Fix bug in early resource allocation code
Browse files Browse the repository at this point in the history
add_reserved_region() tries to keep the resource list sorted, so when
looking for a place to insert the new resource, it may break out
before the last entry.

When this happens, the list is broken in two because the sibling field
of the new entry doesn't point to the next resource. Fix it by
updating the new resource's sibling field appropriately.

Signed-off-by: Haavard Skinnemoen <haavard.skinnemoen@atmel.com>
  • Loading branch information
Haavard Skinnemoen committed Mar 27, 2008
1 parent 957ecd7 commit a2a3952
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions arch/avr32/kernel/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,7 @@ add_reserved_region(resource_size_t start, resource_size_t end,
new->start = start;
new->end = end;
new->name = name;
new->sibling = next;
new->flags = IORESOURCE_MEM;

*pprev = new;
Expand Down

0 comments on commit a2a3952

Please sign in to comment.