Re: [PATCH] sns: add syscall to check signed state of a process [4/4]

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

 



2007/6/22, Alexander Wuerstlein <[email protected]>:

+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.

+               rcu_read_unlock();
+               return -EINVAL;
+       }
+       p = t->sns_valid_sig; /*locking needed*/
+       rcu_read_unlock();
+       return p;
+}
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux