Commit 6509d77
selinux: shrink critical section in sel_write_load()
commit 868f31e upstream.
Currently sel_write_load() takes the policy mutex earlier than
necessary. Move the taking of the mutex later. This avoids
holding it unnecessarily across the vmalloc() and copy_from_user()
of the policy data.
Cc: stable@vger.kernel.org
Signed-off-by: Stephen Smalley <stephen.smalley.work@gmail.com>
Signed-off-by: Paul Moore <paul@paul-moore.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>1 parent 3bdbb95 commit 6509d77
1 file changed
Lines changed: 8 additions & 10 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
583 | 583 | | |
584 | 584 | | |
585 | 585 | | |
586 | | - | |
587 | | - | |
588 | 586 | | |
589 | 587 | | |
590 | 588 | | |
591 | | - | |
| 589 | + | |
592 | 590 | | |
593 | 591 | | |
594 | | - | |
595 | | - | |
596 | | - | |
597 | | - | |
| 592 | + | |
| 593 | + | |
598 | 594 | | |
599 | 595 | | |
600 | 596 | | |
601 | 597 | | |
602 | 598 | | |
| 599 | + | |
603 | 600 | | |
604 | 601 | | |
605 | 602 | | |
606 | | - | |
| 603 | + | |
607 | 604 | | |
608 | 605 | | |
609 | 606 | | |
610 | 607 | | |
611 | 608 | | |
612 | 609 | | |
613 | | - | |
| 610 | + | |
614 | 611 | | |
615 | 612 | | |
616 | 613 | | |
| |||
620 | 617 | | |
621 | 618 | | |
622 | 619 | | |
623 | | - | |
| 620 | + | |
624 | 621 | | |
| 622 | + | |
625 | 623 | | |
626 | 624 | | |
627 | 625 | | |
| |||
0 commit comments