39c39
< * $FreeBSD: head/sys/security/mac/mac_process.c 104518 2002-10-05 16:33:46Z rwatson $
---
> * $FreeBSD: head/sys/security/mac/mac_process.c 104520 2002-10-05 16:46:03Z rwatson $
930a931,940
> /*
> * If we fail the load, we may get a request to unload. Check
> * to see if we did the run-time registration, and if not,
> * silently succeed.
> */
> MAC_POLICY_LIST_LOCK();
> if ((mpc->mpc_runtime_flags & MPC_RUNTIME_FLAG_REGISTERED) == 0) {
> MAC_POLICY_LIST_UNLOCK();
> return (0);
> }
935c945,946
< if (mpc->mpc_field_off != NULL)
---
> if (mpc->mpc_field_off != NULL) {
> MAC_POLICY_LIST_UNLOCK();
936a948
> }
938c950,955
< if ((mpc->mpc_loadtime_flags & MPC_LOADTIME_FLAG_UNLOADOK) == 0)
---
> /*
> * Only allow the unload to proceed if the module is unloadable
> * by its own definition.
> */
> if ((mpc->mpc_loadtime_flags & MPC_LOADTIME_FLAG_UNLOADOK) == 0) {
> MAC_POLICY_LIST_UNLOCK();
940c957,962
< MAC_POLICY_LIST_LOCK();
---
> }
> /*
> * Right now, we EBUSY if the list is in use. In the future,
> * for reliability reasons, we might want to sleep and wakeup
> * later to try again.
> */
< * $FreeBSD: head/sys/security/mac/mac_process.c 104518 2002-10-05 16:33:46Z rwatson $
---
> * $FreeBSD: head/sys/security/mac/mac_process.c 104520 2002-10-05 16:46:03Z rwatson $
930a931,940
> /*
> * If we fail the load, we may get a request to unload. Check
> * to see if we did the run-time registration, and if not,
> * silently succeed.
> */
> MAC_POLICY_LIST_LOCK();
> if ((mpc->mpc_runtime_flags & MPC_RUNTIME_FLAG_REGISTERED) == 0) {
> MAC_POLICY_LIST_UNLOCK();
> return (0);
> }
935c945,946
< if (mpc->mpc_field_off != NULL)
---
> if (mpc->mpc_field_off != NULL) {
> MAC_POLICY_LIST_UNLOCK();
936a948
> }
938c950,955
< if ((mpc->mpc_loadtime_flags & MPC_LOADTIME_FLAG_UNLOADOK) == 0)
---
> /*
> * Only allow the unload to proceed if the module is unloadable
> * by its own definition.
> */
> if ((mpc->mpc_loadtime_flags & MPC_LOADTIME_FLAG_UNLOADOK) == 0) {
> MAC_POLICY_LIST_UNLOCK();
940c957,962
< MAC_POLICY_LIST_LOCK();
---
> }
> /*
> * Right now, we EBUSY if the list is in use. In the future,
> * for reliability reasons, we might want to sleep and wakeup
> * later to try again.
> */