Messages in this thread | | | Date | Sun, 1 Dec 2019 09:01:15 -0800 | From | Davidlohr Bueso <> | Subject | Re: [PATCH] x86/pat: Fix off-by-one bugs in interval tree search |
| |
On Sun, 01 Dec 2019, Ingo Molnar wrote: >So the correct parameter to use in the interval tree searches is not >'end' but 'end-1'.
Yes absolutely, I overlooked this in the final conversion. Going through some older conversions, I had this end-1 at one point. Lookups need half-open intervals, consistent with what memtype_interval_end() does.
[...]
>Patch is only lightly tested, so take care. (Patch is emphatically not >signed off yet, because I spent most of the day on this and I don't yet >trust my fix - all of the affected sites need to be reviewed more >carefully.)
As a general note, this is rather consistent with how all interval-tree users that need [a,b) nodes use the api.
Thanks, Davidlohr
| |