Skip to contentSkip to conversation

Removes extra checking in kernel/cpuset.c

PATCH James Kosin 1 participant 1 message Jul 31, 2008 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw
Quoted 7 lines · Rakib Mullick

Hello guys, this patch removes an extra checking over 'cs' in functions 'guarantee_online_cpus' and 'guarantee_online_mems'.

Thanks.

I'd have to NAK this one as well. 2-reasons:
1) Your patch is guaranteed to generate a NULL pointer dereference at some point. You keep using cs; and assigning cs = cs->parent in the loop, at some point you may end up at the TOP of the tree where cs->parent == NULL.
2) The change breaks the actual meaning of the code. Which is suggesting my the short snippet, find an entry (while loop)... if the entry is found (if cs test), do this otherwise BUG out. Your code is saying, if cs is not NULL initially... find someplace then do something. The function never BUGS out unless someone calls with cs NULL initially.

James Kosin