lkml.org 
[lkml]   [2010]   [Mar]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] modules fix incorrect percpu usage
On 03/31/2010 11:03 AM, Steven Rostedt wrote:
> I don't know. A possible "NULL pointer dereference" seems to me to be a
> pretty big user visible impact.
>
> I guess the question is, what's the risk of adding this change?

AFAICS, the risk is fairly low. per_cpu_ptr(pcpudest, cpu) is
SHIFT_PERCPU_PTR((ptr), per_cpu_offset((cpu))) which is just a fancy
way of saying "typeof(ptr)((unsigned long)(ptr) + per_cpu_offset(cpu))"
with enough obfuscation to prevent gcc from optimizing it incorrectly.

Thanks.

--
tejun


\
 
 \ /
  Last update: 2010-03-31 04:19    [W:0.227 / U:0.124 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site