From 355f737dd7086bdbadc9410c635f803909ab5211 Mon Sep 17 00:00:00 2001 From: John Johansen Date: Sun, 21 Jan 2024 16:43:25 -0800 Subject: [PATCH] UBUNTU: SAUCE: apparmor4.0.0 [87/90]: fixup notify BugLink: http://bugs.launchpad.net/bugs/2028253 (cherry picked from commit fb00e41adbe0c5c0e0f2bcaaf2949fec00b2a941 https://git.launchpad.net/~apparmor-dev/ubuntu-kernel-next) Signed-off-by: Paolo Pisati --- security/apparmor/notify.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/security/apparmor/notify.c b/security/apparmor/notify.c index e1c5697f79c7..6b5ab25c92d7 100644 --- a/security/apparmor/notify.c +++ b/security/apparmor/notify.c @@ -971,10 +971,10 @@ static long build_v3_unotif(struct aa_knotif *knotif, void __user *buf, pos = buf + sizeof(unotif); if (!build_append_str(buf, pos, max_size, profile->base.hname, unotif.op.label, size)) - return size; + return -EMSGSIZE; if (!build_append_str(buf, pos, max_size, knotif->ad->name, unotif.file.name, size)) - return size; + return -EMSGSIZE; /* set size after appending strings */ unotif.common.len = size;