lkml.org 
[lkml]   [2008]   [Oct]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: BKL still required for what functions?
From
Date
Richard Holden <aciddeath@gmail.com> writes:

> I'm doing some driver cleanup on the ixj telephony driver, mostly
> copy/ paste and common code refactoring. I'm also looking at trying to
> get rid of the BKL from the 2 places its used, so I was wondering if
> we have a list of kernel calls that still require the BKL to be held,
> and if we don't have a list would it be worthwhile to put one into
> Documentation, I'd be willing to maintain the list as we removed the
> BKL from the last core kernel places.

The standard answer is to check the callers.

But in general there are very little (in fact I cannot think of any)
general kernel utility functions left that need the BKL and if they
then usually take it on their own. So you should be ok
assuming that general kernel code (e.g. code living in kernel/*
or lib/*) doesn't need it.

If you rely on other driver frameworks that might be different,
but a good rule of thumb is to just check that directly if it
uses lock_kernel at all.

The reason that a lot of driver code still uses BKL implicitely
(e.g. in ioctl code) is more because it always needs someone
to audit.

-Andi

--
ak@linux.intel.com


\
 
 \ /
  Last update: 2008-10-07 08:31    [W:0.084 / U:7.288 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site