2001-11-14 23:27:01

by Paul Mundt

[permalink] [raw]
Subject: [PATCH] fb_mmap() holding BKL

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 <[email protected]>
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);
}


Attachments:
(No filename) (683.00 B)
(No filename) (240.00 B)
Download all attachments

2001-11-14 23:33:11

by Jeff Garzik

[permalink] [raw]
Subject: Re: [PATCH] fb_mmap() holding BKL

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);
}


Attachments:
patch (596.00 B)