2019-06-04 10:11:33 +02:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-08-17 13:32:36 -04:00
|
|
|
|
2008-04-22 17:46:10 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-05-19 15:48:56 +03:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2006-11-17 17:38:53 -05:00
|
|
|
|
2018-11-12 09:30:56 -08:00
|
|
|
|
2018-09-21 17:19:45 -07:00
|
|
|
|
2014-09-10 17:09:57 -04:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2008-04-22 17:46:10 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
2017-01-09 10:07:31 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-12-24 11:09:40 -05:00
|
|
|
|
2016-03-28 15:16:53 -04:00
|
|
|
|
selinux: Convert isec->lock into a spinlock
Convert isec->lock from a mutex into a spinlock. Instead of holding
the lock while sleeping in inode_doinit_with_dentry, set
isec->initialized to LABEL_PENDING and release the lock. Then, when
the sid has been determined, re-acquire the lock. If isec->initialized
is still set to LABEL_PENDING, set isec->sid; otherwise, the sid has
been set by another task (LABEL_INITIALIZED) or invalidated
(LABEL_INVALID) in the meantime.
This fixes a deadlock on gfs2 where
* one task is in inode_doinit_with_dentry -> gfs2_getxattr, holds
isec->lock, and tries to acquire the inode's glock, and
* another task is in do_xmote -> inode_go_inval ->
selinux_inode_invalidate_secctx, holds the inode's glock, and
tries to acquire isec->lock.
Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
[PM: minor tweaks to keep checkpatch.pl happy]
Signed-off-by: Paul Moore <paul@paul-moore.com>
2016-11-15 11:06:40 +01:00
|
|
|
|
|
|
|
|
|
2015-12-24 11:09:40 -05:00
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2008-04-22 17:46:10 -04:00
|
|
|
|
2018-09-21 17:19:29 -07:00
|
|
|
|
2008-04-22 17:46:10 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
selinux: Convert isec->lock into a spinlock
Convert isec->lock from a mutex into a spinlock. Instead of holding
the lock while sleeping in inode_doinit_with_dentry, set
isec->initialized to LABEL_PENDING and release the lock. Then, when
the sid has been determined, re-acquire the lock. If isec->initialized
is still set to LABEL_PENDING, set isec->sid; otherwise, the sid has
been set by another task (LABEL_INITIALIZED) or invalidated
(LABEL_INVALID) in the meantime.
This fixes a deadlock on gfs2 where
* one task is in inode_doinit_with_dentry -> gfs2_getxattr, holds
isec->lock, and tries to acquire the inode's glock, and
* another task is in do_xmote -> inode_go_inval ->
selinux_inode_invalidate_secctx, holds the inode's glock, and
tries to acquire isec->lock.
Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
[PM: minor tweaks to keep checkpatch.pl happy]
Signed-off-by: Paul Moore <paul@paul-moore.com>
2016-11-15 11:06:40 +01:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2008-04-22 17:46:10 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2008-04-22 17:46:10 -04:00
|
|
|
|
2006-07-10 04:43:53 -07:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2006-07-10 04:43:53 -07:00
|
|
|
|
2012-10-10 10:38:47 -04:00
|
|
|
|
2012-10-09 16:20:08 -04:00
|
|
|
|
2006-09-25 23:32:02 -07:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2008-04-22 17:46:10 -04:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2008-04-22 17:46:10 -04:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-09-10 17:09:57 -04:00
|
|
|
|
2008-01-29 08:38:08 -05:00
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
2008-01-29 08:38:13 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2008-04-10 10:48:14 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2008-01-29 08:38:23 -05:00
|
|
|
|
2006-08-04 23:17:57 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2008-10-10 10:16:32 -04:00
|
|
|
|
2008-10-10 10:16:33 -04:00
|
|
|
|
2006-08-04 23:17:57 -07:00
|
|
|
|
2008-10-10 10:16:33 -04:00
|
|
|
|
2006-08-04 23:17:57 -07:00
|
|
|
|
2008-10-10 10:16:33 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-02-13 20:57:18 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
2013-01-14 07:12:19 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2006-06-22 14:47:17 -07:00
|
|
|
|
2008-04-22 17:46:10 -04:00
|
|
|
|
2006-06-22 14:47:17 -07:00
|
|
|
|
|
|
|
|
|
2017-05-19 15:48:56 +03:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-05-19 15:48:59 +03:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-10-18 13:00:25 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-11-12 09:30:56 -08:00
|
|
|
|
2018-09-21 17:17:16 -07:00
|
|
|
|
|
|
|
|
|
2018-11-12 09:30:56 -08:00
|
|
|
|
2018-09-21 17:17:16 -07:00
|
|
|
|
|
|
|
|
|
2018-09-21 17:22:32 -07:00
|
|
|
|
|
|
|
|
|
2018-11-12 12:02:49 -08:00
|
|
|
|
2018-09-21 17:22:32 -07:00
|
|
|
|
|
|
|
|
|
2018-09-21 17:19:11 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-09-21 17:19:29 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-09-21 17:19:11 -07:00
|
|
|
|
|
|
|
|
|
2018-09-21 17:19:45 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-11-20 11:55:02 -08:00
|
|
|
|
2018-09-21 17:19:45 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-11-20 11:55:02 -08:00
|
|
|
|
2018-09-21 17:19:45 -07:00
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|