diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2013-07-03 17:04:58 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-07-03 17:04:58 -0400 |
commit | f39d420f672f99ad9a0fe7deb951a0030d4f0d9e (patch) | |
tree | 450e229a4305362f72cc5461aab8af4f2f5d023e /mm/shmem.c | |
parent | fe489bf4505ae26d3c6d6a1f1d3064c2a9c5cd85 (diff) | |
parent | 572e5b018ba68d634f30aef71cf04d85c884aa05 (diff) |
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security
Pull security subsystem updates from James Morris:
"In this update, Smack learns to love IPv6 and to mount a filesystem
with a transmutable hierarchy (i.e. security labels are inherited
from parent directory upon creation rather than creating process).
The rest of the changes are maintenance"
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security: (37 commits)
tpm/tpm_i2c_infineon: Remove unused header file
tpm: tpm_i2c_infinion: Don't modify i2c_client->driver
evm: audit integrity metadata failures
integrity: move integrity_audit_msg()
evm: calculate HMAC after initializing posix acl on tmpfs
maintainers: add Dmitry Kasatkin
Smack: Fix the bug smackcipso can't set CIPSO correctly
Smack: Fix possible NULL pointer dereference at smk_netlbl_mls()
Smack: Add smkfstransmute mount option
Smack: Improve access check performance
Smack: Local IPv6 port based controls
tpm: fix regression caused by section type conflict of tpm_dev_release() in ppc builds
maintainers: Remove Kent from maintainers
tpm: move TPM_DIGEST_SIZE defintion
tpm_tis: missing platform_driver_unregister() on error in init_tis()
security: clarify cap_inode_getsecctx description
apparmor: no need to delay vfree()
apparmor: fix fully qualified name parsing
apparmor: fix setprocattr arg processing for onexec
apparmor: localize getting the security context to a few macros
...
Diffstat (limited to 'mm/shmem.c')
-rw-r--r-- | mm/shmem.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/mm/shmem.c b/mm/shmem.c index 118dfa4952f4..a87990cf9f94 100644 --- a/mm/shmem.c +++ b/mm/shmem.c | |||
@@ -1936,6 +1936,13 @@ shmem_mknod(struct inode *dir, struct dentry *dentry, umode_t mode, dev_t dev) | |||
1936 | 1936 | ||
1937 | inode = shmem_get_inode(dir->i_sb, dir, mode, dev, VM_NORESERVE); | 1937 | inode = shmem_get_inode(dir->i_sb, dir, mode, dev, VM_NORESERVE); |
1938 | if (inode) { | 1938 | if (inode) { |
1939 | #ifdef CONFIG_TMPFS_POSIX_ACL | ||
1940 | error = generic_acl_init(inode, dir); | ||
1941 | if (error) { | ||
1942 | iput(inode); | ||
1943 | return error; | ||
1944 | } | ||
1945 | #endif | ||
1939 | error = security_inode_init_security(inode, dir, | 1946 | error = security_inode_init_security(inode, dir, |
1940 | &dentry->d_name, | 1947 | &dentry->d_name, |
1941 | shmem_initxattrs, NULL); | 1948 | shmem_initxattrs, NULL); |
@@ -1945,15 +1952,8 @@ shmem_mknod(struct inode *dir, struct dentry *dentry, umode_t mode, dev_t dev) | |||
1945 | return error; | 1952 | return error; |
1946 | } | 1953 | } |
1947 | } | 1954 | } |
1948 | #ifdef CONFIG_TMPFS_POSIX_ACL | 1955 | |
1949 | error = generic_acl_init(inode, dir); | ||
1950 | if (error) { | ||
1951 | iput(inode); | ||
1952 | return error; | ||
1953 | } | ||
1954 | #else | ||
1955 | error = 0; | 1956 | error = 0; |
1956 | #endif | ||
1957 | dir->i_size += BOGO_DIRENT_SIZE; | 1957 | dir->i_size += BOGO_DIRENT_SIZE; |
1958 | dir->i_ctime = dir->i_mtime = CURRENT_TIME; | 1958 | dir->i_ctime = dir->i_mtime = CURRENT_TIME; |
1959 | d_instantiate(dentry, inode); | 1959 | d_instantiate(dentry, inode); |