From 37171e3cb7a2f6fc594b524c940beb1ce85cc935 Mon Sep 17 00:00:00 2001 From: Seth Jennings Date: Tue, 20 Aug 2013 12:13:02 -0500 Subject: [PATCH] drivers: base: remove improper get/put in add_memory_section() The path through add_memory_section() when the memory block already exists uses flawed refcounting logic. A get_device() is done on a memory block using a pointer that might not be valid as we dropped our previous reference and didn't obtain a new reference in the proper way. Lets stop pretending and just remove the get/put. The mem_sysfs_mutex, which we hold over the entire init loop now, will prevent the memory blocks from disappearing from under us. Signed-off-by: Seth Jennings Signed-off-by: Greg Kroah-Hartman --- Reading git-format-patch failed