Re: [PATCH x86/mm 05/11] x86 ptrace getreg/putreg merge

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

 



On Thu, 29 Nov 2007 03:59:54 -0800 (PST) Roland McGrath <[email protected]> wrote:

> +/*
> + * Determines whether a value may be installed in a segment register.
> + */
> +#define invalid_selector(value) \
> +	((value) != 0 && ((value) & SEGMENT_RPL_MASK) != USER_RPL)

This didn't need to be implemented as a macro hence it shouldn't have been.

It references its arg more than once and is dangerous.  Calling
invalid_selector(foo++) will increment foo by one or two, depending upon
foo's value.

-
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