ftrace: Add comment to why rcu_dereference_sched() is open coded
[linux-2.6-microblaze.git] / kernel / audit.c
index da8dc0d..8e09f0f 100644 (file)
@@ -830,7 +830,7 @@ static int kauditd_thread(void *dummy)
                rc = kauditd_send_queue(sk, portid,
                                        &audit_hold_queue, UNICAST_RETRIES,
                                        NULL, kauditd_rehold_skb);
-               if (ac && rc < 0) {
+               if (rc < 0) {
                        sk = NULL;
                        auditd_reset(ac);
                        goto main_queue;
@@ -840,7 +840,7 @@ static int kauditd_thread(void *dummy)
                rc = kauditd_send_queue(sk, portid,
                                        &audit_retry_queue, UNICAST_RETRIES,
                                        NULL, kauditd_hold_skb);
-               if (ac && rc < 0) {
+               if (rc < 0) {
                        sk = NULL;
                        auditd_reset(ac);
                        goto main_queue;
@@ -2155,18 +2155,19 @@ void audit_log_task_info(struct audit_buffer *ab)
 EXPORT_SYMBOL(audit_log_task_info);
 
 /**
- * audit_log_link_denied - report a link restriction denial
- * @operation: specific link operation
+ * audit_log_path_denied - report a path restriction denial
+ * @type: audit message type (AUDIT_ANOM_LINK, AUDIT_ANOM_CREAT, etc)
+ * @operation: specific operation name
  */
-void audit_log_link_denied(const char *operation)
+void audit_log_path_denied(int type, const char *operation)
 {
        struct audit_buffer *ab;
 
        if (!audit_enabled || audit_dummy_context())
                return;
 
-       /* Generate AUDIT_ANOM_LINK with subject, operation, outcome. */
-       ab = audit_log_start(audit_context(), GFP_KERNEL, AUDIT_ANOM_LINK);
+       /* Generate log with subject, operation, outcome. */
+       ab = audit_log_start(audit_context(), GFP_KERNEL, type);
        if (!ab)
                return;
        audit_log_format(ab, "op=%s", operation);