* Recommended e2fsprogs version: 1.40.2-cfs4
* Note that reiserfs quotas are disabled on SLES 10 in this kernel.
+Severity : major
+Bugzilla : 14260
+Frequency : rare, at shutdown
+Description: access already free / zero obd_namespace.
+Details : if client_disconnect_export was called without force flag set,
+ and exist connect request in flight, this can produce access to
+ NULL pointer (or already free pointer) when connect_interpret
+ store ocd flags in obd_namespace.
+
Severity : minor
Bugzilla : 14418
Frequency : only at startup
NULL);
ldlm_namespace_free_prior(obd->obd_namespace);
to_be_freed = obd->obd_namespace;
- obd->obd_namespace = NULL;
}
- /* Yeah, obd_force means "forced shutdown". */
- if (!obd->obd_force)
- rc = ptlrpc_disconnect_import(imp, 0);
+ rc = ptlrpc_disconnect_import(imp, 0);
ptlrpc_invalidate_import(imp);
+ /* set obd_namespace to NULL only after invalidate, because we can have
+ * some connect requests in flight, and his need store a connect flags
+ * in obd_namespace. bug 14260 */
+ obd->obd_namespace = NULL;
+
ptlrpc_free_rq_pool(imp->imp_rq_pool);
class_destroy_import(imp);
cli->cl_import = NULL;
out_sem:
mutex_up(&cli->cl_sem);
if (to_be_freed)
- ldlm_namespace_free_post(to_be_freed, obd->obd_no_recov);
+ ldlm_namespace_free_post(to_be_freed, obd->obd_force);
RETURN(rc);
}
GOTO(out, rc = -EBUSY);
}
- /* MGC should disconnect nicely so MGS won't print eviction messages */
- obd->obd_force = (lsi->lsi_flags & LSI_UMOUNT_FORCE) != 0;
- /* The MGC has no recoverable data in any case. */
+ /* The MGC has no recoverable data in any case.
+ * force shotdown set in umount_begin */
obd->obd_no_recov = 1;
if (obd->u.cli.cl_mgc_mgsexp)
obd = class_name2obd(lsi->lsi_ldd->ldd_svname);
if (obd) {
CDEBUG(D_MOUNT, "stopping %s\n", obd->obd_name);
- if (lsi->lsi_flags & LSI_UMOUNT_FORCE)
- obd->obd_force = 1;
if (lsi->lsi_flags & LSI_UMOUNT_FAILOVER)
obd->obd_fail = 1;
/* We can't seem to give an error return code
- to .put_super, so we better make sure we clean up! */
+ * to .put_super, so we better make sure we clean up! */
obd->obd_force = 1;
class_manual_cleanup(obd);
} else {
if (req->rq_bulk != NULL)
ptlrpc_unregister_bulk (req);
- req->rq_phase = RQ_PHASE_COMPLETE;
-
if (req->rq_interpret_reply != NULL) {
int (*interpreter)(struct ptlrpc_request *,void *,int) =
req->rq_interpret_reply;
req->rq_status = interpreter(req, &req->rq_async_args,
req->rq_status);
}
+ req->rq_phase = RQ_PHASE_COMPLETE;
CDEBUG(D_RPCTRACE, "Completed RPC pname:cluuid:pid:xid:nid:"
"opc %s:%s:%d:"LPU64":%s:%d\n", cfs_curproc_comm(),
if (!(((req->rq_phase == RQ_PHASE_RPC) && !req->rq_waiting) ||
(req->rq_phase == RQ_PHASE_BULK) ||
(req->rq_phase == RQ_PHASE_NEW)))
+ continue;
if (req->rq_timedout) /* already timed out */
continue;
{
struct ptlrpc_request *req;
int rq_opc, rc = 0;
+ int nowait = imp->imp_obd->obd_force;
ENTRY;
+ if (nowait)
+ GOTO(set_state, rc);
+
switch (imp->imp_connect_op) {
case OST_CONNECT: rq_opc = OST_DISCONNECT; break;
case MDS_CONNECT: rq_opc = MDS_DISCONNECT; break;
ptlrpc_req_finished(req);
}
+set_state:
spin_lock(&imp->imp_lock);
out:
if (noclose)