Messages in this thread | | | Date | Thu, 11 Mar 1999 20:52:13 +0000 (GMT) | From | Tigran Aivazian <> | Subject | FIXED: 3Dfx module broken on 2.2.3 |
| |
Hi,
Ok, I have just fixed it. The problem was _not_ in the kernel (shame on me that I doubted Linus for even a microsecond!).
The bug is in the 3dfx_driver.c - in mmap_3dfx() function comment out the f_count++:
The code at the end should look like this:
#ifdef KERNEL_VER_2_1 vma->vm_file = file; /* file->f_count++; */ #else vma->vm_inode = inode; inode->i_count++; #endif
Until now it was ok because it was driver's responsibility to increment f_count, but now do_mmap() does it.
Regards, Tigran.
On Thu, 11 Mar 1999, Tigran Aivazian wrote:
> Hi, > > Yes, it is broken. There were two changes to mm/mmap.c: > > a) in do_mmap() > vma->vm_file = file; > file->f_count++; > > b) in do_munmap() > > errno = -EINVAL; instead of 0, because Single UNIX v2 says so. > > I have just checked that it is *not* b) that breaks it (thank heaven - for > b) was my patch :) > > It appears that a /dev/3dfx usage count (file->f_count) is incremented but > not decremented. So I am suspicious of a) - perhaps there should be a > corresponding file->f_count-- in do_munmap() ? > > I am trying to fix it now - will let you know if any luck. > > Regards, > Tigran. > >
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/
| |