mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-18 10:35:55 +00:00
free_xs must be called at splbio(). This is usually the case since the main
caller is scsi_done which the controller interrupt handlers call. In the case of a non-buffer based transaction, the xs structure is freed by the process that initiated the transfer in scsi_scsi_cmd. In this case, an explicit splbio/splx pair around the call to free_xs is required. Without the splbio protection, the xs free list could be corrupted, and the type driver's start routine might run without spl protection. Submitted by: Tor Egge <Tor.Egge@idt.ntnu.no> Obtained from: PR kern/2891
This commit is contained in:
parent
bb135fe9a1
commit
65e5a3a9df
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=24164
@ -8,7 +8,7 @@
|
||||
* file.
|
||||
*
|
||||
* Written by Julian Elischer (julian@dialix.oz.au)
|
||||
* $Id: scsi_base.c,v 1.45 1997/02/22 09:44:28 peter Exp $
|
||||
* $Id: scsi_base.c,v 1.46 1997/03/23 06:33:46 bde Exp $
|
||||
*/
|
||||
|
||||
#include "opt_bounce.h"
|
||||
@ -616,7 +616,9 @@ scsi_scsi_cmd(sc_link, scsi_cmd, cmdlen, data_addr, datalen,
|
||||
* check if anyone else needs to be started up.
|
||||
*/
|
||||
bad:
|
||||
s = splbio();
|
||||
free_xs(xs, sc_link, flags); /* includes the 'start' op */
|
||||
splx(s);
|
||||
if (bp && retval) {
|
||||
bp->b_error = retval;
|
||||
bp->b_flags |= B_ERROR;
|
||||
|
Loading…
Reference in New Issue
Block a user