summaryrefslogtreecommitdiff
path: root/security
diff options
context:
space:
mode:
authorHuang, Tao <huangtao@rock-chips.com>2017-03-01 18:40:28 +0800
committerHuang, Tao <huangtao@rock-chips.com>2017-03-01 18:40:28 +0800
commit5ed6b099c8d4381923b6bb3d39ea2d4ca2e8afdc (patch)
tree55d45ecf7f58d1638e8247daa5726524a38d224c /security
parent3f083a523be4ffda44328cfe5a08361ca601bc90 (diff)
parent4304568925f8191755da36df5c61abb69db9b1b0 (diff)
Merge branch 'linux-linaro-lsk-v4.4-android' of git://git.linaro.org/kernel/linux-linaro-stable.git
* linux-linaro-lsk-v4.4-android: (434 commits) Linux 4.4.52 kvm: vmx: ensure VMCS is current while enabling PML Revert "usb: chipidea: imx: enable CI_HDRC_SET_NON_ZERO_TTHA" rtlwifi: rtl_usb: Fix for URB leaking when doing ifconfig up/down block: fix double-free in the failure path of cgwb_bdi_init() goldfish: Sanitize the broken interrupt handler x86/platform/goldfish: Prevent unconditional loading USB: serial: ark3116: fix register-accessor error handling USB: serial: opticon: fix CTS retrieval at open USB: serial: spcp8x5: fix modem-status handling USB: serial: ftdi_sio: fix line-status over-reporting USB: serial: ftdi_sio: fix extreme low-latency setting USB: serial: ftdi_sio: fix modem-status error handling USB: serial: cp210x: add new IDs for GE Bx50v3 boards USB: serial: mos7840: fix another NULL-deref at open tty: serial: msm: Fix module autoload net: socket: fix recvmmsg not returning error from sock_error ip: fix IP_CHECKSUM handling irda: Fix lockdep annotations in hashbin_delete(). dccp: fix freeing skb too early for IPV6_RECVPKTINFO ... Conflicts: drivers/mmc/core/mmc.c drivers/usb/dwc3/ep0.c drivers/usb/host/xhci.h Change-Id: Icf331a68162ab686d01996a3f43fa2e97543f62e
Diffstat (limited to 'security')
-rw-r--r--security/inode.c2
-rw-r--r--security/security.c1
-rw-r--r--security/selinux/hooks.c2
3 files changed, 3 insertions, 2 deletions
diff --git a/security/inode.c b/security/inode.c
index 16622aef9bde..0f1a041bf6cb 100644
--- a/security/inode.c
+++ b/security/inode.c
@@ -100,7 +100,7 @@ struct dentry *securityfs_create_file(const char *name, umode_t mode,
dir = d_inode(parent);
mutex_lock(&dir->i_mutex);
- dentry = lookup_one_len(name, parent, strlen(name));
+ dentry = lookup_one_len2(name, mount, parent, strlen(name));
if (IS_ERR(dentry))
goto out;
diff --git a/security/security.c b/security/security.c
index 46f405ce6b0f..ae05ab153c5a 100644
--- a/security/security.c
+++ b/security/security.c
@@ -498,6 +498,7 @@ int security_path_chown(struct path *path, kuid_t uid, kgid_t gid)
return 0;
return call_int_hook(path_chown, 0, path, uid, gid);
}
+EXPORT_SYMBOL(security_path_chown);
int security_path_chroot(struct path *path)
{
diff --git a/security/selinux/hooks.c b/security/selinux/hooks.c
index 94a0bfc748d1..2bc8b555bca9 100644
--- a/security/selinux/hooks.c
+++ b/security/selinux/hooks.c
@@ -5673,7 +5673,7 @@ static int selinux_setprocattr(struct task_struct *p,
return error;
/* Obtain a SID for the context, if one was specified. */
- if (size && str[1] && str[1] != '\n') {
+ if (size && str[0] && str[0] != '\n') {
if (str[size-1] == '\n') {
str[size-1] = 0;
size--;