Borislav Petkov 88d84ac973 EDAC: Fix lockdep splat
Fix the following:

BUG: key ffff88043bdd0330 not in .data!
------------[ cut here ]------------
WARNING: at kernel/lockdep.c:2987 lockdep_init_map+0x565/0x5a0()
DEBUG_LOCKS_WARN_ON(1)
Modules linked in: glue_helper sb_edac(+) edac_core snd acpi_cpufreq lrw gf128mul ablk_helper iTCO_wdt evdev i2c_i801 dcdbas button cryptd pcspkr iTCO_vendor_support usb_common lpc_ich mfd_core soundcore mperf processor microcode
CPU: 2 PID: 599 Comm: modprobe Not tainted 3.10.0 #1
Hardware name: Dell Inc. Precision T3600/0PTTT9, BIOS A08 01/24/2013
 0000000000000009 ffff880439a1d920 ffffffff8160a9a9 ffff880439a1d958
 ffffffff8103d9e0 ffff88043af4a510 ffffffff81a16e11 0000000000000000
 ffff88043bdd0330 0000000000000000 ffff880439a1d9b8 ffffffff8103dacc
Call Trace:
  dump_stack
  warn_slowpath_common
  warn_slowpath_fmt
  lockdep_init_map
  ? trace_hardirqs_on_caller
  ? trace_hardirqs_on
  debug_mutex_init
  __mutex_init
  bus_register
  edac_create_sysfs_mci_device
  edac_mc_add_mc
  sbridge_probe
  pci_device_probe
  driver_probe_device
  __driver_attach
  ? driver_probe_device
  bus_for_each_dev
  driver_attach
  bus_add_driver
  driver_register
  __pci_register_driver
  ? 0xffffffffa0010fff
  sbridge_init
  ? 0xffffffffa0010fff
  do_one_initcall
  load_module
  ? unset_module_init_ro_nx
  SyS_init_module
  tracesys
---[ end trace d24a70b0d3ddf733 ]---
EDAC MC0: Giving out device to 'sbridge_edac.c' 'Sandy Bridge Socket#0': DEV 0000:3f:0e.0
EDAC sbridge: Driver loaded.

What happens is that bus_register needs a statically allocated lock_key
because the last is handed in to lockdep. However, struct mem_ctl_info
embeds struct bus_type (the whole struct, not a pointer to it) and the
whole thing gets dynamically allocated.

Fix this by using a statically allocated struct bus_type for the MC bus.

Signed-off-by: Borislav Petkov <bp@suse.de>
Acked-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Cc: Markus Trippelsdorf <markus@trippelsdorf.de>
Cc: stable@kernel.org # v3.10
Signed-off-by: Tony Luck <tony.luck@intel.com>
2013-07-23 16:01:28 -07:00
..
2013-06-27 13:42:16 -04:00
2013-03-01 13:39:00 -08:00
2013-07-10 11:16:00 -07:00
2013-01-02 17:36:10 -08:00
2013-06-17 14:38:54 -04:00
2013-07-02 13:43:38 -07:00
2013-07-03 16:31:35 -07:00
2013-05-07 19:46:02 -07:00
2013-05-29 15:50:34 -04:00
2012-12-02 00:05:12 +00:00
2013-04-29 15:40:23 -04:00
2013-07-03 16:07:39 -07:00
2013-03-23 16:11:31 -07:00
2013-03-22 15:18:18 -07:00
2013-03-12 11:30:04 -07:00
2013-07-05 18:59:33 +04:00
2013-07-10 23:41:18 +01:00
2013-05-01 16:36:22 +05:30
2013-03-28 10:10:25 -06:00
2013-07-23 16:01:28 -07:00
2013-02-26 02:46:08 -05:00
2013-05-07 18:38:27 -07:00
2013-03-15 15:09:43 +10:30
2013-04-29 18:28:40 -07:00
2013-06-17 16:38:57 -07:00
2013-06-19 23:32:07 -04:00
2013-06-10 13:45:49 -07:00
2013-05-06 13:07:33 +02:00
2013-07-03 16:07:32 -07:00
2013-01-25 21:03:54 -08:00
2013-06-13 17:51:04 -07:00
2013-06-17 16:38:57 -07:00
2013-04-30 17:04:06 -07:00
2013-07-03 13:21:40 -07:00
2013-04-01 11:04:50 -07:00
2013-07-09 10:33:30 -07:00
2013-05-31 00:48:22 -07:00
2013-07-10 18:11:34 -07:00
2013-03-15 15:09:43 +10:30
2013-07-02 15:38:19 +09:30
2012-12-25 18:45:06 -05:00
2013-07-03 16:08:05 -07:00
2013-06-08 16:20:14 -04:00
2012-12-11 17:22:27 -08:00
2013-05-04 14:47:26 -04:00
2013-06-12 12:37:40 +01:00
2013-06-12 12:37:30 +01:00
2013-05-07 11:22:14 -07:00
2013-04-29 15:54:28 -07:00
2013-06-26 15:55:52 -06:00
2013-06-26 21:10:05 +02:00
2013-05-31 17:19:05 -07:00
2013-03-19 09:47:30 +01:00
2013-06-21 11:32:51 +02:00
2013-04-29 15:54:28 -07:00
2013-04-12 10:26:23 +02:00
2013-07-03 16:08:05 -07:00
2013-07-10 18:11:34 -07:00
2013-06-17 16:38:57 -07:00
2013-07-09 12:09:43 -07:00
2013-02-19 08:43:34 +01:00
2013-06-17 18:09:53 +09:00
2013-03-29 15:31:30 -04:00
2013-07-05 11:41:00 +05:30
2013-06-20 13:08:01 -07:00
2013-04-30 15:50:12 +05:30
2013-05-21 12:25:02 -05:00
2013-01-15 22:43:15 -08:00
2013-03-20 12:10:38 -04:00
2013-04-29 15:54:37 -07:00
2013-05-27 10:57:53 +09:00
2013-07-02 09:52:47 -07:00
2013-07-10 18:11:34 -07:00