xpt_done() and Giant?
Scott Long
scottl at samsco.org
Wed Feb 28 21:42:25 UTC 2007
Thomas Quinot wrote:
> I'm currently trying to debug ATAPI/CAM issues with a particular ATA
> controller (kern/103602). Over the course of investigating this PR,
> the user reported the following crash when enabling CAMDEBUG:
>
> Tracing pid 16 tid 100014 td 0xc5106bd0
>
> kdb_enter(c0a48ff7,0,c0a482f1,e3cbaba8,c5106bd0,...) at kdb_enter+0x30
> panic(c0a482f1,c0a60666,c0a004cc,1033,c560c430,...) at panic+0x13b
> _mtx_assert(c0b4caa8,1,c0a004cc,1033,c5610000,...) at _mtx_assert+0x86
> xpt_path_comp(c5410660,c560c430,c5462c40,c55e3e60,c5610000,...) at xpt_path_comp+0x32
> xpt_done(c5610000,c546ae3c,c55e2b64,e3cbac3c,c55e2398,...) at xpt_done+0x30
> free_hcb_and_ccb_done(c546ae3c,0,c55e2b64,2d2,1,...) at free_hcb_and_ccb_done+0x3c
> atapi_cb(c5486480,52,c0a4cb11,e3cbac74,c0748b94,...) at atapi_cb+0x78
> ata_completed(c5486480,1,c0a4cb11,52,c5173b1c,...) at
> ata_completed+0x5c2
>
> It looks to me like we're calling xpt_done() without holding Giant,
> which should work AFAICT, except that when enabling CAMDEBUG, xpt_done
> calls xpt_path_comp, which still has a GIANT_REQUIRED assertion, hence
> the failure above.
>
> So, should we maybe grab Giant in CAM_DEBUG?
>
> Thomas.
>
I overlooked this, sorry. Can you survive with it as it is for now?
Scott
More information about the freebsd-scsi
mailing list