lkml.org 
[lkml]   [2004]   [Aug]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] Reduce bkl usage in do_coredump
Dave Hansen <haveblue@us.ibm.com> wrote:
>
> > - format_corename(corename, core_pattern, signr);
> > + /*
> > + * lock_kernel() because format_corename() is controlled by sysctl, which
> > + * uses lock_kernel()
> > + */
> > + lock_kernel();
> > + format_corename(corename, core_pattern, signr);
> > + unlock_kernel();
>
> Might be nicer to just put the locking inside of format_corename() if it
> is the function itself that really needs the locking.

Nope. format_corename() just takes a char *. It has no knowledge about
what that char*'s locking rules are. It's the caller who chose to use a
char* which is protected by lock_kernel().
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 14:05    [W:0.021 / U:0.696 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site