RE: BUG() in 2.4: sg direct IO + exit()

Tony Battersby
2004-03-24T16:23:10Z

> It is not causing an oops when I try with scsi_debug and lk 2.6.5-rc2.
> Neither is there a problem with a Suse 9 stock SMP kernel
> (2.4.21-99-smp4G) on an old dual celeron (A-bit mb) box with a
> Sony SDT-7000 tape drive on /dev/sg0.

It could be that on your machine the command finishes before the exit(),
causing unmap_kiobuf->__free_pages->put_page_testzero(page) to leave the
page reference count nonzero instead of calling __free_pages_ok. A
command that takes longer to finish (e.g. READ(6)) might trigger the
BUG() on your machine.

Anthony J. Battersby
Cybernetics