KVM: nEPT: reset PDPTR register cache on nested vmentry emulation
[firefly-linux-kernel-4.4.55.git] / kernel / auditfilter.c
index 83a2970295d19ffdb1bd7417ed2b1b54a815cba1..f7aee8be7fb286db4a40919bc10ede18f17016dc 100644 (file)
@@ -423,7 +423,7 @@ static struct audit_entry *audit_data_to_entry(struct audit_rule_data *data,
                f->lsm_rule = NULL;
 
                /* Support legacy tests for a valid loginuid */
-               if ((f->type == AUDIT_LOGINUID) && (f->val == 4294967295)) {
+               if ((f->type == AUDIT_LOGINUID) && (f->val == ~0U)) {
                        f->type = AUDIT_LOGINUID_SET;
                        f->val = 0;
                }
@@ -865,6 +865,12 @@ static inline int audit_add_rule(struct audit_entry *entry)
                err = audit_add_watch(&entry->rule, &list);
                if (err) {
                        mutex_unlock(&audit_filter_mutex);
+                       /*
+                        * normally audit_add_tree_rule() will free it
+                        * on failure
+                        */
+                       if (tree)
+                               audit_put_tree(tree);
                        goto error;
                }
        }
@@ -1021,9 +1027,6 @@ static void audit_log_rule_change(char *action, struct audit_krule *rule, int re
  * @seq: netlink audit message sequence (serial) number
  * @data: payload data
  * @datasz: size of payload data
- * @loginuid: loginuid of sender
- * @sessionid: sessionid for netlink audit message
- * @sid: SE Linux Security ID of sender
  */
 int audit_receive_filter(int type, int pid, int seq, void *data, size_t datasz)
 {