lkml.org 
[lkml]   [2014]   [Mar]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 05/48] percpu: Add preemption checks to __this_cpu ops
On Tue, 4 Mar 2014, Andrew Morton wrote:

> > print_symbol("caller is %s\n", (long)__builtin_return_address(0));
> > dump_stack();
>
> I wonder if there's any point in printing __builtin_return_address.
> Doesn't dump_stack() tell us the same thing?

Yes it does. However, it was there before and software may scan the logs
for it.

> > +notrace void __this_cpu_preempt_check(const char *op)
> > +{
> > + char text[40];
> > +
> > + snprintf(text, sizeof(text), "__this_cpu_%s()", op);
> > + check_preemption_disabled(text);
> > +}
>
> I'd like to see a comment here telling scared readers why this can
> never overflow text[].

Ok. I can also add VM_BUG_ON(strlen(op) >= sizeof(text)) ?



\
 
 \ /
  Last update: 2014-03-05 19:02    [W:0.101 / U:0.192 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site