From alsa-devel-owner@alsa.jcu.cz  Fri Mar 12 07:07:39 1999
Received: from renoir.op.net (root@renoir.op.net [209.152.193.4])
	by marvin.jcu.cz (8.9.1a/8.9.1) with ESMTP id HAA07238
	for <alsa-devel@alsa.jcu.cz>; Fri, 12 Mar 1999 07:07:20 +0100
Received: from op.net (d-bm2-09.ppp.op.net [209.152.194.41]) by renoir.op.net (o1/$Revision: 1.18 $) with ESMTP id BAA27229 for <alsa-devel@alsa.jcu.cz>; Fri, 12 Mar 1999 01:07:18 -0500 (EST)
Received: (from pbd@localhost) by op.net ($Revision: 1.2 $) id BAA22498; Fri, 12 Mar 1999 01:06:32 -0500
Date: Fri, 12 Mar 1999 01:06:32 -0500
Message-Id: <199903120606.BAA22498@op.net>
From: Paul Barton-Davis <pbd@Op.Net>
To: alsa-devel@alsa.jcu.cz
Subject: oss/mmap problem hint
Reply-To: alsa-devel@alsa.jcu.cz
Sender: alsa-devel-owner@alsa.jcu.cz
Precedence: list

just posted to linux-kernel, by Tigran Aivazian <tigran@aivazian.demon.co.uk>:

---------------------------------------------------------------
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.
----------------------------------------------------------------------    

--p


