Don't print the request we may be aborting in ciss_notify_abort as

part of ciss_detach. It's a left-over debug that isn't needed and also
discloses a kernel address. Only root could provoke as part of a
devctl or kldunload.

Submitted by: Fuqian Huang
MFC After: 1 week
This commit is contained in:
imp 2019-06-13 05:19:42 +00:00
parent f67877e584
commit 13a313ede7

View File

@ -107,6 +107,10 @@
#include <dev/ciss/cissio.h> #include <dev/ciss/cissio.h>
#include <dev/ciss/cissvar.h> #include <dev/ciss/cissvar.h>
#ifdef CISS_DEBUG
#include "opt_ddb.h"
#endif
static MALLOC_DEFINE(CISS_MALLOC_CLASS, "ciss_data", static MALLOC_DEFINE(CISS_MALLOC_CLASS, "ciss_data",
"ciss internal data buffers"); "ciss internal data buffers");
@ -197,7 +201,9 @@ static void ciss_notify_logical(struct ciss_softc *sc, struct ciss_notify *cn);
static void ciss_notify_physical(struct ciss_softc *sc, struct ciss_notify *cn); static void ciss_notify_physical(struct ciss_softc *sc, struct ciss_notify *cn);
/* debugging output */ /* debugging output */
#ifdef DDB
static void ciss_print_request(struct ciss_request *cr); static void ciss_print_request(struct ciss_request *cr);
#endif
static void ciss_print_ldrive(struct ciss_softc *sc, struct ciss_ldrive *ld); static void ciss_print_ldrive(struct ciss_softc *sc, struct ciss_ldrive *ld);
static const char *ciss_name_ldrive_status(int status); static const char *ciss_name_ldrive_status(int status);
static int ciss_decode_ldrive_status(int status); static int ciss_decode_ldrive_status(int status);
@ -3811,8 +3817,9 @@ ciss_notify_abort(struct ciss_softc *sc)
cnc->opcode = CISS_OPCODE_WRITE; cnc->opcode = CISS_OPCODE_WRITE;
cnc->command = CISS_COMMAND_ABORT_NOTIFY; cnc->command = CISS_COMMAND_ABORT_NOTIFY;
cnc->length = htonl(CISS_NOTIFY_DATA_SIZE); cnc->length = htonl(CISS_NOTIFY_DATA_SIZE);
#if 0
ciss_print_request(cr); ciss_print_request(cr);
#endif
/* /*
* Submit the request and wait for it to complete. * Submit the request and wait for it to complete.
@ -4237,6 +4244,7 @@ ciss_kill_notify_thread(struct ciss_softc *sc)
/************************************************************************ /************************************************************************
* Print a request. * Print a request.
*/ */
#ifdef DDB
static void static void
ciss_print_request(struct ciss_request *cr) ciss_print_request(struct ciss_request *cr)
{ {
@ -4290,6 +4298,7 @@ ciss_print_request(struct ciss_request *cr)
} }
} }
} }
#endif
/************************************************************************ /************************************************************************
* Print information about the status of a logical drive. * Print information about the status of a logical drive.
@ -4353,8 +4362,6 @@ ciss_print_ldrive(struct ciss_softc *sc, struct ciss_ldrive *ld)
} }
} }
#ifdef CISS_DEBUG
#include "opt_ddb.h"
#ifdef DDB #ifdef DDB
#include <ddb/ddb.h> #include <ddb/ddb.h>
/************************************************************************ /************************************************************************
@ -4409,7 +4416,6 @@ DB_COMMAND(ciss_prt, db_ciss_prt)
} }
} }
#endif #endif
#endif
/************************************************************************ /************************************************************************
* Return a name for a logical drive status value. * Return a name for a logical drive status value.