Re: [GIT PULL] locking fixes

From: Peter Zijlstra
Date: Thu May 04 2017 - 01:41:11 EST


On Wed, May 03, 2017 at 04:21:01PM -0700, Linus Torvalds wrote:
> This is from last merge window, and the reason I react now is that
> nobody noticed or cared until we had a release..
>
> On Mon, Feb 27, 2017 at 11:57 PM, Ingo Molnar <mingo@xxxxxxxxxx> wrote:
> >
> > Peter Zijlstra (1):
> > locking/refcounts: Out-of-line everything
>
> This one is all good generally, but it has one really stupid side
> effect: it makes refcounting GPL-only.
>
> That's just silly. These are functions that atomically add and
> subtract one. The only thing that making them GPL-only can possibly do
> is to make people hack around it, and lose the overflow handling
> debugging in the process.

These people are out-of-tree dubious licensed modules, right? I really
_really_ don't care about those.

> It also breaks any kref uses. Which is what drivers etc are supposed to use.

Greg KH had this to say:

"As all of the previous kref functions were in a GPL-only header file,
and included directly that way, they were already GPL-only symbols, so
there really was no change here except now the linker checks them. If
you have questions about using inline GPL-only functions from a .h file,
in a non-GPL codebase, please consult your corporate lawyer to get
clarification."

https://lkml.kernel.org/r/20170308094810.GB30552@xxxxxxxxx

> So that "move from inline to out-of-line" had a big subtle semantic
> change that was probably not intentional, and certainly not
> documented.

I'll take the not documented bit.