Re: [PATCH 25/26] kprobes: Convert to raw_spinlocks

From: Frederic Weisbecker
Date: Mon Jan 11 2010 - 22:54:59 EST


On Mon, Jan 11, 2010 at 10:26:55PM +0100, John Kacur wrote:
> Convert locks which cannot be sleeping locks in preempt-rt to raw_spinlocks.
>
> See also dc23e836d8d25fe5aa4057d54dae2094fbc614f6
>
> Signed-off-by: John Kacur <jkacur@xxxxxxxxxx>
> ---
> include/linux/kprobes.h | 2 +-
> kernel/kprobes.c | 34 +++++++++++++++++-----------------
> 2 files changed, 18 insertions(+), 18 deletions(-)
>
> diff --git a/include/linux/kprobes.h b/include/linux/kprobes.h
> index 1b672f7..620df87 100644
> --- a/include/linux/kprobes.h
> +++ b/include/linux/kprobes.h
> @@ -170,7 +170,7 @@ struct kretprobe {
> int nmissed;
> size_t data_size;
> struct hlist_head free_instances;
> - spinlock_t lock;
> + raw_spinlock_t lock;
> };


Indeed, this lock seems to be taken when a probe triggers, which
can happen in about every places/context.

Please add a comment to explain this though.

(Adding Masami in Cc).

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