Re: [PATCH v12 04/26] ima: Move arch_policy_entry into ima_namespace

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 





On 5/20/22 22:46, Serge E. Hallyn wrote:
On Wed, Apr 20, 2022 at 10:06:11AM -0400, Stefan Berger wrote:

@@ -1005,7 +1003,8 @@ void ima_update_policy(struct ima_namespace *ns)
  		 * on boot.  After loading a custom policy, free the
  		 * architecture specific rules stored as an array.
  		 */
-		kfree(arch_policy_entry);
+		kfree(ns->arch_policy_entry);
+		ns->arch_policy_entry = NULL;

So the thing that prevents multiple racing occurances of the above two lines is
that ima_open_policy() sets IMA_FS_BUSY (or returns EBUSY) and then removes
this file before clearing the flag, right?

Correct.


Seems good.

Reviewed-by: Serge Hallyn <serge@xxxxxxxxxx>


  	}
  	ima_update_policy_flags(ns);
--
2.34.1



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux Kernel]     [Linux Kernel Hardening]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux SCSI]

  Powered by Linux