Unverified Commit 4becb526 authored by openeuler-ci-bot's avatar openeuler-ci-bot Committed by Gitee
Browse files

!4178 OLK-6.6 cred backport for kabi reserve

Merge Pull Request from: @ci-robot 
 
PR sync from: felix <fuzhen5@huawei.com>
https://mailweb.openeuler.org/hyperkitty/list/kernel@openeuler.org/message/Y2IMOVBMA6MIWBXLRG44N47IWHCQ22AL/ 
From: Felix Fu <fuzhen5@huawei.com>

OLK-6.6 cred backport for kabi reserve

Elena Reshetova (1):
  groups: Convert group_info.usage to refcount_t

Jens Axboe (2):
  cred: switch to using atomic_long_t
  cred: get rid of CONFIG_DEBUG_CREDENTIALS

Mateusz Guzik (1):
  cred: add get_cred_many and put_cred_many


-- 
2.34.1
 
https://gitee.com/openeuler/kernel/issues/I8YQ5Q 
 
Link:https://gitee.com/openeuler/kernel/pulls/4178

 

Reviewed-by: default avatarLu Jialin <lujialin4@huawei.com>
Reviewed-by: default avatarZucheng Zheng <zhengzucheng@huawei.com>
Reviewed-by: default avatarYue Haibing <yuehaibing@huawei.com>
Reviewed-by: default avatarzhangyi (F) <yi.zhang@huawei.com>
Signed-off-by: default avatarZheng Zengkai <zhengzengkai@huawei.com>
parents effc5ce5 805540a0
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -301,7 +301,6 @@ CONFIG_WQ_WATCHDOG=y
CONFIG_DEBUG_SG=y
CONFIG_DEBUG_NOTIFIERS=y
CONFIG_BUG_ON_DATA_CORRUPTION=y
CONFIG_DEBUG_CREDENTIALS=y
# CONFIG_FTRACE is not set
CONFIG_XMON=y
# CONFIG_RUNTIME_TESTING_MENU is not set
+0 −1
Original line number Diff line number Diff line
@@ -835,7 +835,6 @@ CONFIG_DEBUG_IRQFLAGS=y
CONFIG_DEBUG_LIST=y
CONFIG_DEBUG_SG=y
CONFIG_DEBUG_NOTIFIERS=y
CONFIG_DEBUG_CREDENTIALS=y
CONFIG_RCU_TORTURE_TEST=m
CONFIG_RCU_REF_SCALE_TEST=m
CONFIG_RCU_CPU_STALL_TIMEOUT=300
+0 −4
Original line number Diff line number Diff line
@@ -26,8 +26,6 @@ int nfsd_setuser(struct svc_rqst *rqstp, struct svc_export *exp)
	int i;
	int flags = nfsexp_flags(rqstp, exp);

	validate_process_creds();

	/* discard any old override before preparing the new set */
	revert_creds(get_cred(current_real_cred()));
	new = prepare_creds();
@@ -81,10 +79,8 @@ int nfsd_setuser(struct svc_rqst *rqstp, struct svc_export *exp)
	else
		new->cap_effective = cap_raise_nfsd_set(new->cap_effective,
							new->cap_permitted);
	validate_process_creds();
	put_cred(override_creds(new));
	put_cred(new);
	validate_process_creds();
	return 0;

oom:
+0 −1
Original line number Diff line number Diff line
@@ -962,7 +962,6 @@ nfsd(void *vrqstp)
		rqstp->rq_server->sv_maxconn = nn->max_connections;

		svc_recv(rqstp);
		validate_process_creds();
	}

	atomic_dec(&nfsdstats.th_cnt);
+1 −8
Original line number Diff line number Diff line
@@ -884,7 +884,6 @@ nfsd_open(struct svc_rqst *rqstp, struct svc_fh *fhp, umode_t type,
	int host_err;
	bool retried = false;

	validate_process_creds();
	/*
	 * If we get here, then the client has already done an "open",
	 * and (hopefully) checked permission - so allow OWNER_OVERRIDE
@@ -909,7 +908,6 @@ nfsd_open(struct svc_rqst *rqstp, struct svc_fh *fhp, umode_t type,
		}
		err = nfserrno(host_err);
	}
	validate_process_creds();
	return err;
}

@@ -926,12 +924,7 @@ int
nfsd_open_verified(struct svc_rqst *rqstp, struct svc_fh *fhp, int may_flags,
		   struct file **filp)
{
	int err;

	validate_process_creds();
	err = __nfsd_open(rqstp, fhp, S_IFREG, may_flags, filp);
	validate_process_creds();
	return err;
	return __nfsd_open(rqstp, fhp, S_IFREG, may_flags, filp);
}

/*
Loading