mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Kefeng Wang <wangkefeng.wang@huawei.com>
To: Divya Indi <divya.indi@oracle.com>, <linux-kernel@vger.kernel.org>
Cc: Steven Rostedt <rostedt@goodmis.org>,
	Aruna Ramakrishna <aruna.ramakrishna@oracle.com>
Subject: Re: [PATCH v2] sample-trace-array: Fix sleeping function called from invalid context
Date: Wed, 10 Jun 2020 09:07:32 +0800	[thread overview]
Message-ID: <aff79eb0-a05b-8040-ba21-007cc8d53cb1@huawei.com> (raw)
In-Reply-To: <53201591-082d-7e42-9043-237ae4239da6@oracle.com>


On 2020/6/10 0:29, Divya Indi wrote:
> On 6/9/20 6:51 AM, Kefeng Wang wrote:
>>   BUG: sleeping function called from invalid context at kernel/locking/mutex.c:935
>>   in_atomic(): 1, irqs_disabled(): 0, non_block: 0, pid: 0, name: swapper/5
>>   1 lock held by swapper/5/0:
>>    #0: ffff80001002bd90 (samples/ftrace/sample-trace-array.c:38){+.-.}-{0:0}, at: call_timer_fn+0x8/0x3e0
>>   CPU: 5 PID: 0 Comm: swapper/5 Not tainted 5.7.0+ #8
>>   Hardware name: QEMU QEMU Virtual Machine, BIOS 0.0.0 02/06/2015
>>   Call trace:
>>    dump_backtrace+0x0/0x1a0
>>    show_stack+0x20/0x30
>>    dump_stack+0xe4/0x150
>>    ___might_sleep+0x160/0x200
>>    __might_sleep+0x58/0x90
>>    __mutex_lock+0x64/0x948
>>    mutex_lock_nested+0x3c/0x58
>>    __ftrace_set_clr_event+0x44/0x88
>>    trace_array_set_clr_event+0x24/0x38
>>    mytimer_handler+0x34/0x40 [sample_trace_array]
>>
>> mutex_lock() will be called in interrupt context, using workqueue to fix it.
> Fixes:
Missing it, will send v3, thanks.
>> Signed-off-by: Kefeng Wang <wangkefeng.wang@huawei.com>
> Reviewed-by: Divya Indi <divya.indi@oracle.com>
>
>


  reply	other threads:[~2020-06-10  1:07 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-08  7:54 [PATCH] " Kefeng Wang
2020-06-08 14:37 ` Steven Rostedt
2020-06-09  0:10   ` Divya Indi
2020-06-09  5:14 ` Divya Indi
2020-06-09 13:51   ` [PATCH v2] " Kefeng Wang
2020-06-09 16:29     ` Divya Indi
2020-06-10  1:07       ` Kefeng Wang [this message]
2020-06-10  1:12       ` [PATCH v3] " Kefeng Wang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=aff79eb0-a05b-8040-ba21-007cc8d53cb1@huawei.com \
    --to=wangkefeng.wang@huawei.com \
    --cc=aruna.ramakrishna@oracle.com \
    --cc=divya.indi@oracle.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rostedt@goodmis.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®