From: Michal Hocko <mhocko@suse.cz>
To: Don Zickus <dzickus@redhat.com>
Cc: Peter Wu <peter@lekensteyn.nl>,
linux-kernel@vger.kernel.org, linux-watchdog@vger.kernel.org
Subject: Re: Writing watchdog_thresh triggers BUG: sleeping function called from invalid context
Date: Tue, 17 Jun 2014 10:59:43 +0200 [thread overview]
Message-ID: <20140617085943.GA19886@dhcp22.suse.cz> (raw)
In-Reply-To: <20140616205245.GQ177152@redhat.com>
On Mon 16-06-14 16:52:45, Don Zickus wrote:
[...]
> Michal, do you remember why we needed preempt here? I wouldn't think it
> mattered as we are not doing anything per-cpu specific.
Yes, you are right. Preempt can be enabled because we are always
accessing watchdog_ev on a specific cpu so reschedule doesn't matter.
> Cheers,
> Don
>
> diff --git a/kernel/watchdog.c b/kernel/watchdog.c
> index 516203e..30e4822 100644
> --- a/kernel/watchdog.c
> +++ b/kernel/watchdog.c
> @@ -527,10 +527,8 @@ static void update_timers_all_cpus(void)
> int cpu;
>
> get_online_cpus();
> - preempt_disable();
> for_each_online_cpu(cpu)
> update_timers(cpu);
> - preempt_enable();
> put_online_cpus();
> }
>
--
Michal Hocko
SUSE Labs
prev parent reply other threads:[~2014-06-17 8:59 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-16 14:12 Peter Wu
2014-06-16 20:52 ` Don Zickus
2014-06-16 20:58 ` Peter Wu
2014-06-17 8:59 ` Michal Hocko [this message]
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=20140617085943.GA19886@dhcp22.suse.cz \
--to=mhocko@suse.cz \
--cc=dzickus@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-watchdog@vger.kernel.org \
--cc=peter@lekensteyn.nl \
/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®