Re: [PATCH] mm/mempolicy: Fix exception handling in shared_policy_replace()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> Your patch doesn't apply, seems like it uses spaces instead of tabs.

I am sorry for this glitch.

Andrew Morton picked my change suggestion up yesterday.
https://git.kernel.org/pub/scm/linux/kernel/git/akpm/25-new.git/tree/patches/mm-mempolicy-fix-exception-handling-in-shared_policy_replace.patch


> https://lore.kernel.org/all/6e9ca062-939b-af96-c8ff-56ad485d6e79@xxxxxx/
>
> Re: subject, I don't see a bug that this would fix. You could say it's
> "cleanup" and this function could use one, but for a cleanup it's not
> improving the situation much.

I find a few details improvable also for the mentioned function implementation.


>> The label “err_out” was used to jump to another pointer check despite of
>> the detail in the implementation of the function “shared_policy_replace”
>> that it was determined already that a corresponding variable contained a
>> null pointer because of a failed call of the function “kmem_cache_alloc”.
>>
>> 1. Use more appropriate labels instead.
>>
>> 2. The implementation of the function “mpol_put” contains a pointer check
>>    for its single input parameter.
>>    Thus delete a redundant check in the caller.
>>
>>
>> This issue was detected by using the Coccinelle software.
>>
>> Fixes: 42288fe366c4f1ce7522bc9f27d0bc2a81c55264 ("mm: mempolicy: Convert shared_policy mutex to spinlock")
>
> Again this is not a fix.

Do you find the change description helpful?

Regards,
Markus





[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux