Bug in OSS/free in kernel 2.1.130

Adam Kramer (ajkramera@usa.net)
29 Nov 98 22:28:52 EST


This is a multi-part message in MIME format.

------NetAddressPart-00--=_dDC15968Sww38bae69d
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

I'm sorry if this has been posted before, but I am pretty sure I discovered a
bug in the sound code of the 2.1.130 devel kernel. I am not sure if this
affects earlier kernels, I crashed my computer enough just trying to track
down what call causes it. In the 15-20 times my computer crashed, I only saw
one kernel panic screen (kernel dereferenced null pointer), the other times it
just locked completely or rebooted. I have an ESS1869 based sound card. This
program does not crash the computer when using commercial OSS (demo), only
OSS/free. Since the program is so short, I am including it in the message.

#include <stdio.h>
#include <netinet/in.h>
#include <sys/soundcard.h>
#include <sys/ioctl.h>
#include <fcntl.h>
#include <errno.h>

void sound_play() {
int size = -1073742872;
unsigned char *buf;
int audio_fd;
if( (audio_fd = open("/dev/dsp", O_WRONLY, 0)) == -1) {
perror("/dev/dsp");
exit(1);
}
buf = NULL;
write(audio_fd, buf, size);
}
main( int argc, char **argv )
{
sound_play();
}

If you reply to this message, please CC me the reply.

sorry if i'm totally off,
Adam Kramer
ajkramera@usa.net

____________________________________________________________________
Get free e-mail and a permanent address at http://www.netaddress.com/?N=1

------NetAddressPart-00--=_dDC15968Sww38bae69d
Content-Type: application/octet-stream; name="crash.c"
Content-Transfer-Encoding: base64
Content-Disposition: inline; filename="crash.c"

I2luY2x1ZGUgPHN0ZGlvLmg+CiNpbmNsdWRlIDxuZXRpbmV0L2luLmg+CiNpbmNsdWRlIDxz
eXMvc291bmRjYXJkLmg+CiNpbmNsdWRlIDxzeXMvaW9jdGwuaD4KI2luY2x1ZGUgPGZjbnRs
Lmg+CiNpbmNsdWRlIDxlcnJuby5oPgoKCnZvaWQgc291bmRfcGxheSgpIHsKCiAgICAgICAg
aW50IGZvcm1hdCwgc2l6ZSA9IC0xMDczNzQyODcyOwogICAgICAgIHVuc2lnbmVkIGNoYXIg
KmJ1ZjsKCWludCBhdWRpb19mZDsKCiAgICAgICAgaWYoIChhdWRpb19mZCA9IG9wZW4oIi9k
ZXYvZHNwIiwgT19XUk9OTFksIDApKSA9PSAtMSkgewogICAgICAgICAgICAgICAgcGVycm9y
KCIvZGV2L2RzcCIpOwogICAgICAgICAgICAgICAgZXhpdCgxKTsKICAgICAgICB9CgoJYnVm
ID0gTlVMTDsKCXdyaXRlKGF1ZGlvX2ZkLCBidWYsIHNpemUpOwoKCn0KCm1haW4oIGludCBh
cmdjLCBjaGFyICoqYXJndiApCnsKCXNvdW5kX3BsYXkoKTsKfQo=

------NetAddressPart-00--=_dDC15968Sww38bae69d--

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