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.

apparmor: account for in_atomic removal in common_file_perm

If we are not in an atomic context in common_file_perm, then we don't have
to use the atomic versions, resulting in improved performance outside of
atomic contexts.

Signed-off-by: Ryan Lee <ryan.lee@canonical.com>
Signed-off-by: John Johansen <john.johansen@canonical.com>

authored by

Ryan Lee and committed by
John Johansen
9b829c0a c3f27ccd

+2 -3
+2 -3
security/apparmor/lsm.c
··· 524 524 { 525 525 struct aa_label *label; 526 526 int error = 0; 527 - bool needput; 528 527 529 528 /* don't reaudit files closed during inheritance */ 530 529 if (unlikely(file->f_path.dentry == aa_null.dentry)) 531 530 return -EACCES; 532 531 533 - label = __begin_current_label_crit_section(&needput); 532 + label = begin_current_label_crit_section(); 534 533 error = aa_file_perm(op, current_cred(), label, file, mask, false); 535 - __end_current_label_crit_section(label, needput); 534 + end_current_label_crit_section(label); 536 535 537 536 return error; 538 537 }