public inbox for linux-fbdev@vger.kernel.org
 help / color / mirror / Atom feed
From: Jia-Ju Bai <baijiaju1990@gmail.com>
To: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Cc: dri-devel@lists.freedesktop.org, linux-fbdev@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [BUG] video: fbdev: broadsheetfb: Possible null function pointers
Date: Fri, 27 Jul 2018 01:49:41 +0000	[thread overview]
Message-ID: <c95d4381-1278-e561-29d8-ae84be2c680e@gmail.com> (raw)
In-Reply-To: <2568790.PcaMMF1rzM@amdc3058>



On 2018/7/26 22:34, Bartlomiej Zolnierkiewicz wrote:
> On Thursday, July 26, 2018 10:17:44 PM bai wrote:
>> In Linux-4.16, drivers/video/fbdev/broadsheetfb.c,
>>
>> 158. static void broadsheet_mmio_send_cmdargs(...) {
>>               ......
>> 163.     par->board->mmio_write(...);
>>               ......
>> 166.     par->board->mmio_write(...);
>> 167. }
>>
>> For x86 kernel configuration, I find that there is no assignment of the
>> function pointer ".mmio_write" in the kernel code.
>> So calling the function pointer in lines 163 and 166 may cause a null
>> pointer dereference.
>>
>> In this file, there are many calls to this function pointer...
> This is a platform driver and it won't be used on x86 (actually it is
> used only by single ARM PXA board). The dependency for FB_BROADSHEET
> in Kconfig file could be improved to i.e.
>
> 	depends on FB && (ARCH_PXA || COMPILE_TEST)
>
> but there is no bug there.

Thanks for the reply :)
So I want to submit a patch of updating Kconfig in 
drivers/video/fbdev/Kconfig:

config FB_BROADSHEET
     tristate "E-Ink Broadsheet/Epson S1D13521 controller support"
-    depends on FB
+   depends on FB && (ARCH_PXA || COMPILE_TEST)
     select FB_SYS_FILLRECT
     select FB_SYS_COPYAREA
     select FB_SYS_IMAGEBLIT
     select FB_SYS_FOPS
     select FB_DEFERRED_IO


Do you think it is okay?


Best wishes,
Jia-Ju Bai

  reply	other threads:[~2018-07-27  1:49 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CGME20180726141748epcas1p28f6f11fea0152ed22113351e3a0affbc@epcas1p2.samsung.com>
2018-07-26 14:17 ` [BUG] video: fbdev: broadsheetfb: Possible null function pointers bai
2018-07-26 14:34   ` Bartlomiej Zolnierkiewicz
2018-07-27  1:49     ` Jia-Ju Bai [this message]
2018-07-27  8:06       ` Bartlomiej Zolnierkiewicz

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=c95d4381-1278-e561-29d8-ae84be2c680e@gmail.com \
    --to=baijiaju1990@gmail.com \
    --cc=b.zolnierkie@samsung.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=linux-fbdev@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.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