Re: [PATCH] sound_core.c: Remove BKL from soundcore_open

From: Jonathan Corbet
Date: Sun Oct 11 2009 - 11:21:40 EST


On Sun, 11 Oct 2009 02:25:53 +0200 (CEST)
John Kacur <jkacur@xxxxxxxxxx> wrote:

> Yikes, I missed that. Still I'm loath to just push it down like that. I
> wonder if I can use a mutex there. What about the following patch?

Unfortunately, it's often not quite that simple. What if, say, there's
an ioctl() function somewhere which is depending on the BKL for
exclusion here? This change would then introduce races. Changing the
BKL to a mutex is a real semantic change which requires a real survey
of the code affected.

That's why the pushdown approach has been taken so often. It's a pain,
but it eventually shines a spotlight on every bit of affected code.

jon
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/