Re: [PATCH 5/5] Swap Migration V5: sys_migrate_pages interface

From: Christoph Lameter
Date: Tue Nov 01 2005 - 13:10:44 EST


On Tue, 1 Nov 2005, linux-os (Dick Johnson) wrote:

> >> + */
> >> + if ((current->euid ^ task->suid) && (current->euid ^ task->uid) &&
> >> + (current->uid ^ task->suid) && (current->uid ^ task->uid) &&
> >
> > Obscure. Can you please explain the thinking behind putting this check in
> > here? Preferably via a comment...
>
> Also XOR is not a good substitute for a compare. Except in some
> strange corner cases, the code will always take more CPU cycles
> because XOR modifies oprands while compares don't need to.

May I submit a patch that removes these strange checks both for
check_kill_permission and sys_migrate_pages?

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