From: Alexander Wuerstlein <snalwuer@cip.informatik.uni-erlangen.de>
To: Akinobu Mita <akinobu.mita@gmail.com>
Cc: Alexander Wuerstlein <arw@arw.name>,
linux-kernel@vger.kernel.org,
Johannes Schlumberger <spjsschl@stud.informatik.uni-erlangen.de>
Subject: Re: [PATCH] sns: add syscall to check signed state of a process [4/4]
Date: Thu, 21 Jun 2007 18:49:12 +0200 [thread overview]
Message-ID: <20070621164912.GD9741@cip.informatik.uni-erlangen.de> (raw)
In-Reply-To: <961aa3350706210934m11e7f0cq96f384056878cb43@mail.gmail.com>
On 070621 18:34, Akinobu Mita <akinobu.mita@gmail.com> wrote:
> 2007/6/22, Alexander Wuerstlein <arw@arw.name>:
>
>> +asmlinkage int sys_sns_is_trusted(pid_t p)
>> +{
>> + struct task_struct *t;
>> + rcu_read_lock();
>> + t = find_task_by_pid(p);
>> + if (IS_ERR(t)) {
>
> Shouldn't it be:
> if (!t) {
> ...
> ?
>
> find_task_by_pid() returns NULL on failure.
You seem to be right, the rest of the kernel just does 'if (!t)'. We just used
IS_ERR() as the 'check for evil pointers' function.
Ciao,
Alexander Wuerstlein.
next prev parent reply other threads:[~2007-06-21 16:49 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-06-21 16:02 Alexander Wuerstlein
2007-06-21 16:34 ` Akinobu Mita
2007-06-21 16:49 ` Alexander Wuerstlein [this message]
2007-06-23 18:03 ` Jan Engelhardt
-- strict thread matches above, loose matches on Subject: below --
2007-06-21 15:55 [PATCH] signed binaries support [0/4] Johannes Schlumberger
2007-06-22 18:25 ` [PATCH] sns: add syscall to check signed state of a process [4/4] Alexander Wuerstlein
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=20070621164912.GD9741@cip.informatik.uni-erlangen.de \
--to=snalwuer@cip.informatik.uni-erlangen.de \
--cc=akinobu.mita@gmail.com \
--cc=arw@arw.name \
--cc=linux-kernel@vger.kernel.org \
--cc=spjsschl@stud.informatik.uni-erlangen.de \
/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
all inboxes | Powered by JetHome®