On Mon, 2004-08-09 at 07:38, Josh Aas wrote: > A patch that reduces bkl usage in do_coredump is attached. I don't see > anywhere that it is necessary except for the call to format_corename, > which is controlled via sysctl (sys_sysctl holds the bkl). > - 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. If another use of it popped up, that user would get the locking for free and couldn't possibly forget it. Also, it's nicer to put the lock closer to the code that actually needs it. Untested patch to do that attached. BTW, were you actually seeing a BKL contention problem, or was this just for cleanliness? -- Dave