Re: [PATCH 2/2] x86, MCE: Cleanup macro __get_cpu_var

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

 



On 04/14/2014 01:39 AM, Chen, Gong wrote:
> @@ -1287,14 +1287,14 @@ static unsigned long (*mce_adjust_timer)(unsigned long interval) =
>  
>  static int cmc_error_seen(void)
>  {
> -	unsigned long *v = &__get_cpu_var(mce_polled_error);
> +	unsigned long *v = this_cpu_ptr(&mce_polled_error);
>  
> -	return test_and_clear_bit(0, v);
> +	return this_cpu_xchg(*v, 0);
>  }
>  

Here you produce a pointer and *then* passing it through a this_cpu_
function... this is actively wrong.

It should simply be:

	return this_cpu_xchg(mce_polled_error, 0);

	-hpa

--
To unsubscribe from this list: send the line "unsubscribe linux-tip-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Stable Commits]     [Linux Stable Kernel]     [Linux Kernel]     [Linux USB Devel]     [Linux Video &Media]     [Linux Audio Users]     [Yosemite News]     [Linux SCSI]

  Powered by Linux