diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2014-10-11 13:21:34 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2014-10-11 13:21:34 -0400 |
commit | ef4a48c513211d842c55e84f7a1c31884b91dcf7 (patch) | |
tree | 997ecc4d359a7307d6c0e55ab057fe9f9c2b888e /security | |
parent | 90d0c376f5ee1927327b267faf15bf970476f09e (diff) | |
parent | 1b2b32dcdb3df28dd103033c73cac2417fa05845 (diff) |
Merge tag 'locks-v3.18-1' of git://git.samba.org/jlayton/linux
Pull file locking related changes from Jeff Layton:
"This release is a little more busy for file locking changes than the
last:
- a set of patches from Kinglong Mee to fix the lockowner handling in
knfsd
- a pile of cleanups to the internal file lease API. This should get
us a bit closer to allowing for setlease methods that can block.
There are some dependencies between mine and Bruce's trees this cycle,
and I based my tree on top of the requisite patches in Bruce's tree"
* tag 'locks-v3.18-1' of git://git.samba.org/jlayton/linux: (26 commits)
locks: fix fcntl_setlease/getlease return when !CONFIG_FILE_LOCKING
locks: flock_make_lock should return a struct file_lock (or PTR_ERR)
locks: set fl_owner for leases to filp instead of current->files
locks: give lm_break a return value
locks: __break_lease cleanup in preparation of allowing direct removal of leases
locks: remove i_have_this_lease check from __break_lease
locks: move freeing of leases outside of i_lock
locks: move i_lock acquisition into generic_*_lease handlers
locks: define a lm_setup handler for leases
locks: plumb a "priv" pointer into the setlease routines
nfsd: don't keep a pointer to the lease in nfs4_file
locks: clean up vfs_setlease kerneldoc comments
locks: generic_delete_lease doesn't need a file_lock at all
nfsd: fix potential lease memory leak in nfs4_setlease
locks: close potential race in lease_get_mtime
security: make security_file_set_fowner, f_setown and __f_setown void return
locks: consolidate "nolease" routines
locks: remove lock_may_read and lock_may_write
lockd: rip out deferred lock handling from testlock codepath
NFSD: Get reference of lockowner when coping file_lock
...
Diffstat (limited to 'security')
-rw-r--r-- | security/capability.c | 4 | ||||
-rw-r--r-- | security/security.c | 4 | ||||
-rw-r--r-- | security/selinux/hooks.c | 4 | ||||
-rw-r--r-- | security/smack/smack_lsm.c | 3 |
4 files changed, 6 insertions, 9 deletions
diff --git a/security/capability.c b/security/capability.c index a74fde6a7468..d68c57a62bcf 100644 --- a/security/capability.c +++ b/security/capability.c | |||
@@ -343,9 +343,9 @@ static int cap_file_fcntl(struct file *file, unsigned int cmd, | |||
343 | return 0; | 343 | return 0; |
344 | } | 344 | } |
345 | 345 | ||
346 | static int cap_file_set_fowner(struct file *file) | 346 | static void cap_file_set_fowner(struct file *file) |
347 | { | 347 | { |
348 | return 0; | 348 | return; |
349 | } | 349 | } |
350 | 350 | ||
351 | static int cap_file_send_sigiotask(struct task_struct *tsk, | 351 | static int cap_file_send_sigiotask(struct task_struct *tsk, |
diff --git a/security/security.c b/security/security.c index e41b1a8d7644..18b35c63fc0c 100644 --- a/security/security.c +++ b/security/security.c | |||
@@ -775,9 +775,9 @@ int security_file_fcntl(struct file *file, unsigned int cmd, unsigned long arg) | |||
775 | return security_ops->file_fcntl(file, cmd, arg); | 775 | return security_ops->file_fcntl(file, cmd, arg); |
776 | } | 776 | } |
777 | 777 | ||
778 | int security_file_set_fowner(struct file *file) | 778 | void security_file_set_fowner(struct file *file) |
779 | { | 779 | { |
780 | return security_ops->file_set_fowner(file); | 780 | security_ops->file_set_fowner(file); |
781 | } | 781 | } |
782 | 782 | ||
783 | int security_file_send_sigiotask(struct task_struct *tsk, | 783 | int security_file_send_sigiotask(struct task_struct *tsk, |
diff --git a/security/selinux/hooks.c b/security/selinux/hooks.c index b0e940497e23..ada0d0bf3463 100644 --- a/security/selinux/hooks.c +++ b/security/selinux/hooks.c | |||
@@ -3346,14 +3346,12 @@ static int selinux_file_fcntl(struct file *file, unsigned int cmd, | |||
3346 | return err; | 3346 | return err; |
3347 | } | 3347 | } |
3348 | 3348 | ||
3349 | static int selinux_file_set_fowner(struct file *file) | 3349 | static void selinux_file_set_fowner(struct file *file) |
3350 | { | 3350 | { |
3351 | struct file_security_struct *fsec; | 3351 | struct file_security_struct *fsec; |
3352 | 3352 | ||
3353 | fsec = file->f_security; | 3353 | fsec = file->f_security; |
3354 | fsec->fown_sid = current_sid(); | 3354 | fsec->fown_sid = current_sid(); |
3355 | |||
3356 | return 0; | ||
3357 | } | 3355 | } |
3358 | 3356 | ||
3359 | static int selinux_file_send_sigiotask(struct task_struct *tsk, | 3357 | static int selinux_file_send_sigiotask(struct task_struct *tsk, |
diff --git a/security/smack/smack_lsm.c b/security/smack/smack_lsm.c index e6ab307ce86e..69e5635d89e5 100644 --- a/security/smack/smack_lsm.c +++ b/security/smack/smack_lsm.c | |||
@@ -1390,12 +1390,11 @@ static int smack_mmap_file(struct file *file, | |||
1390 | * Returns 0 | 1390 | * Returns 0 |
1391 | * Further research may be required on this one. | 1391 | * Further research may be required on this one. |
1392 | */ | 1392 | */ |
1393 | static int smack_file_set_fowner(struct file *file) | 1393 | static void smack_file_set_fowner(struct file *file) |
1394 | { | 1394 | { |
1395 | struct smack_known *skp = smk_of_current(); | 1395 | struct smack_known *skp = smk_of_current(); |
1396 | 1396 | ||
1397 | file->f_security = skp->smk_known; | 1397 | file->f_security = skp->smk_known; |
1398 | return 0; | ||
1399 | } | 1398 | } |
1400 | 1399 | ||
1401 | /** | 1400 | /** |