Attachment 'linux-kernel-markers-support-multiple-probes-update.patch'

Download

   1 From: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
   2 
   3 - Add comments requested by Andrew.
   4 
   5 Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
   6 Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
   7 ---
   8 
   9  kernel/marker.c |    8 +++++++-
  10  1 file changed, 7 insertions(+), 1 deletion(-)
  11 
  12 diff -puN kernel/marker.c~linux-kernel-markers-support-multiple-probes-update kernel/marker.c
  13 --- a/kernel/marker.c~linux-kernel-markers-support-multiple-probes-update
  14 +++ a/kernel/marker.c
  15 @@ -49,6 +49,7 @@ static DEFINE_MUTEX(markers_mutex);
  16   * between two consecutive operation (add or remove) on a given marker.  It is
  17   * also used to delay the free of multiple probes array until a quiescent state
  18   * is reached.
  19 + * marker entries modifications are protected by the markers_mutex.
  20   */
  21  struct marker_entry {
  22  	struct hlist_node hlist;
  23 @@ -102,6 +103,11 @@ void marker_probe_cb(const struct marker
  24  	va_list args;
  25  	char ptype;
  26  
  27 +	/*
  28 +	 * disabling preemption to make sure the teardown of the callbacks can
  29 +	 * be done correctly when they are in modules and they insure RCU read
  30 +	 * coherency.
  31 +	 */
  32  	preempt_disable();
  33  	ptype = ACCESS_ONCE(mdata->ptype);
  34  	if (likely(!ptype)) {
  35 @@ -196,7 +202,7 @@ static void free_old_closure(struct rcu_
  36  	entry->rcu_pending = 0;
  37  }
  38  
  39 -static inline void debug_print_probes(struct marker_entry *entry)
  40 +static void debug_print_probes(struct marker_entry *entry)
  41  {
  42  	int i;
  43  
  44 _

Attached Files

To refer to attachments on a page, use attachment:filename, as shown below in the list of files. Do NOT use the URL of the [get] link, since this is subject to change and can break easily.

You are not allowed to attach a file to this page.