From: Gao feng Date: Fri, 1 Nov 2013 11:34:44 +0000 (+0800) Subject: audit: use old_lock in audit_set_feature X-Git-Tag: firefly_0821_release~176^2~4072^2~63 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=4547b3bc43c64389ca4368be0edf1f90ae1b938d;p=firefly-linux-kernel-4.4.55.git audit: use old_lock in audit_set_feature we already have old_lock, no need to calculate it again. Acked-by: Eric Paris Signed-off-by: Gao feng Signed-off-by: Richard Guy Briggs Signed-off-by: Eric Paris --- diff --git a/kernel/audit.c b/kernel/audit.c index 2360da991721..0d4865a50171 100644 --- a/kernel/audit.c +++ b/kernel/audit.c @@ -714,7 +714,7 @@ static int audit_set_feature(struct sk_buff *skb) old_lock = af.lock & feature; /* are we changing a locked feature? */ - if ((af.lock & feature) && (new_feature != old_feature)) { + if (old_lock && (new_feature != old_feature)) { audit_log_feature_change(i, old_feature, new_feature, old_lock, new_lock, 0); return -EPERM;