[537] in linux-scsi channel archive

home help back first fref pref prev next nref lref last post

1.3.20: kfree of non-kmalloced memory

daemon@ATHENA.MIT.EDU (Philip Blundell)
Mon Aug 21 21:30:06 1995

Date: Mon, 21 Aug 1995 16:55:43 +0100 (BST)
From: Philip Blundell <pjb27@cam.ac.uk>
To: linux-scsi@vger.rutgers.edu

I'm getting these messages on a fairly regular basis when I start my machine:

Aug 21 12:37:35 ermintrude linux: Adding Swap: 20920k swap-space
Aug 21 12:37:35 ermintrude linux: aha152x: porttest: ok, auto configuration: ok, detection complete
Aug 21 12:37:36 ermintrude linux: aha152x: vital data: PORTBASE=0x340, IRQ=11, SCSI ID=7, reconnect=enabled, parity=disabled
Aug 21 12:37:36 ermintrude linux: scsi0 : Adaptec 152x SCSI driver; $Revision: 1.9 $
Aug 21 12:37:36 ermintrude linux: scsi : 1 host.
Aug 21 12:37:36 ermintrude linux:   Vendor: ARCHIVE   Model: VIPER 2525 25462  Rev: -007
Aug 21 12:37:36 ermintrude linux:   Type:   Sequential-Access                  ANSI SCSI revision: 01
Aug 21 12:37:36 ermintrude linux: kfree of non-kmalloced memory: 001cf2a8, next= 00000000, order=0
Aug 21 12:37:36 ermintrude linux: kfree of non-kmalloced memory: 001cf2a8, next= 00000000, order=0
Aug 21 12:37:36 ermintrude linux: SLIP: version 0.8.3-NET3.019-NEWTTY-MODULAR (dynamic channels, max=256) (6 bit encapsulation enabled)

I have st and aha152x loaded as modules; as you can see, the errors 
happen when aha152x is loaded (st is *not* loaded until later). The base 
scsi system itself is compiled into the kernel (CONFIG_SCSI). 

I think I've isolated the problem to this bit of code:

	/* When we dick with the actual DMA list, we need to 
	 * protect things 
	 */
	save_flags(flags);
	cli();
	memcpy(new_dma_malloc_freelist, dma_malloc_freelist, dma_sectors >> 3);
	scsi_init_free(dma_malloc_freelist, dma_sectors>>3);
	dma_malloc_freelist = new_dma_malloc_freelist;
	
	memcpy(new_dma_malloc_pages, dma_malloc_pages, dma_sectors >> 1);
	scsi_init_free((char *) dma_malloc_pages, dma_sectors>>1);
	
	dma_free_sectors += new_dma_sectors - dma_sectors;
	dma_malloc_pages = new_dma_malloc_pages;
	dma_sectors = new_dma_sectors;
	need_isa_buffer = new_need_isa_buffer;
	restore_flags(flags);

--
Philip Blundell <pjb27@cam.ac.uk>       phone +44 1223 302522
.sig under construction


home help back first fref pref prev next nref lref last post