From: Frank Lee <tiny.windzz@gmail.com>
To: Olof Johansson <olof@lixom.net>
Cc: Tony Lindgren <tony@atomide.com>,
Daniel Lezcano <daniel.lezcano@linaro.org>,
Thomas Gleixner <tglx@linutronix.de>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
linux-omap <linux-omap@vger.kernel.org>,
Linux ARM Mailing List <linux-arm-kernel@lists.infradead.org>
Subject: Re: [PATCH] clocksource: timer-ti-dm: Fix regression
Date: Wed, 8 Jan 2020 03:14:59 +0800 [thread overview]
Message-ID: <CAEExFWuQuTHNsjABpSBAa46NzftHS0+nLLG=qdEcaeatLZFLeQ@mail.gmail.com> (raw)
In-Reply-To: <CAOesGMiNbyUXwPFsG-ipTn-xfEs+A2hG8Q8MTcSLz5794GCv0g@mail.gmail.com>
On Tue, Jan 7, 2020 at 5:07 AM Olof Johansson <olof@lixom.net> wrote:
>
> On Mon, Jan 6, 2020 at 12:37 PM Tony Lindgren <tony@atomide.com> wrote:
> >
> > Clean-up commit 8c82723414d5 ("clocksource/drivers/timer-ti-dm: Switch to
> > platform_get_irq") caused a regression where we now try to access
> > uninitialized data for timer:
> >
> > drivers/clocksource/timer-ti-dm.c: In function 'omap_dm_timer_probe':
> > drivers/clocksource/timer-ti-dm.c:798:13: warning: 'timer' may be used
> > uninitialized in this function [-Wmaybe-uninitialized]
> >
> > On boot we now get:
> >
> > Unable to handle kernel NULL pointer dereference at virtual address
> > 00000004
> > ...
> > (omap_dm_timer_probe) from [<c061ac7c>] (platform_drv_probe+0x48/0x98)
> > (platform_drv_probe) from [<c0618c04>] (really_probe+0x1dc/0x348)
> > (really_probe) from [<c0618ef4>] (driver_probe_device+0x5c/0x160)
> >
> > Let's fix the issue by moving platform_get_irq to happen after timer has
> > been allocated.
> >
> > Fixes: 8c82723414d5 ("clocksource/drivers/timer-ti-dm: Switch to platform_get_irq")
> > Cc: Yangtao Li <tiny.windzz@gmail.com>
> > Signed-off-by: Tony Lindgren <tony@atomide.com>
>
> Acked-by: Olof Johansson <olof@lixom.net>
Acked-by: Yangtao Li <tiny.windzz@gmail.com>
I am sorry. I will pay attention next time.
>
> > ---
> >
> > I did not notice simlar issue with other patches in the series, but
> > please do double check Yangtao.
>
> Yeah, this even seems to be caught at build (but our builds have been
> so noisy with warnings lately that they're hard to spot):
>
> /build/drivers/clocksource/timer-ti-dm.c: In function 'omap_dm_timer_probe':
> /build/drivers/clocksource/timer-ti-dm.c:798:13: warning: 'timer' may
> be used uninitialized in this function [-Wmaybe-uninitialized]
> 798 | timer->irq = platform_get_irq(pdev, 0);
> | ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~
>
>
> -Olof
WARNING: multiple messages have this Message-ID (diff)
From: Frank Lee <tiny.windzz@gmail.com>
To: Olof Johansson <olof@lixom.net>
Cc: Tony Lindgren <tony@atomide.com>,
Daniel Lezcano <daniel.lezcano@linaro.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Thomas Gleixner <tglx@linutronix.de>,
linux-omap <linux-omap@vger.kernel.org>,
Linux ARM Mailing List <linux-arm-kernel@lists.infradead.org>
Subject: Re: [PATCH] clocksource: timer-ti-dm: Fix regression
Date: Wed, 8 Jan 2020 03:14:59 +0800 [thread overview]
Message-ID: <CAEExFWuQuTHNsjABpSBAa46NzftHS0+nLLG=qdEcaeatLZFLeQ@mail.gmail.com> (raw)
In-Reply-To: <CAOesGMiNbyUXwPFsG-ipTn-xfEs+A2hG8Q8MTcSLz5794GCv0g@mail.gmail.com>
On Tue, Jan 7, 2020 at 5:07 AM Olof Johansson <olof@lixom.net> wrote:
>
> On Mon, Jan 6, 2020 at 12:37 PM Tony Lindgren <tony@atomide.com> wrote:
> >
> > Clean-up commit 8c82723414d5 ("clocksource/drivers/timer-ti-dm: Switch to
> > platform_get_irq") caused a regression where we now try to access
> > uninitialized data for timer:
> >
> > drivers/clocksource/timer-ti-dm.c: In function 'omap_dm_timer_probe':
> > drivers/clocksource/timer-ti-dm.c:798:13: warning: 'timer' may be used
> > uninitialized in this function [-Wmaybe-uninitialized]
> >
> > On boot we now get:
> >
> > Unable to handle kernel NULL pointer dereference at virtual address
> > 00000004
> > ...
> > (omap_dm_timer_probe) from [<c061ac7c>] (platform_drv_probe+0x48/0x98)
> > (platform_drv_probe) from [<c0618c04>] (really_probe+0x1dc/0x348)
> > (really_probe) from [<c0618ef4>] (driver_probe_device+0x5c/0x160)
> >
> > Let's fix the issue by moving platform_get_irq to happen after timer has
> > been allocated.
> >
> > Fixes: 8c82723414d5 ("clocksource/drivers/timer-ti-dm: Switch to platform_get_irq")
> > Cc: Yangtao Li <tiny.windzz@gmail.com>
> > Signed-off-by: Tony Lindgren <tony@atomide.com>
>
> Acked-by: Olof Johansson <olof@lixom.net>
Acked-by: Yangtao Li <tiny.windzz@gmail.com>
I am sorry. I will pay attention next time.
>
> > ---
> >
> > I did not notice simlar issue with other patches in the series, but
> > please do double check Yangtao.
>
> Yeah, this even seems to be caught at build (but our builds have been
> so noisy with warnings lately that they're hard to spot):
>
> /build/drivers/clocksource/timer-ti-dm.c: In function 'omap_dm_timer_probe':
> /build/drivers/clocksource/timer-ti-dm.c:798:13: warning: 'timer' may
> be used uninitialized in this function [-Wmaybe-uninitialized]
> 798 | timer->irq = platform_get_irq(pdev, 0);
> | ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~
>
>
> -Olof
WARNING: multiple messages have this Message-ID (diff)
From: Frank Lee <tiny.windzz@gmail.com>
To: Olof Johansson <olof@lixom.net>
Cc: Tony Lindgren <tony@atomide.com>,
Daniel Lezcano <daniel.lezcano@linaro.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Thomas Gleixner <tglx@linutronix.de>,
linux-omap <linux-omap@vger.kernel.org>,
Linux ARM Mailing List <linux-arm-kernel@lists.infradead.org>
Subject: Re: [PATCH] clocksource: timer-ti-dm: Fix regression
Date: Wed, 8 Jan 2020 03:14:59 +0800 [thread overview]
Message-ID: <CAEExFWuQuTHNsjABpSBAa46NzftHS0+nLLG=qdEcaeatLZFLeQ@mail.gmail.com> (raw)
In-Reply-To: <CAOesGMiNbyUXwPFsG-ipTn-xfEs+A2hG8Q8MTcSLz5794GCv0g@mail.gmail.com>
On Tue, Jan 7, 2020 at 5:07 AM Olof Johansson <olof@lixom.net> wrote:
>
> On Mon, Jan 6, 2020 at 12:37 PM Tony Lindgren <tony@atomide.com> wrote:
> >
> > Clean-up commit 8c82723414d5 ("clocksource/drivers/timer-ti-dm: Switch to
> > platform_get_irq") caused a regression where we now try to access
> > uninitialized data for timer:
> >
> > drivers/clocksource/timer-ti-dm.c: In function 'omap_dm_timer_probe':
> > drivers/clocksource/timer-ti-dm.c:798:13: warning: 'timer' may be used
> > uninitialized in this function [-Wmaybe-uninitialized]
> >
> > On boot we now get:
> >
> > Unable to handle kernel NULL pointer dereference at virtual address
> > 00000004
> > ...
> > (omap_dm_timer_probe) from [<c061ac7c>] (platform_drv_probe+0x48/0x98)
> > (platform_drv_probe) from [<c0618c04>] (really_probe+0x1dc/0x348)
> > (really_probe) from [<c0618ef4>] (driver_probe_device+0x5c/0x160)
> >
> > Let's fix the issue by moving platform_get_irq to happen after timer has
> > been allocated.
> >
> > Fixes: 8c82723414d5 ("clocksource/drivers/timer-ti-dm: Switch to platform_get_irq")
> > Cc: Yangtao Li <tiny.windzz@gmail.com>
> > Signed-off-by: Tony Lindgren <tony@atomide.com>
>
> Acked-by: Olof Johansson <olof@lixom.net>
Acked-by: Yangtao Li <tiny.windzz@gmail.com>
I am sorry. I will pay attention next time.
>
> > ---
> >
> > I did not notice simlar issue with other patches in the series, but
> > please do double check Yangtao.
>
> Yeah, this even seems to be caught at build (but our builds have been
> so noisy with warnings lately that they're hard to spot):
>
> /build/drivers/clocksource/timer-ti-dm.c: In function 'omap_dm_timer_probe':
> /build/drivers/clocksource/timer-ti-dm.c:798:13: warning: 'timer' may
> be used uninitialized in this function [-Wmaybe-uninitialized]
> 798 | timer->irq = platform_get_irq(pdev, 0);
> | ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~
>
>
> -Olof
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2020-01-07 19:15 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-01-06 20:37 [PATCH] clocksource: timer-ti-dm: Fix regression Tony Lindgren
2020-01-06 20:37 ` Tony Lindgren
2020-01-06 21:07 ` Olof Johansson
2020-01-06 21:07 ` Olof Johansson
2020-01-07 19:14 ` Frank Lee [this message]
2020-01-07 19:14 ` Frank Lee
2020-01-07 19:14 ` Frank Lee
2020-01-09 11:42 ` Daniel Lezcano
2020-01-09 11:42 ` Daniel Lezcano
2020-01-11 6:28 ` Naresh Kamboju
2020-01-11 6:28 ` Naresh Kamboju
2020-01-11 6:28 ` Naresh Kamboju
2020-01-16 3:46 ` Keerthy
2020-01-16 3:46 ` Keerthy
2020-01-16 3:46 ` Keerthy
2020-01-16 13:32 ` Daniel Lezcano
2020-01-16 13:32 ` Daniel Lezcano
2020-01-16 21:31 ` [tip: timers/core] clocksource/drivers/timer-ti-dm: Fix uninitialized pointer access tip-bot2 for Tony Lindgren
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='CAEExFWuQuTHNsjABpSBAa46NzftHS0+nLLG=qdEcaeatLZFLeQ@mail.gmail.com' \
--to=tiny.windzz@gmail.com \
--cc=daniel.lezcano@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-omap@vger.kernel.org \
--cc=olof@lixom.net \
--cc=tglx@linutronix.de \
--cc=tony@atomide.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.