Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 25 Feb 2007 20:38:02 +0100
From:      Thomas Quinot <thomas@FreeBSD.ORG>
To:        freebsd-scsi@freebsd.org
Subject:   xpt_done() and Giant?
Message-ID:  <20070225193802.GA32605@melamine.cuivre.fr.eu.org>
Resent-Message-ID: <20070226235528.GA71839@melamine.cuivre.fr.eu.org>

next in thread | raw e-mail | index | archive | help
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.




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20070225193802.GA32605>