From: James Kosin <jkosin@beta.intcomgrp.com>
To: linux-kernel@vger.kernel.org
Subject: Re: [PATCH] Removes extra checking in kernel/cpuset.c
Date: Thu, 31 Jul 2008 14:16:20 -0400 [thread overview]
Message-ID: <48920174.8000001@beta.intcomgrp.com> (raw)
In-Reply-To: <aVIzQ-Oh-23@gated-at.bofh.it>
[-- Attachment #1: Type: text/plain, Size: 898 bytes --]
Rakib Mullick wrote:
> Hello guys, this patch removes an extra checking over 'cs' in
> functions 'guarantee_online_cpus' and 'guarantee_online_mems'.
>
> Thanks.
>
> Signed-off-by: Md.Rakib H. Mullick (rakib.mullick@gmail.com)
>
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
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 258 bytes --]
next parent reply other threads:[~2008-07-31 19:13 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <aVIzQ-Oh-23@gated-at.bofh.it>
2008-07-31 18:16 ` James Kosin [this message]
2008-07-31 15:46 [PATCH] Removes extra checking in kernel/cpuset.c Rakib Mullick
2008-07-31 16:15 ` Paul Jackson
2008-07-31 17:09 ` Paul Menage
2008-07-31 19:13 ` Paul Jackson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=48920174.8000001@beta.intcomgrp.com \
--to=jkosin@beta.intcomgrp.com \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox