linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: linux@arm.linux.org.uk (Russell King - ARM Linux)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] arm: fix oops in sched_clock_poll
Date: Wed, 19 Jan 2011 16:56:02 +0000	[thread overview]
Message-ID: <20110119165602.GA6335@n2100.arm.linux.org.uk> (raw)
In-Reply-To: <1295455641-4791-1-git-send-email-tom.leiming@gmail.com>

On Thu, Jan 20, 2011 at 12:47:21AM +0800, tom.leiming at gmail.com wrote:
> From: Ming Lei <tom.leiming@gmail.com>
> 
> The patch fixes one oops in sched_clock_poll, tested on
> beagle xm, follows the oops message:

> diff --git a/arch/arm/kernel/sched_clock.c b/arch/arm/kernel/sched_clock.c
> index 9a46370..782dd08 100644
> --- a/arch/arm/kernel/sched_clock.c
> +++ b/arch/arm/kernel/sched_clock.c
> @@ -21,7 +21,9 @@ static void (*sched_clock_update_fn)(void);
>  static void sched_clock_poll(unsigned long wrap_ticks)
>  {
>  	mod_timer(&sched_clock_timer, round_jiffies(jiffies + wrap_ticks));
> -	sched_clock_update_fn();
> +
> +	if (sched_clock_update_fn)
> +		sched_clock_update_fn();

It's called here because it's supposed to be initialized by the time this
function is called.  Please ensure that is the case.

If not, please make sure it is the case, otherwise you'll have a screwed
sched_clock (the timer won't catch the first wrap.)

  reply	other threads:[~2011-01-19 16:56 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-19 16:47 [PATCH] arm: fix oops in sched_clock_poll tom.leiming at gmail.com
2011-01-19 16:56 ` Russell King - ARM Linux [this message]
2011-01-20  4:35   ` Ming Lei
2011-07-08 16:44 ` Russell King - ARM Linux

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=20110119165602.GA6335@n2100.arm.linux.org.uk \
    --to=linux@arm.linux.org.uk \
    --cc=linux-arm-kernel@lists.infradead.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;
as well as URLs for NNTP newsgroup(s).