2003-05-10 15:52:48

by Faik Uygur

[permalink] [raw]
Subject: [PATCH] 2.5.69: mtrr: MTRR 2 not used, Bug #564

This one-liner fixes the mtrr not used bug, and addresses Bug #564
of Bugzilla.

mtrr_file_del was not decreasing the mtrr usage count so when
XFree86 was exiting, mtrr_close was trying to delete an already
deleted memory type region with the freed mtrr.


Index: arch/i386/kernel/cpu/mtrr/if.c
===================================================================
RCS file: /home/faiku/cvs/linux-2.5/arch/i386/kernel/cpu/mtrr/if.c,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 if.c
--- arch/i386/kernel/cpu/mtrr/if.c 10 May 2003 07:06:50 -0000 1.1.1.1
+++ arch/i386/kernel/cpu/mtrr/if.c 10 May 2003 15:14:00 -0000
@@ -49,7 +49,7 @@
struct file *file, int page)
{
int reg;
- unsigned int *fcount = file->private_data;
+ unsigned int *fcount = FILE_FCOUNT(file);

if (!page) {
if ((base & (PAGE_SIZE - 1)) || (size & (PAGE_SIZE - 1)))