Re: [PATCH] refcount: restore kref_get and kref_put to non-GPL status

2017-03-08 Thread Christoph Hellwig
Hi John,

all Linux kernel code is licenced under the GPLv2.0, and maybe only
be used by derived works if that work is available under a
GPL-compatible license.  the _GPL export are just a very strong hint
that it's almost impossible not to be derived work - using non-trivial
inline functions should be a just as strong hint so this is not going
to change anything.


Re: [PATCH] refcount: restore kref_get and kref_put to non-GPL status

2017-03-08 Thread Christoph Hellwig
Hi John,

all Linux kernel code is licenced under the GPLv2.0, and maybe only
be used by derived works if that work is available under a
GPL-compatible license.  the _GPL export are just a very strong hint
that it's almost impossible not to be derived work - using non-trivial
inline functions should be a just as strong hint so this is not going
to change anything.


Re: [PATCH] refcount: restore kref_get and kref_put to non-GPL status

2017-03-08 Thread Greg Kroah-Hartman
On Wed, Mar 08, 2017 at 01:25:49AM -0800, john.hubb...@gmail.com wrote:
> From: John Hubbard 
> 
> Originally, kref_get and kref_put were available as
> standard routines that even non-GPL device drivers
> could use.

As I stated in my response to the 0/1 of this patch, this sentence is
not true, sorry, the inlined functions were GPL-v2-only.

thanks,

greg k-h


Re: [PATCH] refcount: restore kref_get and kref_put to non-GPL status

2017-03-08 Thread Greg Kroah-Hartman
On Wed, Mar 08, 2017 at 01:25:49AM -0800, john.hubb...@gmail.com wrote:
> From: John Hubbard 
> 
> Originally, kref_get and kref_put were available as
> standard routines that even non-GPL device drivers
> could use.

As I stated in my response to the 0/1 of this patch, this sentence is
not true, sorry, the inlined functions were GPL-v2-only.

thanks,

greg k-h


Re: [PATCH] refcount: restore kref_get and kref_put to non-GPL status

2017-03-08 Thread John Hubbard



On 03/08/2017 01:50 AM, Greg Kroah-Hartman wrote:

On Wed, Mar 08, 2017 at 01:25:49AM -0800, john.hubb...@gmail.com wrote:

From: John Hubbard 

Originally, kref_get and kref_put were available as
standard routines that even non-GPL device drivers
could use.


As I stated in my response to the 0/1 of this patch, this sentence is
not true, sorry, the inlined functions were GPL-v2-only.


OK, got it. I overlooked that point.

thanks
John Hubbard
NVIDIA



thanks,

greg k-h



Re: [PATCH] refcount: restore kref_get and kref_put to non-GPL status

2017-03-08 Thread John Hubbard



On 03/08/2017 01:50 AM, Greg Kroah-Hartman wrote:

On Wed, Mar 08, 2017 at 01:25:49AM -0800, john.hubb...@gmail.com wrote:

From: John Hubbard 

Originally, kref_get and kref_put were available as
standard routines that even non-GPL device drivers
could use.


As I stated in my response to the 0/1 of this patch, this sentence is
not true, sorry, the inlined functions were GPL-v2-only.


OK, got it. I overlooked that point.

thanks
John Hubbard
NVIDIA



thanks,

greg k-h



[PATCH] refcount: restore kref_get and kref_put to non-GPL status

2017-03-08 Thread john . hubbard
From: John Hubbard 

Originally, kref_get and kref_put were available as
standard routines that even non-GPL device drivers
could use. However, as an unintended side effect of
the recent kref_*() upgrade[1], these calls are now
effectively GPL, because they get routed to the
new refcount_inc() and refcount_dec_and_test()
routines.

Make just those routines non-GPL, in order to restore
the original behavior--and to avoid forcing simple
users of krefs to re-implement atomic refcounting.

[1] commit 10383aea2f44 ("kref: Implement 'struct kref' using refcount_t")

Signed-off-by: John Hubbard 
---
 lib/refcount.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lib/refcount.c b/lib/refcount.c
index aa09ad3c30b0..6421a4930484 100644
--- a/lib/refcount.c
+++ b/lib/refcount.c
@@ -113,7 +113,7 @@ void refcount_inc(refcount_t *r)
 {
WARN_ONCE(!refcount_inc_not_zero(r), "refcount_t: increment on 0; 
use-after-free.\n");
 }
-EXPORT_SYMBOL_GPL(refcount_inc);
+EXPORT_SYMBOL(refcount_inc);
 
 bool refcount_sub_and_test(unsigned int i, refcount_t *r)
 {
@@ -152,7 +152,7 @@ bool refcount_dec_and_test(refcount_t *r)
 {
return refcount_sub_and_test(1, r);
 }
-EXPORT_SYMBOL_GPL(refcount_dec_and_test);
+EXPORT_SYMBOL(refcount_dec_and_test);
 
 /*
  * Similar to atomic_dec(), it will WARN on underflow and fail to decrement
-- 
2.12.0



[PATCH] refcount: restore kref_get and kref_put to non-GPL status

2017-03-08 Thread john . hubbard
From: John Hubbard 

Originally, kref_get and kref_put were available as
standard routines that even non-GPL device drivers
could use. However, as an unintended side effect of
the recent kref_*() upgrade[1], these calls are now
effectively GPL, because they get routed to the
new refcount_inc() and refcount_dec_and_test()
routines.

Make just those routines non-GPL, in order to restore
the original behavior--and to avoid forcing simple
users of krefs to re-implement atomic refcounting.

[1] commit 10383aea2f44 ("kref: Implement 'struct kref' using refcount_t")

Signed-off-by: John Hubbard 
---
 lib/refcount.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lib/refcount.c b/lib/refcount.c
index aa09ad3c30b0..6421a4930484 100644
--- a/lib/refcount.c
+++ b/lib/refcount.c
@@ -113,7 +113,7 @@ void refcount_inc(refcount_t *r)
 {
WARN_ONCE(!refcount_inc_not_zero(r), "refcount_t: increment on 0; 
use-after-free.\n");
 }
-EXPORT_SYMBOL_GPL(refcount_inc);
+EXPORT_SYMBOL(refcount_inc);
 
 bool refcount_sub_and_test(unsigned int i, refcount_t *r)
 {
@@ -152,7 +152,7 @@ bool refcount_dec_and_test(refcount_t *r)
 {
return refcount_sub_and_test(1, r);
 }
-EXPORT_SYMBOL_GPL(refcount_dec_and_test);
+EXPORT_SYMBOL(refcount_dec_and_test);
 
 /*
  * Similar to atomic_dec(), it will WARN on underflow and fail to decrement
-- 
2.12.0