Christoph Lameter 41a212859a slub: use sysfs'es release mechanism for kmem_cache
debugobjects warning during netfilter exit:

    ------------[ cut here ]------------
    WARNING: CPU: 6 PID: 4178 at lib/debugobjects.c:260 debug_print_object+0x8d/0xb0()
    ODEBUG: free active (active state 0) object type: timer_list hint: delayed_work_timer_fn+0x0/0x20
    Modules linked in:
    CPU: 6 PID: 4178 Comm: kworker/u16:2 Tainted: G        W 3.11.0-next-20130906-sasha #3984
    Workqueue: netns cleanup_net
    Call Trace:
      dump_stack+0x52/0x87
      warn_slowpath_common+0x8c/0xc0
      warn_slowpath_fmt+0x46/0x50
      debug_print_object+0x8d/0xb0
      __debug_check_no_obj_freed+0xa5/0x220
      debug_check_no_obj_freed+0x15/0x20
      kmem_cache_free+0x197/0x340
      kmem_cache_destroy+0x86/0xe0
      nf_conntrack_cleanup_net_list+0x131/0x170
      nf_conntrack_pernet_exit+0x5d/0x70
      ops_exit_list+0x5e/0x70
      cleanup_net+0xfb/0x1c0
      process_one_work+0x338/0x550
      worker_thread+0x215/0x350
      kthread+0xe7/0xf0
      ret_from_fork+0x7c/0xb0

Also during dcookie cleanup:

    WARNING: CPU: 12 PID: 9725 at lib/debugobjects.c:260 debug_print_object+0x8c/0xb0()
    ODEBUG: free active (active state 0) object type: timer_list hint: delayed_work_timer_fn+0x0/0x20
    Modules linked in:
    CPU: 12 PID: 9725 Comm: trinity-c141 Not tainted 3.15.0-rc2-next-20140423-sasha-00018-gc4ff6c4 #408
    Call Trace:
      dump_stack (lib/dump_stack.c:52)
      warn_slowpath_common (kernel/panic.c:430)
      warn_slowpath_fmt (kernel/panic.c:445)
      debug_print_object (lib/debugobjects.c:262)
      __debug_check_no_obj_freed (lib/debugobjects.c:697)
      debug_check_no_obj_freed (lib/debugobjects.c:726)
      kmem_cache_free (mm/slub.c:2689 mm/slub.c:2717)
      kmem_cache_destroy (mm/slab_common.c:363)
      dcookie_unregister (fs/dcookies.c:302 fs/dcookies.c:343)
      event_buffer_release (arch/x86/oprofile/../../../drivers/oprofile/event_buffer.c:153)
      __fput (fs/file_table.c:217)
      ____fput (fs/file_table.c:253)
      task_work_run (kernel/task_work.c:125 (discriminator 1))
      do_notify_resume (include/linux/tracehook.h:196 arch/x86/kernel/signal.c:751)
      int_signal (arch/x86/kernel/entry_64.S:807)

Sysfs has a release mechanism.  Use that to release the kmem_cache
structure if CONFIG_SYSFS is enabled.

Only slub is changed - slab currently only supports /proc/slabinfo and
not /sys/kernel/slab/*.  We talked about adding that and someone was
working on it.

[akpm@linux-foundation.org: fix CONFIG_SYSFS=n build]
[akpm@linux-foundation.org: fix CONFIG_SYSFS=n build even more]
Signed-off-by: Christoph Lameter <cl@linux.com>
Reported-by: Sasha Levin <sasha.levin@oracle.com>
Tested-by: Sasha Levin <sasha.levin@oracle.com>
Acked-by: Greg KH <greg@kroah.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Pekka Enberg <penberg@kernel.org>
Cc: Russell King <rmk@arm.linux.org.uk>
Cc: Bart Van Assche <bvanassche@acm.org>
Cc: Al Viro <viro@ZenIV.linux.org.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2014-05-06 13:04:59 -07:00
..
2014-04-05 15:46:37 -07:00
2013-08-14 13:55:15 +05:30
2014-03-28 20:42:01 +01:00
2014-02-15 10:58:17 +00:00
2014-03-28 16:29:35 -04:00
2014-04-09 08:39:39 -07:00
2014-04-18 16:40:08 -07:00
2013-12-23 18:34:58 -08:00
2013-09-10 13:03:41 -07:00
2014-01-24 22:39:54 +01:00
2014-04-01 15:14:04 -07:00
2013-07-30 11:53:12 -04:00
2013-11-15 09:32:21 +09:00
2013-11-09 00:16:29 -05:00
2014-03-11 11:52:47 +01:00
2014-04-03 16:20:58 -07:00
2014-04-01 17:08:43 +02:00
2014-02-13 10:08:52 +05:30
2014-01-16 10:23:02 +10:30
2014-04-01 23:19:14 -04:00
2014-03-10 11:44:42 -04:00
2013-08-22 22:13:54 -07:00
2014-03-10 17:26:19 -07:00
2014-02-20 14:54:28 +01:00
2014-03-04 07:55:47 -08:00
2014-01-16 11:15:50 +01:00
2014-04-07 16:36:07 -07:00
2013-12-29 16:34:25 -05:00
2014-03-07 11:41:32 -05:00
2014-04-17 12:30:40 -07:00
2013-09-13 15:09:52 +02:00
2014-03-13 12:11:00 +10:30
2013-08-09 10:49:00 +02:00
2013-07-26 16:19:48 -07:00
2014-01-25 08:55:09 +01:00
2014-04-03 16:20:50 -07:00
2013-08-28 21:35:14 -07:00
2014-02-13 20:21:59 -08:00
2013-12-11 15:52:34 +01:00
2014-02-28 15:36:37 -08:00
2013-12-26 13:29:35 -05:00
2014-04-01 23:19:08 -04:00
2014-03-04 13:51:06 -05:00
2014-01-27 21:02:39 -08:00
2013-11-09 00:16:19 -05:00
2014-04-01 23:19:10 -04:00
2013-10-14 17:15:48 +02:00
2013-12-05 13:05:48 -08:00
2014-03-17 15:14:16 -04:00
2014-03-17 15:15:21 -04:00
2014-01-25 03:14:05 -05:00
2014-04-07 10:59:19 -07:00
2014-01-13 14:29:49 -08:00
2014-04-03 16:21:04 -07:00
2014-04-01 18:49:04 -07:00
2014-03-19 15:11:19 -06:00
2013-10-17 00:36:06 +02:00
2014-03-19 22:24:08 -04:00
2014-02-17 15:01:52 -08:00
2014-04-01 16:13:21 -07:00
2014-03-09 19:53:45 +01:00
2014-01-28 13:20:09 -08:00
2014-04-01 17:08:43 +02:00
2013-12-19 19:09:38 -05:00
2014-01-27 21:02:39 -08:00
2013-09-10 18:56:32 -04:00
2014-02-15 11:55:28 -08:00
2014-02-17 15:01:37 -08:00
2014-04-01 17:06:09 -07:00
2014-04-07 16:35:53 -07:00
2013-10-17 15:53:09 -04:00
2014-01-30 16:56:55 -08:00