Miklos Szeredi
a2140fc0cb
audit: fix refcounting in audit-tree
...
Refcounting of fsnotify_mark in audit tree is broken. E.g:
refcount
create_chunk
alloc_chunk 1
fsnotify_add_mark 2
untag_chunk
fsnotify_get_mark 3
fsnotify_destroy_mark
audit_tree_freeing_mark 2
fsnotify_put_mark 1
fsnotify_put_mark 0
via destroy_list
fsnotify_mark_destroy -1
This was reported by various people as triggering Oops when stopping auditd.
We could just remove the put_mark from audit_tree_freeing_mark() but that would
break freeing via inode destruction. So this patch simply omits a put_mark
after calling destroy_mark or adds a get_mark before.
The additional get_mark is necessary where there's no other put_mark after
fsnotify_destroy_mark() since it assumes that the caller is holding a reference
(or the inode is keeping the mark pinned, not the case here AFAICS).
Signed-off-by: Miklos Szeredi <mszeredi@suse.cz >
Reported-by: Valentin Avram <aval13@gmail.com >
Reported-by: Peter Moody <pmoody@google.com >
Acked-by: Eric Paris <eparis@redhat.com >
CC: stable@vger.kernel.org
2012-08-15 12:55:22 +02:00
..
2012-07-31 08:16:43 -05:00
2012-07-31 17:02:05 +02:00
2011-07-26 16:49:45 -07:00
2012-08-03 10:56:44 -07:00
2012-08-08 20:49:45 +02:00
2012-08-03 10:58:13 -07:00
2012-08-05 12:37:14 +02:00
2012-08-03 10:57:20 -07:00
2012-01-08 12:19:57 -08:00
2012-07-20 09:07:37 +01:00
2012-08-15 12:55:22 +02:00
2012-07-14 16:35:02 +04:00
2012-08-01 10:26:23 -07:00
2012-01-17 16:16:57 -05:00
2012-01-17 16:17:01 -05:00
2012-04-14 11:13:20 +10:00
2012-05-15 14:59:24 -07:00
2012-04-01 12:09:55 -07:00
2012-07-24 17:47:44 -07:00
2012-05-21 23:52:30 -04:00
2011-07-25 20:57:15 -07:00
2012-05-31 17:49:27 -07:00
2012-07-31 18:42:44 -07:00
2012-07-24 13:53:28 +02:00
2011-11-06 19:44:47 -08:00
2012-05-23 22:11:41 -04:00
2011-07-14 12:59:14 +03:00
2012-03-28 18:30:03 +01:00
2012-07-26 13:36:43 -07:00
2012-04-19 15:06:55 -07:00
2012-07-31 18:42:43 -07:00
2012-03-04 23:08:54 +01:00
2012-03-29 11:37:17 +02:00
2012-07-24 16:02:57 +02:00
2012-05-03 03:29:33 -07:00
2012-07-11 23:34:39 +02:00
2012-04-25 12:39:25 +02:00
2012-04-13 13:15:16 -04:00
2012-04-10 11:00:30 +02:00
2012-02-28 20:01:08 +01:00
2012-05-29 16:22:32 -07:00
2012-05-31 17:49:32 -07:00
2012-03-23 13:18:57 +01:00
2012-03-23 13:18:57 +01:00
2012-07-30 17:25:20 -07:00
2012-04-11 18:24:37 -03:00
2012-07-30 17:25:20 -07:00
2012-03-05 15:49:42 -08:00
2011-10-31 09:20:13 -04:00
2012-07-22 10:15:28 -07:00
2011-10-31 09:20:12 -04:00
2012-05-29 23:28:41 -04:00
2011-10-31 09:20:12 -04:00
2012-02-21 09:06:06 -08:00
2012-06-01 10:34:35 -07:00
2012-05-23 22:28:53 +09:30
2011-10-31 09:20:12 -04:00
2012-03-01 10:28:03 +01:00
2011-10-31 09:20:12 -04:00
2011-10-31 09:20:12 -04:00
2012-03-29 19:52:46 +08:00
2012-07-30 17:25:13 -07:00
2012-05-04 17:28:18 -07:00
2012-06-20 14:39:36 -07:00
2012-05-24 00:28:21 -04:00
2011-12-15 14:56:19 +01:00
2011-10-31 09:20:12 -04:00
2012-08-12 21:25:50 +03:00
2011-10-31 09:20:12 -04:00
2012-05-03 03:28:51 -07:00
2011-10-31 09:20:11 -04:00
2012-02-21 09:06:12 -08:00
2012-07-02 12:34:23 -07:00
2012-07-06 06:01:48 -07:00
2012-07-02 12:34:25 -07:00
2012-07-06 06:01:49 -07:00
2012-07-06 06:01:48 -07:00
2012-07-06 06:01:49 -07:00
2012-07-06 06:01:48 -07:00
2012-07-06 05:59:30 -07:00
2012-06-13 21:16:42 +02:00
2012-05-29 16:22:27 -07:00
2012-07-30 17:25:21 -07:00
2011-12-06 08:16:49 +01:00
2011-12-14 14:54:22 -08:00
2011-12-11 10:33:18 -08:00
2012-03-28 18:30:03 +01:00
2012-04-18 12:24:52 +10:00
2012-04-05 17:15:55 -07:00
2012-07-22 23:57:54 +04:00
2012-06-05 17:27:14 +02:00
2012-05-24 22:58:08 +02:00
2012-06-11 15:07:52 +02:00
2012-07-31 18:42:45 -07:00
2012-03-23 13:18:57 +01:00
2012-04-30 10:48:25 -07:00
2011-10-31 09:20:12 -04:00
2011-11-06 19:44:47 -08:00
2012-05-31 17:49:32 -07:00
2012-07-30 17:25:13 -07:00
2012-07-31 18:42:40 -07:00
2012-08-01 10:26:23 -07:00
2012-07-22 23:57:57 +04:00
2012-07-30 17:25:21 -07:00
2012-03-15 18:17:55 -07:00
2012-06-06 13:49:02 +02:00
2012-02-24 10:05:59 +01:00
2011-12-15 14:56:19 +01:00
2012-05-03 03:28:41 -07:00
2011-10-31 09:20:12 -04:00
2012-05-03 03:28:38 -07:00
2011-10-31 09:20:12 -04:00
2012-05-19 15:44:40 -06:00
2011-11-06 19:44:47 -08:00
2012-04-07 16:55:51 -07:00
2011-12-21 10:07:39 +01:00
2012-08-08 20:49:45 +02:00
2012-07-22 10:16:34 -07:00