cpu: fix "crash_notes" and "crash_notes_size" leaks in register_cpu()
authorIgor Mammedov <imammedo@redhat.com>
Tue, 14 May 2013 14:46:06 +0000 (16:46 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 21 May 2013 17:14:40 +0000 (10:14 -0700)
commitc055da9fbad4b63bb3169f2b1a8b7ad429270bd0
tree5a861955edf614619a237e671a0d8a65c674612b
parenta4e2400a63f0e4fb6af5083a24d80b6fa4c41ccd
cpu: fix "crash_notes" and "crash_notes_size" leaks in register_cpu()

"crash_notes" and "crash_notes_size" are dynamically created
with device_create_file() but aren't deleted anywhere.
Define "crash_notes" and "crash_notes_size" statically via
attribute groups so that device_register would create them
automatically and files would be destroyed when CPU is destroyed.

Signed-off-by: Igor Mammedov <imammedo@redhat.com>
Tested-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Reviewed-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/base/cpu.c