From: Kumar Gala <hidden> Date: 2008-02-20 04:30:59
We introduced a bug in fixing lmb_add_region to handle an initial
region being non-zero. Before that fix it was impossible to insert
a region at the head of the list since the first region always started
at zero.
Now that its possible for the first region to be non-zero we need to
check to see if the new region should be added at the head and if so
actually add it.
Signed-off-by: Kumar Gala <redacted>
---
lib/lmb.c | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
From: David Miller <davem@davemloft.net> Date: 2008-02-20 04:44:57
From: Kumar Gala <redacted>
Date: Tue, 19 Feb 2008 22:27:48 -0600 (CST)
We introduced a bug in fixing lmb_add_region to handle an initial
region being non-zero. Before that fix it was impossible to insert
a region at the head of the list since the first region always started
at zero.
Now that its possible for the first region to be non-zero we need to
check to see if the new region should be added at the head and if so
actually add it.
Signed-off-by: Kumar Gala <redacted>
Are you sure this is sufficient?
It seems to me, to handle this properly, you'll need to handle
the case where the lower addressed entry you are inserting is
not contiguous with the existing entry 0.
Therefore, you need to move all existing entries up a slot,
then you can set the 0 entry to 'base' and 'size'.
What do you think?
From: Kumar Gala <hidden> Date: 2008-02-20 05:16:37
On Feb 19, 2008, at 10:45 PM, David Miller wrote:
From: Kumar Gala <redacted>
Date: Tue, 19 Feb 2008 22:27:48 -0600 (CST)
quoted
We introduced a bug in fixing lmb_add_region to handle an initial
region being non-zero. Before that fix it was impossible to insert
a region at the head of the list since the first region always
started
at zero.
Now that its possible for the first region to be non-zero we need to
check to see if the new region should be added at the head and if so
actually add it.
Signed-off-by: Kumar Gala <redacted>
...
quoted
@@ -184,6 +184,11 @@ static long __init lmb_add_region(struct
Are you sure this is sufficient?
It seems to me, to handle this properly, you'll need to handle
the case where the lower addressed entry you are inserting is
not contiguous with the existing entry 0.
Therefore, you need to move all existing entries up a slot,
then you can set the 0 entry to 'base' and 'size'.
The for loop above the code I added will move all the existing slots
up one. Its just the tail cleanup we are missing.
- k