2015-08-04 17:26:24

by Tim Gardner

[permalink] [raw]
Subject: [PATCH 4.2-rc5] workqueue: Make flush_workqueue() available again to non GPL modules

From: Tim Gardner <[email protected]>

Commit 37b1ef31a568fc02e53587620226e5f3c66454c8 ("workqueue: move
flush_scheduled_work() to workqueue.h") moved the exported non GPL
flush_scheduled_work() from a function to an inline wrapper.
Unfortunately, it directly calls flush_workqueue() which is a GPL function.
This has the effect of changing the licensing requirement for this function
and makes it unavailable to non GPL modules.

See commit ad7b1f841f8a54c6d61ff181451f55b68175e15a ("workqueue: Make
schedule_work() available again to non GPL modules") for precedent.

Cc: Tejun Heo <[email protected]>
Signed-off-by: Tim Gardner <[email protected]>
---
kernel/workqueue.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kernel/workqueue.c b/kernel/workqueue.c
index 4c4f061..a413acb 100644
--- a/kernel/workqueue.c
+++ b/kernel/workqueue.c
@@ -2614,7 +2614,7 @@ void flush_workqueue(struct workqueue_struct *wq)
out_unlock:
mutex_unlock(&wq->mutex);
}
-EXPORT_SYMBOL_GPL(flush_workqueue);
+EXPORT_SYMBOL(flush_workqueue);

/**
* drain_workqueue - drain a workqueue
--
1.9.1


2015-08-04 18:05:24

by Tejun Heo

[permalink] [raw]
Subject: Re: [PATCH 4.2-rc5] workqueue: Make flush_workqueue() available again to non GPL modules

On Tue, Aug 04, 2015 at 11:26:04AM -0600, [email protected] wrote:
> From: Tim Gardner <[email protected]>
>
> Commit 37b1ef31a568fc02e53587620226e5f3c66454c8 ("workqueue: move
> flush_scheduled_work() to workqueue.h") moved the exported non GPL
> flush_scheduled_work() from a function to an inline wrapper.
> Unfortunately, it directly calls flush_workqueue() which is a GPL function.
> This has the effect of changing the licensing requirement for this function
> and makes it unavailable to non GPL modules.
>
> See commit ad7b1f841f8a54c6d61ff181451f55b68175e15a ("workqueue: Make
> schedule_work() available again to non GPL modules") for precedent.
>
> Cc: Tejun Heo <[email protected]>
> Signed-off-by: Tim Gardner <[email protected]>

Applied to wq/for-4.3.

Thanks.

--
tejun

2015-08-05 09:54:12

by David Laight

[permalink] [raw]
Subject: Re: [PATCH 4.2-rc5] workqueue: Make flush_workqueue() available again to non GPL modules

> From: Tejun Heo
> Date: 2015-08-04 18:05:20
> On Tue, Aug 04, 2015 at 11:26:04AM -0600, [email protected] wrote:
> > From: Tim Gardner <[email protected]>
> >
> > Commit 37b1ef31a568fc02e53587620226e5f3c66454c8 ("workqueue: move
> > flush_scheduled_work() to workqueue.h") moved the exported non GPL
> > flush_scheduled_work() from a function to an inline wrapper.
> > Unfortunately, it directly calls flush_workqueue() which is a GPL function.
> > This has the effect of changing the licensing requirement for this function
> > and makes it unavailable to non GPL modules.
> >
> > See commit ad7b1f841f8a54c6d61ff181451f55b68175e15a ("workqueue: Make
> > schedule_work() available again to non GPL modules") for precedent.
> >
> > Cc: Tejun Heo <[email protected]>
> > Signed-off-by: Tim Gardner <[email protected]>
>
> Applied to wq/for-4.3.

I hit this yesterday afternoon as well!

Can we get the fix into 4.2 itself ?

David

2015-08-20 10:16:18

by David Laight

[permalink] [raw]
Subject: RE: Re: [PATCH 4.2-rc5] workqueue: Make flush_workqueue() available again to non GPL modules

From: David Laight
> Sent: 05 August 2015 10:52
> To: [email protected]
> Subject: Re: [PATCH 4.2-rc5] workqueue: Make flush_workqueue() available again to non GPL modules
>
> > From: Tejun Heo
> > Date: 2015-08-04 18:05:20
> > On Tue, Aug 04, 2015 at 11:26:04AM -0600, [email protected] wrote:
> > > From: Tim Gardner <[email protected]>
> > >
> > > Commit 37b1ef31a568fc02e53587620226e5f3c66454c8 ("workqueue: move
> > > flush_scheduled_work() to workqueue.h") moved the exported non GPL
> > > flush_scheduled_work() from a function to an inline wrapper.
> > > Unfortunately, it directly calls flush_workqueue() which is a GPL function.
> > > This has the effect of changing the licensing requirement for this function
> > > and makes it unavailable to non GPL modules.
> > >
> > > See commit ad7b1f841f8a54c6d61ff181451f55b68175e15a ("workqueue: Make
> > > schedule_work() available again to non GPL modules") for precedent.
> > >
> > > Cc: Tejun Heo <[email protected]>
> > > Signed-off-by: Tim Gardner <[email protected]>
> >
> > Applied to wq/for-4.3.
>
> I hit this yesterday afternoon as well!
>
> Can we get the fix into 4.2 itself ?

This doesn't seem to be in 4.2 yet.
It is an interface regression that will cause grief.

David
(I'm not subscribed to linux-kernel, so copy me in any responses.)