[PATCH][next] security: remove redundant assignment to variable rc

Paul Moore paul at paul-moore.com
Sun Jan 5 02:54:30 UTC 2025


On Tue, Nov 12, 2024 at 9:00 AM Dan Carpenter <dan.carpenter at linaro.org> wrote:
> On Tue, Nov 12, 2024 at 07:32:24AM -0600, Serge E. Hallyn wrote:
> > On Tue, Nov 12, 2024 at 12:45:32PM +0000, Colin Ian King wrote:
> > > In the case where rc is equal to EOPNOTSUPP it is being reassigned a
> > > new value of zero that is never read. The following continue statement
> > > loops back to the next iteration of the lsm_for_each_hook loop and
> > > rc is being re-assigned a new value from the call to getselfattr.
> > > The assignment is redundant and can be removed.
> > >
> > > Signed-off-by: Colin Ian King <colin.i.king at gmail.com>
> >
> > Reviewed-by: Serge Hallyn <serge at hallyn.com>
> >
> > (long as it doesn't go to stable :)
> >
>
> There is a tag for fixes which would break stable.
>
> Cc: <stable+noautosel at kernel.org> # reason goes here, and must be present
>
> But this isn't a fix and it wouldn't break stable so probably that's not
> appropriate.

I've also talked with the stable kernel folks and they no longer
automatically pull any LSM commits with a 'Fixes:' tag.  LSM commits
need to be explicitly marked with the stable CC for them to be pulled
into the stable trees.

-- 
paul-moore.com



More information about the Linux-security-module-archive mailing list