[PATCH v2 15/27] security: Relabel virtio mem
Peter Krempa
pkrempa at redhat.com
Fri Dec 4 08:41:33 UTC 2020
On Thu, Dec 03, 2020 at 13:36:18 +0100, Michal Privoznik wrote:
> Signed-off-by: Michal Privoznik <mprivozn at redhat.com>
> ---
> src/security/security_apparmor.c | 26 ++++++++++++--------
> src/security/security_dac.c | 42 +++++++++++++++++---------------
> src/security/security_selinux.c | 42 ++++++++++++++++++--------------
> src/security/virt-aa-helper.c | 22 ++++++++++++++---
> 4 files changed, 81 insertions(+), 51 deletions(-)
>
> diff --git a/src/security/security_apparmor.c b/src/security/security_apparmor.c
> index b22ee739d8..8bf7570d4a 100644
> --- a/src/security/security_apparmor.c
> +++ b/src/security/security_apparmor.c
> @@ -681,26 +681,32 @@ AppArmorSetMemoryLabel(virSecurityManagerPtr mgr,
> virDomainDefPtr def,
> virDomainMemoryDefPtr mem)
> {
> - if (mem == NULL)
> - return 0;
Removal of this NULL check is not justified in the commit message and
also really seems to be a separate cleanup if it is actually justified.
> + const char *path = NULL;
>
> switch (mem->model) {
Reviewed-by: Peter Krempa <pkrempa at redhat.com>
More information about the libvir-list
mailing list