public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] fb_mmap() holding BKL
@ 2001-11-14 23:26 Paul Mundt
  2001-11-14 23:32 ` Jeff Garzik
  0 siblings, 1 reply; 2+ messages in thread
From: Paul Mundt @ 2001-11-14 23:26 UTC (permalink / raw)
  To: torvalds; +Cc: linux-kernel, linux-fbdev-devel

[-- Attachment #1: Type: text/plain, Size: 711 bytes --]

Hello,

Just a minor cleanup.. in the event of some sanity checking in fb_mmap(), the
BKL is accidentally held on a return.. this trivial patch fixes this issue.
(Against 2.4.14).

Please apply.

Regards,

-- 
Paul Mundt <pmundt@mvista.com>
MontaVista Software, Inc.

--- linux/drivers/video/fbmem.c.orig	Wed Nov 14 15:17:40 2001
+++ linux/drivers/video/fbmem.c	Wed Nov 14 15:17:50 2001
@@ -563,8 +563,10 @@
 		/* memory mapped io */
 		off -= len;
 		fb->fb_get_var(&var, PROC_CONSOLE(info), info);
-		if (var.accel_flags)
+		if (var.accel_flags) {
+			unlock_kernel();
 			return -EINVAL;
+		}
 		start = fix.mmio_start;
 		len = PAGE_ALIGN((start & ~PAGE_MASK)+fix.mmio_len);
 	}

[-- Attachment #2: Type: application/pgp-signature, Size: 240 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] fb_mmap() holding BKL
  2001-11-14 23:26 [PATCH] fb_mmap() holding BKL Paul Mundt
@ 2001-11-14 23:32 ` Jeff Garzik
  0 siblings, 0 replies; 2+ messages in thread
From: Jeff Garzik @ 2001-11-14 23:32 UTC (permalink / raw)
  To: Paul Mundt; +Cc: torvalds, linux-kernel, linux-fbdev-devel, Marcelo Tosatti

[-- Attachment #1: Type: text/plain, Size: 459 bytes --]

Paul Mundt wrote:
> Just a minor cleanup.. in the event of some sanity checking in fb_mmap(), the
> BKL is accidentally held on a return.. this trivial patch fixes this issue.

No idea why your patch didn't apply here, but it didn't.

Attached is the same fix patch, rediff'd against 2.4.15-pre4.

	Jeff


-- 
Jeff Garzik      | Only so many songs can be sung
Building 1024    | with two lips, two lungs, and one tongue.
MandrakeSoft     |         - nomeansno

[-- Attachment #2: patch --]
[-- Type: text/plain, Size: 596 bytes --]

Index: drivers/video/fbmem.c
===================================================================
RCS file: /cvsroot/gkernel/linux_2_4/drivers/video/fbmem.c,v
retrieving revision 1.4
diff -u -r1.4 fbmem.c
--- drivers/video/fbmem.c	2001/10/11 09:39:14	1.4
+++ drivers/video/fbmem.c	2001/11/14 23:31:44
@@ -563,8 +563,10 @@
 		/* memory mapped io */
 		off -= len;
 		fb->fb_get_var(&var, PROC_CONSOLE(info), info);
-		if (var.accel_flags)
+		if (var.accel_flags) {
+			unlock_kernel();
 			return -EINVAL;
+		}
 		start = fix.mmio_start;
 		len = PAGE_ALIGN((start & ~PAGE_MASK)+fix.mmio_len);
 	}

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2001-11-14 23:33 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-11-14 23:26 [PATCH] fb_mmap() holding BKL Paul Mundt
2001-11-14 23:32 ` Jeff Garzik

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox