[PATCH] export the queue_work wrappers GPL-only



This patch (as777) fixes an oversight in a couple of earlier patches. Now
the wrapper routines:

queue_work(), queue_delayed_work(), queue_delayed_work_on(),
schedule_work(), schedule_delayed_work(), and
schedule_delayed_work_on()

are exported GPL-only, just as the originals used to be.

Signed-off-by: Alan Stern <stern@xxxxxxxxxxxxxxxxxxx>

---

On Tue, 29 Aug 2006, Jonathan Corbet wrote:

One little thing I just noticed. The old queue_work() functions were
exported GPL-only. And the new ones are too:

-EXPORT_SYMBOL_GPL(queue_work);
+EXPORT_SYMBOL_GPL(add_work_to_q);

But the new wrappers are not:

+EXPORT_SYMBOL(queue_work);

They should probably be exported in the same mode as before.

You're right... I don't know how I managed to miss that.

Also, should there be an entry added to
Documentation/feature-removal-schedule.txt?

It's a question of whether anyone feels the need to remove the legacy
routines.

Andrew, if you think that after (say) a year's time those WARN_ON()s no
longer serve any useful purpose, I could do a big search-and-replace to
get rid of those old functions entirely. I assume there's no problem with
accepting patches that change hundreds of files.

Alan Stern


Index: mm/kernel/workqueue.c
===================================================================
--- mm.orig/kernel/workqueue.c
+++ mm/kernel/workqueue.c
@@ -501,7 +501,7 @@ void fastcall queue_work(struct workqueu
rc = add_work_to_q(wq, work);
WARN_ON(rc < 0);
}
-EXPORT_SYMBOL(queue_work);
+EXPORT_SYMBOL_GPL(queue_work);

void fastcall queue_delayed_work(struct workqueue_struct *wq,
struct work_struct *work, unsigned long delay)
@@ -511,7 +511,7 @@ void fastcall queue_delayed_work(struct
rc = add_delayed_work_to_q(wq, work, delay);
WARN_ON(rc < 0);
}
-EXPORT_SYMBOL(queue_delayed_work);
+EXPORT_SYMBOL_GPL(queue_delayed_work);

void queue_delayed_work_on(int cpu, struct workqueue_struct *wq,
struct work_struct *work, unsigned long delay)
@@ -521,7 +521,7 @@ void queue_delayed_work_on(int cpu, stru
rc = add_delayed_work_to_q_on(cpu, wq, work, delay);
WARN_ON(rc < 0);
}
-EXPORT_SYMBOL(queue_delayed_work_on);
+EXPORT_SYMBOL_GPL(queue_delayed_work_on);

void fastcall schedule_work(struct work_struct *work)
{
@@ -530,7 +530,7 @@ void fastcall schedule_work(struct work_
rc = add_work_to_q(keventd_wq, work);
WARN_ON(rc < 0);
}
-EXPORT_SYMBOL(schedule_work);
+EXPORT_SYMBOL_GPL(schedule_work);

void fastcall schedule_delayed_work(struct work_struct *work,
unsigned long delay)
@@ -540,7 +540,7 @@ void fastcall schedule_delayed_work(stru
rc = add_delayed_work_to_q(keventd_wq, work, delay);
WARN_ON(rc < 0);
}
-EXPORT_SYMBOL(schedule_delayed_work);
+EXPORT_SYMBOL_GPL(schedule_delayed_work);

void schedule_delayed_work_on(int cpu, struct work_struct *work,
unsigned long delay)
@@ -550,7 +550,7 @@ void schedule_delayed_work_on(int cpu, s
rc = add_delayed_work_to_q_on(cpu, keventd_wq, work, delay);
WARN_ON(rc < 0);
}
-EXPORT_SYMBOL(schedule_delayed_work_on);
+EXPORT_SYMBOL_GPL(schedule_delayed_work_on);

/**
* schedule_on_each_cpu - call a function on each online CPU from keventd

-
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/



Relevant Pages

  • Re: Updated Lockup Patches, 2.6.0 Nforce2, apic timer ack delay, ioapic edge for NMI debug
    ... 195MHz FSB, on 1Gig RAM. ... These patches have worked for me. ... and how well the delay times chosen suit it. ... send the line "unsubscribe linux-kernel" in ...
    (Linux-Kernel)
  • Re: zoom G2
    ... Compressor: CP ... ZNR: nr. ... Delay: EC ... I think the best thin is to arrange the patches in pairs or groups of three. ...
    (alt.guitar)
  • [Patch 0/9] Per-task delay accounting
    ... This is the next iteration of the delay accounting patches ... The major changes to the patches (and names of commenters whose concerns ... Now most delays seen in I/O submission are not being collected. ... further improving the generic netlink interface which is ongoing. ...
    (Linux-Kernel)
  • Excel delay in responding
    ... Word 2000 and I haven't installed any patches. ... When I open a file in either Word or Excel, ... After the initial delay the response time "usually" ... >>deleting lines asfter installing updates? ...
    (microsoft.public.excel.crashesgpfs)