Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'selinux-pr-20200210' of git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/selinux

Pull SELinux fixes from Paul Moore:
"Two small fixes: one fixes a locking problem in the recently merged
label translation code, the other fixes an embarrassing 'binderfs' /
'binder' filesystem name check"

* tag 'selinux-pr-20200210' of git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/selinux:
selinux: fix sidtab string cache locking
selinux: fix typo in filesystem name

+4 -10
+1 -1
security/selinux/hooks.c
··· 698 698 699 699 if (!strcmp(sb->s_type->name, "debugfs") || 700 700 !strcmp(sb->s_type->name, "tracefs") || 701 - !strcmp(sb->s_type->name, "binderfs") || 701 + !strcmp(sb->s_type->name, "binder") || 702 702 !strcmp(sb->s_type->name, "pstore")) 703 703 sbsec->flags |= SE_SBGENFS; 704 704
+3 -9
security/selinux/ss/sidtab.c
··· 518 518 const char *str, u32 str_len) 519 519 { 520 520 struct sidtab_str_cache *cache, *victim = NULL; 521 + unsigned long flags; 521 522 522 523 /* do not cache invalid contexts */ 523 524 if (entry->context.len) 524 525 return; 525 526 526 - /* 527 - * Skip the put operation when in non-task context to avoid the need 528 - * to disable interrupts while holding s->cache_lock. 529 - */ 530 - if (!in_task()) 531 - return; 532 - 533 - spin_lock(&s->cache_lock); 527 + spin_lock_irqsave(&s->cache_lock, flags); 534 528 535 529 cache = rcu_dereference_protected(entry->cache, 536 530 lockdep_is_held(&s->cache_lock)); ··· 555 561 rcu_assign_pointer(entry->cache, cache); 556 562 557 563 out_unlock: 558 - spin_unlock(&s->cache_lock); 564 + spin_unlock_irqrestore(&s->cache_lock, flags); 559 565 kfree_rcu(victim, rcu_member); 560 566 } 561 567