lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20061220074917.GA4038@APFDCB5C>
Date:	Wed, 20 Dec 2006 16:49:17 +0900
From:	Akinobu Mita <akinobu.mita@...il.com>
To:	Paul Mackerras <paulus@...ba.org>
Cc:	linux-kernel@...r.kernel.org, Anton Blanchard <anton@...ba.org>
Subject: Re: [PATCH] powerpc: use is_init()

On Wed, Dec 20, 2006 at 03:06:51PM +1100, Paul Mackerras wrote:
> Akinobu Mita writes:
> 
> > Use is_init() rather than hard coded pid comparison.
> 
> What's the context of this patch?  Why is this a good thing to do?
> 

This is just minor cleanup patch.
is_init() is available on 2.6.20-rc1 (include/linux/sched.h):

/**
 * is_init - check if a task structure is init
 * @tsk: Task structure to be checked.
 *
 * Check if a task structure is the first user space task the kernel created.
 */
static inline int is_init(struct task_struct *tsk)
{
        return tsk->pid == 1;
}

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ