nsfs: simplify auxstr logic
There's no need to check whether non-NULL value is being assigned to auxstr; syscall_exiting_trace does it itself. * nsfs.c (nsfs_ioctl) <case NS_GET_NSTYPE>: Simply assign result of xlookup to auxstr if syserror(tcp) is false.
This commit is contained in:
parent
6e7da52286
commit
25a4cafa90
12
nsfs.c
12
nsfs.c
@ -41,15 +41,9 @@ nsfs_ioctl(struct tcb *tcp, unsigned int code, kernel_ulong_t arg)
|
||||
case NS_GET_NSTYPE:
|
||||
if (entering(tcp))
|
||||
return 0;
|
||||
if (!syserror(tcp)) {
|
||||
const char *outstr;
|
||||
outstr = xlookup(setns_types, tcp->u_rval);
|
||||
if (outstr) {
|
||||
tcp->auxstr = outstr;
|
||||
return RVAL_IOCTL_DECODED | RVAL_STR;
|
||||
}
|
||||
}
|
||||
return RVAL_IOCTL_DECODED;
|
||||
if (!syserror(tcp))
|
||||
tcp->auxstr = xlookup(setns_types, tcp->u_rval);
|
||||
return RVAL_IOCTL_DECODED | RVAL_STR;
|
||||
case NS_GET_OWNER_UID:
|
||||
if (entering(tcp))
|
||||
return 0;
|
||||
|
Loading…
x
Reference in New Issue
Block a user