]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
iommu/fsl: Really fix init section(s) content
authorEmil Medve <Emilian.Medve@Freescale.com>
Wed, 25 Mar 2015 05:28:48 +0000 (00:28 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 29 Sep 2015 17:33:33 +0000 (19:33 +0200)
commit7d6d38aa0805e9d7a218d4b4e7905fd1ed312b4c
treefc3c13a027158c02eeb8e954dbe23a01d6ce4995
parent0332dbad7d4119e1dd9e7a15a4211b2adbf25a4b
iommu/fsl: Really fix init section(s) content

commit 57fb907da89977640ef183556a621336c1348fa0 upstream.

'0f1fb99 iommu/fsl: Fix section mismatch' was intended to address the modpost
warning and the potential crash. Crash which is actually easy to trigger with a
'unbind' followed by a 'bind' sequence. The fix is wrong as
fsl_of_pamu_driver.driver gets added by bus_add_driver() to a couple of
klist(s) which become invalid/corrupted as soon as the init sections are freed.
Depending on when/how the init sections storage is reused various/random errors
and crashes will happen

'cd70d46 iommu/fsl: Various cleanups' contains annotations that go further down
the wrong path laid by '0f1fb99 iommu/fsl: Fix section mismatch'

Now remove all the incorrect annotations from the above mentioned patches (not
exactly a revert) and those previously existing in the code, This fixes the
modpost warning(s), the unbind/bind sequence crashes and the random
errors/crashes

Fixes: 0f1fb99b62ce ("iommu/fsl: Fix section mismatch")
Fixes: cd70d4659ff3 ("iommu/fsl: Various cleanups")
Signed-off-by: Emil Medve <Emilian.Medve@Freescale.com>
Acked-by: Varun Sethi <Varun.Sethi@freescale.com>
Tested-by: Madalin Bucur <Madalin.Bucur@freescale.com>
Signed-off-by: Joerg Roedel <jroedel@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/iommu/fsl_pamu.c