Re: panic in bus_dma_tag_destroy()

看板DFBSD_bugs作者時間21年前 (2004/10/11 11:01), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串8/12 (看更多)
On Sun, Oct 10, 2004 at 12:13:53PM -0700, Matthew Dillon wrote: .... > :Probably, this is a driver bug, which is fine by me, but there are a > :couple of disk drivers which do something similar (adv_pci.c, > :adw_pci.c, bt_pci.c, mpt_pci.c) and maybe some other non-disk drivers > :(didn't look). > > No, these guys are doing something different. Their malloc()'s, > are based on the maximum number of requests, which is some fairly > small number, not on the maximum size of the DMA space. > > e.g. the MPT driver: .... No, I'm not refering to the malloc()'s in the driver. I'm refering to the malloc that bus_dma_tag_create() does internally (i.e. the driver has no visibility to this malloc). Take a look at line 158 in src/sys/i386/i386/busdma_machdep.c That is that malloc at issue. This is involked in the mpt driver on line 504 in src/sys/dev/disk/mpt/mpt_pci.c with the 4th to the last argument causing the problem. I'm pretty sure that mpt_pci.c will fail in the same way my driver did as I used mpt_pci.c as a template :) That said, I changed the bus_dma_tag_create() in my driver to look like what isp does, and this problem goes away. Would it be clearer if I submitted patches for the above 4 drivers? I know what to do for the drivers, but not how best to protect bus_dma_tag_create(). -- Chuck Tuffli Agilent Technologies
文章代碼(AID): #11QVTm00 (DFBSD_bugs)
討論串 (同標題文章)
文章代碼(AID): #11QVTm00 (DFBSD_bugs)