Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1650181
| From | Michal Hocko <mhocko@kernel.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH] mm/vmalloc: a slight change of compare target in __insert_vmap_area() |
| Date | 2017-05-25 07:40 +0200 |
| Message-ID | <tKTF7-45C-7@gated-at.bofh.it> (permalink) |
| References | <tKBoS-Xp-21@gated-at.bofh.it> <tKDqG-2fU-11@gated-at.bofh.it> <tKG5b-3Wx-17@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Wed 24-05-17 23:07:30, Wei Yang wrote: > On Wed, May 24, 2017 at 02:11:35PM +0200, Michal Hocko wrote: > >On Wed 24-05-17 18:03:47, Wei Yang wrote: > >> The vmap RB tree store the elements in order and no overlap between any of > >> them. The comparison in __insert_vmap_area() is to decide which direction > >> the search should follow and make sure the new vmap_area is not overlap > >> with any other. > >> > >> Current implementation fails to do the overlap check. > >> > >> When first "if" is not true, it means > >> > >> va->va_start >= tmp_va->va_end > >> > >> And with the truth > >> > >> xxx->va_end > xxx->va_start > >> > >> The deduction is > >> > >> va->va_end > tmp_va->va_start > >> > >> which is the condition in second "if". > >> > >> This patch changes a little of the comparison in __insert_vmap_area() to > >> make sure it forbids the overlapped vmap_area. > > > >Why do we care about overlapping vmap areas at this level. This is an > >internal function and all the sanity checks should have been done by > >that time AFAIR. Could you describe the problem which you are trying to > >fix/address? > > > > No problem it tries to fix. I would prefer the not touch the code if there is no problem to fix. -- Michal Hocko SUSE Labs
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH] mm/vmalloc: a slight change of compare target in __insert_vmap_area() Wei Yang <richard.weiyang@gmail.com> - 2017-05-24 12:10 +0200
Re: [PATCH] mm/vmalloc: a slight change of compare target in __insert_vmap_area() Michal Hocko <mhocko@kernel.org> - 2017-05-24 14:20 +0200
Re: [PATCH] mm/vmalloc: a slight change of compare target in __insert_vmap_area() Wei Yang <richard.weiyang@gmail.com> - 2017-05-24 17:10 +0200
Re: [PATCH] mm/vmalloc: a slight change of compare target in __insert_vmap_area() Michal Hocko <mhocko@kernel.org> - 2017-05-25 07:40 +0200
Re: [PATCH] mm/vmalloc: a slight change of compare target in __insert_vmap_area() zhong jiang <zhongjiang@huawei.com> - 2017-05-25 05:10 +0200
Re: [PATCH] mm/vmalloc: a slight change of compare target in __insert_vmap_area() Wei Yang <richard.weiyang@gmail.com> - 2017-05-26 03:40 +0200
Re: [PATCH] mm/vmalloc: a slight change of compare target in __insert_vmap_area() zhong jiang <zhongjiang@huawei.com> - 2017-05-26 04:10 +0200
Re: [PATCH] mm/vmalloc: a slight change of compare target in __insert_vmap_area() Wei Yang <richard.weiyang@gmail.com> - 2017-06-02 03:50 +0200
Re: [PATCH] mm/vmalloc: a slight change of compare target in __insert_vmap_area() zhong jiang <zhongjiang@huawei.com> - 2017-06-02 04:30 +0200
Re: [PATCH] mm/vmalloc: a slight change of compare target in __insert_vmap_area() Wei Yang <richard.weiyang@gmail.com> - 2017-06-03 04:30 +0200
csiph-web