* [PATCH] drivers/video/fbdev/core/fbmem.c: add pointer judgment
@ 2021-05-19 12:00 songqiang
2021-05-19 12:16 ` Matthew Wilcox
0 siblings, 1 reply; 3+ messages in thread
From: songqiang @ 2021-05-19 12:00 UTC (permalink / raw)
To: sam, b.zolnierkie, penguin-kernel, george.kennedy, arnd,
tzimmermann, jgg, willy
Cc: dri-devel, linux-fbdev, linux-kernel, songqiang
Signed-off-by: songqiang <songqiang@uniontech.com>
---
drivers/video/fbdev/core/fbmem.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/video/fbdev/core/fbmem.c b/drivers/video/fbdev/core/fbmem.c
index 072780b0e570..6036ab849475 100644
--- a/drivers/video/fbdev/core/fbmem.c
+++ b/drivers/video/fbdev/core/fbmem.c
@@ -1859,6 +1859,9 @@ void fb_set_suspend(struct fb_info *info, int state)
{
WARN_CONSOLE_UNLOCKED();
+ if (!info) {
+ return;
+ }
if (state) {
fbcon_suspended(info);
info->state = FBINFO_STATE_SUSPENDED;
--
2.20.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] drivers/video/fbdev/core/fbmem.c: add pointer judgment
2021-05-19 12:00 [PATCH] drivers/video/fbdev/core/fbmem.c: add pointer judgment songqiang
@ 2021-05-19 12:16 ` Matthew Wilcox
[not found] ` <1049640176.41531.1621490295842.JavaMail.xmail@localhost.localdomain>
0 siblings, 1 reply; 3+ messages in thread
From: Matthew Wilcox @ 2021-05-19 12:16 UTC (permalink / raw)
To: songqiang
Cc: sam, b.zolnierkie, penguin-kernel, george.kennedy, arnd,
tzimmermann, jgg, dri-devel, linux-fbdev, linux-kernel
On Wed, May 19, 2021 at 08:00:28PM +0800, songqiang wrote:
> Signed-off-by: songqiang <songqiang@uniontech.com>
> ---
You need to explain:
- Why you think this patch is needed
- Did you observe a problem at runtime?
- Is this the output from some checking tool?
- Why this is the right way to address the problem
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Re: [PATCH] drivers/video/fbdev/core/fbmem.c: add pointer judgment
[not found] ` <1049640176.41531.1621490295842.JavaMail.xmail@localhost.localdomain>
@ 2021-05-20 7:48 ` Arnd Bergmann
0 siblings, 0 replies; 3+ messages in thread
From: Arnd Bergmann @ 2021-05-20 7:48 UTC (permalink / raw)
To: 宋强
Cc: Matthew Wilcox, sam, b.zolnierkie, penguin-kernel,
george.kennedy, tzimmermann, jgg, dri-devel, linux-fbdev,
linux-kernel
> > On Wed, May 19, 2021 at 08:00:28PM +0800, songqiang wrote:
> > Signed-off-by: songqiang <songqiang@uniontech.com>
> From: "Matthew Wilcox <willy@infradead.org>"
> > You need to explain:
> >
> > - Why you think this patch is needed
> > - Did you observe a problem at runtime?
> > - Is this the output from some checking tool?
> > - Why this is the right way to address the problem
>
On Thu, May 20, 2021 at 7:58 AM 宋强 <songqiang@uniontech.com> wrote:
>
> I find null pointer bug when I debug the kernel of loongson,I think the function fb_set_suspend()
> add pointer judgment will more friendly.
When replying to emails on the list, please remember
- avoid top-posting, see https://git-send-email.io/top-posting.html
- use plain text email, html replies get dropped by many mailing lists.
The information from your reply should be part of the patch description when
you send a patch, see
https://www.kernel.org/doc/html/v4.17/process/submitting-patches.html
> [ 102.011018] Call Trace:
>
> [ 102.013443] [<ffffffff81068e10>] fb_set_suspend+0x50/0x80
> [ 102.018819] [<ffffffffc0061aa0>] loongson_drm_suspend+0x1a0/0x340 [loongson]
> [ 102.025827] [<ffffffffc0061c58>] loongson_pmops_freeze+0x18/0x40 [loongson]
> [ 102.032748] [<ffffffff81008fd4>] pci_pm_freeze+0x94/0x240
> [ 102.038114] [<ffffffff815377e0>] dpm_run_callback.isra.5+0x20/0x140
> [ 102.044341] [<ffffffff81539608>] __device_suspend+0x2c8/0x740
It looks like the check would actually belong into the loongson_drm driver.
The driver is not upstream yet, but I assume you have the source for it, so
try to fix the bug there and send the patch to the owners of that driver.
Arnd
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-05-20 7:49 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-19 12:00 [PATCH] drivers/video/fbdev/core/fbmem.c: add pointer judgment songqiang
2021-05-19 12:16 ` Matthew Wilcox
[not found] ` <1049640176.41531.1621490295842.JavaMail.xmail@localhost.localdomain>
2021-05-20 7:48 ` Arnd Bergmann
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).