All of lore.kernel.org
 help / color / mirror / Atom feed
From: Gaurav Singh <gaurav1086@gmail.com>
To: gaurav1086@gmail.com,
	Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>,
	Arnd Bergmann <arnd@arndb.de>,
	Daniel Vetter <daniel.vetter@ffwll.ch>,
	Jani Nikula <jani.nikula@intel.com>,
	dri-devel@lists.freedesktop.org (open list:FRAMEBUFFER LAYER),
	linux-fbdev@vger.kernel.org (open list:FRAMEBUFFER LAYER),
	linux-kernel@vger.kernel.org (open list)
Subject: [PATCH] [video/fbdev] mbxfb_remove: fix null pointer dereference
Date: Sun, 26 Jul 2020 01:20:45 -0400	[thread overview]
Message-ID: <20200726052047.9856-1-gaurav1086@gmail.com> (raw)

Function mbxfb_debugfs_remove() accesses fbi->par without NULL check,
hence do the NULL check in the caller mbxfb_remove().

Signed-off-by: Gaurav Singh <gaurav1086@gmail.com>
---
 drivers/video/fbdev/mbx/mbxfb.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/video/fbdev/mbx/mbxfb.c b/drivers/video/fbdev/mbx/mbxfb.c
index 6dc287c819cb..515c0cda1994 100644
--- a/drivers/video/fbdev/mbx/mbxfb.c
+++ b/drivers/video/fbdev/mbx/mbxfb.c
@@ -1012,11 +1012,10 @@ static int mbxfb_remove(struct platform_device *dev)
 
 	write_reg_dly(SYSRST_RST, SYSRST);
 
-	mbxfb_debugfs_remove(fbi);
-
 	if (fbi) {
 		struct mbxfb_info *mfbi = fbi->par;
 
+		mbxfb_debugfs_remove(fbi);
 		unregister_framebuffer(fbi);
 		if (mfbi) {
 			if (mfbi->platform_remove)
-- 
2.17.1


WARNING: multiple messages have this Message-ID (diff)
From: Gaurav Singh <gaurav1086@gmail.com>
To: gaurav1086@gmail.com,
	Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>,
	Arnd Bergmann <arnd@arndb.de>,
	Daniel Vetter <daniel.vetter@ffwll.ch>,
	Jani Nikula <jani.nikula@intel.com>,
	"open list:FRAMEBUFFER LAYER" <dri-devel@lists.freedesktop.org>,
	"open list:FRAMEBUFFER LAYER" <linux-fbdev@vger.kernel.org>,
	open list <linux-kernel@vger.kernel.org>
Subject: [PATCH] [video/fbdev] mbxfb_remove: fix null pointer dereference
Date: Sun, 26 Jul 2020 05:20:45 +0000	[thread overview]
Message-ID: <20200726052047.9856-1-gaurav1086@gmail.com> (raw)

Function mbxfb_debugfs_remove() accesses fbi->par without NULL check,
hence do the NULL check in the caller mbxfb_remove().

Signed-off-by: Gaurav Singh <gaurav1086@gmail.com>
---
 drivers/video/fbdev/mbx/mbxfb.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/video/fbdev/mbx/mbxfb.c b/drivers/video/fbdev/mbx/mbxfb.c
index 6dc287c819cb..515c0cda1994 100644
--- a/drivers/video/fbdev/mbx/mbxfb.c
+++ b/drivers/video/fbdev/mbx/mbxfb.c
@@ -1012,11 +1012,10 @@ static int mbxfb_remove(struct platform_device *dev)
 
 	write_reg_dly(SYSRST_RST, SYSRST);
 
-	mbxfb_debugfs_remove(fbi);
-
 	if (fbi) {
 		struct mbxfb_info *mfbi = fbi->par;
 
+		mbxfb_debugfs_remove(fbi);
 		unregister_framebuffer(fbi);
 		if (mfbi) {
 			if (mfbi->platform_remove)
-- 
2.17.1

WARNING: multiple messages have this Message-ID (diff)
From: Gaurav Singh <gaurav1086@gmail.com>
To: gaurav1086@gmail.com,
	Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>,
	Arnd Bergmann <arnd@arndb.de>,
	Daniel Vetter <daniel.vetter@ffwll.ch>,
	Jani Nikula <jani.nikula@intel.com>,
	dri-devel@lists.freedesktop.org (open list:FRAMEBUFFER LAYER),
	linux-fbdev@vger.kernel.org (open list:FRAMEBUFFER LAYER),
	linux-kernel@vger.kernel.org (open list)
Subject: [PATCH] [video/fbdev] mbxfb_remove: fix null pointer dereference
Date: Sun, 26 Jul 2020 01:20:45 -0400	[thread overview]
Message-ID: <20200726052047.9856-1-gaurav1086@gmail.com> (raw)

Function mbxfb_debugfs_remove() accesses fbi->par without NULL check,
hence do the NULL check in the caller mbxfb_remove().

Signed-off-by: Gaurav Singh <gaurav1086@gmail.com>
---
 drivers/video/fbdev/mbx/mbxfb.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/video/fbdev/mbx/mbxfb.c b/drivers/video/fbdev/mbx/mbxfb.c
index 6dc287c819cb..515c0cda1994 100644
--- a/drivers/video/fbdev/mbx/mbxfb.c
+++ b/drivers/video/fbdev/mbx/mbxfb.c
@@ -1012,11 +1012,10 @@ static int mbxfb_remove(struct platform_device *dev)
 
 	write_reg_dly(SYSRST_RST, SYSRST);
 
-	mbxfb_debugfs_remove(fbi);
-
 	if (fbi) {
 		struct mbxfb_info *mfbi = fbi->par;
 
+		mbxfb_debugfs_remove(fbi);
 		unregister_framebuffer(fbi);
 		if (mfbi) {
 			if (mfbi->platform_remove)
-- 
2.17.1

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

             reply	other threads:[~2020-07-26  5:20 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-26  5:20 Gaurav Singh [this message]
2020-07-26  5:20 ` [PATCH] [video/fbdev] mbxfb_remove: fix null pointer dereference Gaurav Singh
2020-07-26  5:20 ` Gaurav Singh
2020-07-26  8:57 ` Andy Shevchenko
2020-07-26  8:57   ` Andy Shevchenko
2020-07-26  8:57   ` Andy Shevchenko

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=20200726052047.9856-1-gaurav1086@gmail.com \
    --to=gaurav1086@gmail.com \
    --cc=arnd@arndb.de \
    --cc=b.zolnierkie@samsung.com \
    --cc=daniel.vetter@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=jani.nikula@intel.com \
    --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 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.