Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1499452
| From | zijun_hu <zijun_hu@zoho.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [RFC PATCH 1/1] mm/percpu.c: fix memory leakage issue when allocate a odd alignment area |
| Date | 2016-10-12 12:00 +0200 |
| Message-ID | <sroul-2vS-5@gated-at.bofh.it> (permalink) |
| References | (3 earlier) <srlGa-Ku-33@gated-at.bofh.it> <srm9b-19E-1@gated-at.bofh.it> <srnoC-1RR-5@gated-at.bofh.it> <srnoC-1RR-3@gated-at.bofh.it> <sroul-2vS-3@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On 10/12/2016 05:54 PM, Michal Hocko wrote:
> On Wed 12-10-16 16:44:31, zijun_hu wrote:
>> On 10/12/2016 04:25 PM, Michal Hocko wrote:
>>> On Wed 12-10-16 15:24:33, zijun_hu wrote:
> [...]
>>>> i found the following code segments in mm/vmalloc.c
>>>> static struct vmap_area *alloc_vmap_area(unsigned long size,
>>>> unsigned long align,
>>>> unsigned long vstart, unsigned long vend,
>>>> int node, gfp_t gfp_mask)
>>>> {
>>>> ...
>>>>
>>>> BUG_ON(!size);
>>>> BUG_ON(offset_in_page(size));
>>>> BUG_ON(!is_power_of_2(align));
>>>
>>> See a recent Linus rant about BUG_ONs. These BUG_ONs are quite old and
>>> from a quick look they are even unnecessary. So rather than adding more
>>> of those, I think removing those that are not needed is much more
>>> preferred.
>>>
>> i notice that, and the above code segments is used to illustrate that
>> input parameter checking is necessary sometimes
>
> Why do you think it is necessary here?
>
i am sorry for reply late
i don't know whether it is necessary
i just find there are so many sanity checkup in current internal interfaces
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[RFC PATCH 1/1] mm/percpu.c: fix memory leakage issue when allocate a odd alignment area zijun_hu <zijun_hu@zoho.com> - 2016-10-11 15:30 +0200
Re: [RFC PATCH 1/1] mm/percpu.c: fix memory leakage issue when allocate a odd alignment area Michal Hocko <mhocko@kernel.org> - 2016-10-11 19:30 +0200
Re: [RFC PATCH 1/1] mm/percpu.c: fix memory leakage issue when allocate a odd alignment area zijun_hu <zijun_hu@zoho.com> - 2016-10-12 02:30 +0200
Re: [RFC PATCH 1/1] mm/percpu.c: fix memory leakage issue when allocate a odd alignment area Michal Hocko <mhocko@kernel.org> - 2016-10-12 09:00 +0200
Re: [RFC PATCH 1/1] mm/percpu.c: fix memory leakage issue when allocate a odd alignment area zijun_hu <zijun_hu@zoho.com> - 2016-10-12 09:30 +0200
Re: [RFC PATCH 1/1] mm/percpu.c: fix memory leakage issue when allocate a odd alignment area zijun_hu <zijun_hu@zoho.com> - 2016-10-12 10:50 +0200
Re: [RFC PATCH 1/1] mm/percpu.c: fix memory leakage issue when allocate a odd alignment area Michal Hocko <mhocko@kernel.org> - 2016-10-12 12:00 +0200
Re: [RFC PATCH 1/1] mm/percpu.c: fix memory leakage issue when allocate a odd alignment area zijun_hu <zijun_hu@zoho.com> - 2016-10-12 12:00 +0200
Re: [RFC PATCH 1/1] mm/percpu.c: fix memory leakage issue when allocate a odd alignment area Michal Hocko <mhocko@kernel.org> - 2016-10-12 11:30 +0200
Re: [RFC PATCH 1/1] mm/percpu.c: fix memory leakage issue when allocate a odd alignment area zijun_hu <zijun_hu@zoho.com> - 2016-10-12 09:30 +0200
csiph-web