diff options
| author | Johan Hovold <johan@kernel.org> | 2018-06-12 14:43:35 +0200 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2018-10-10 08:52:06 +0200 |
| commit | 55e16f49e210a6bad5f856a1ecfa954d7a0dbae7 (patch) | |
| tree | e5b335c2b9236eb1deea045575a99c6b22fee61b /kernel/module.c | |
| parent | 7e1b660dc70e486fcf104c40cde784084a6e9b6b (diff) | |
EDAC, i7core: Fix memleaks and use-after-free on probe and remove
[ Upstream commit 6c974d4dfafe5e9ee754f2a6fba0eb1864f1649e ]
Make sure to free and deregister the addrmatch and chancounts devices
allocated during probe in all error paths. Also fix use-after-free in a
probe error path and in the remove success path where the devices were
being put before before deregistration.
Signed-off-by: Johan Hovold <johan@kernel.org>
Cc: Mauro Carvalho Chehab <mchehab@kernel.org>
Cc: linux-edac <linux-edac@vger.kernel.org>
Fixes: 356f0a30860d ("i7core_edac: change the mem allocation scheme to make Documentation/kobject.txt happy")
Link: http://lkml.kernel.org/r/20180612124335.6420-2-johan@kernel.org
Signed-off-by: Borislav Petkov <bp@suse.de>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'kernel/module.c')
0 files changed, 0 insertions, 0 deletions
