On Tue, May 11, 2004 at 12:27:28AM -0700, Andrew Morton wrote: > Gary Wong wrote: > > I believe that one of two fixes should be applied: either the > > SNDCTL_DSP_SETTRIGGER ioctl handling should not enable the > > PCM_ENABLE_{IN,OUT}PUT bits unless file->f_mode is compatible, > > or i810_release() should ignore the PCM_ENABLE_* bits without > > the corresponding FMODE_*. > > The first option sounds more appropriate but I wonder if it could break > existing applications? Probably not, if it oopses. I agree; I had a look at a few other drivers at random (audio, esssolo1, trident) and they all silently ignore inappropriate PCM_ENABLE_* bits. > Let's try option #1, please. OK, a patch is attached. It seems to fix the problem on a 2.6.3 system with Herbert Xu's patches from Jeff Garzik applied. break-i810.c is a small test case which hopefully demonstrates the problem. Cheers, Gary. -- Gary Wong gtw@cs.bu.edu http://cs-people.bu.edu/gtw/