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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Wed, 8 Sep 2010 20:10:49 +0700
From:	"chxanders@...il.com" <chxanders@...il.com>
To:	fabio de francesco <fabio@...anix.org>
Cc:	LKML <linux-kernel@...r.kernel.org>
Subject: Re: linux/kernel/sched.c: context_switch().

Long day? Do you mean likely(!mm) actually means unlikely(0)?


On 8 September 2010 20:08, fabio de francesco <fabio@...anix.org> wrote:
> There must be something I am missing in sched.c at context_switch() function
> definition.
>
> There I can read the following code:
>
> static inline void
> context_switch(struct rq *rq, struct task_struct *prev,
>               struct task_struct *next)
> {
>        ...
>        struct mm_struct *mm;
>        mm = next->mm;
>        if (likely(!mm)) {
>                next->active_mm = oldmm;
>                atomic_inc(&oldmm->mm_count);
>                enter_lazy_tlb(oldmm, next);
>        } else
>                switch_mm(oldmm, mm, next);
>        ...
> }
>
> May someone please explain why the mm pointer is likely supposed to be NULL?
>
> Thanks in advance.
>
> fabio
> --
> 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/
>
--
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