On Mon, Apr 3, 2023 at 12:38 PM Stephen Smalley <stephen.smalley.work@xxxxxxxxx> wrote: > > The callers haven't used the returned node since > commit 21193dcd1f3570dd ("SELinux: more careful use of avd in > avc_has_perm_noaudit") and the return value assignments were removed in > commit 0a9876f36b08706d ("selinux: Remove redundant assignments"). Stop > returning the node altogether and make the functions return void. > > Signed-off-by: Stephen Smalley <stephen.smalley.work@xxxxxxxxx> > --- > security/selinux/avc.c | 25 ++++++++++++------------- > 1 file changed, 12 insertions(+), 13 deletions(-) > > diff --git a/security/selinux/avc.c b/security/selinux/avc.c > index c162e51fb43c..ad2afc17b633 100644 > --- a/security/selinux/avc.c > +++ b/security/selinux/avc.c > @@ -603,12 +603,11 @@ static int avc_latest_notif_update(int seqno, int is_insert) > * response to a security_compute_av() call. If the > * sequence number @avd->seqno is not less than the latest > * revocation notification, then the function copies > - * the access vectors into a cache entry, returns > - * avc_node inserted. Otherwise, this function returns NULL. > + * the access vectors into a cache entry. > */ > -static struct avc_node *avc_insert(u32 ssid, u32 tsid, u16 tclass, > - struct av_decision *avd, > - struct avc_xperms_node *xp_node) > +static void avc_insert(u32 ssid, u32 tsid, u16 tclass, > + struct av_decision *avd, > + struct avc_xperms_node *xp_node) Thanks Stephen, I just merged this into selinux/next, but I do have a couple of small style nitpicks for future reference. When writing a patch subject line with a function name, please add parenthesis to the name to help make it clear it is a function, e.g. "avc_insert()" instead of "avc_insert". When the argument list spills to multiple lines, please make sure they are aligned (look at the committed patch for an example). -- paul-moore.com