]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/commit
s390/qeth: fix discipline unload after setup error
authorJulian Wiedmann <jwi@linux.ibm.com>
Wed, 26 Sep 2018 16:29:04 +0000 (18:29 +0200)
committerDavid S. Miller <davem@davemloft.net>
Wed, 26 Sep 2018 16:56:07 +0000 (09:56 -0700)
commitc1a935f6ec5b146aef1de03d1ef135de34f90646
tree835004e0e6c7aeccbb453aa074dc4150efa92236
parenta70fee3b0f9007ee16bf0159018ee29684acfac0
s390/qeth: fix discipline unload after setup error

Device initialization code usually first loads a subdriver
(via qeth_core_load_discipline()), and then runs its setup() callback.
If this fails, it rolls back the load via qeth_core_free_discipline().

qeth_core_free_discipline() expects the options.layer attribute to be
initialized, but on error in setup() that's currently not the case.
Resulting in misbalanced symbol_put() calls.

Fix this by setting options.layer when loading the subdriver.

Signed-off-by: Julian Wiedmann <jwi@linux.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/s390/net/qeth_core_main.c
drivers/s390/net/qeth_core_sys.c
drivers/s390/net/qeth_l2_main.c
drivers/s390/net/qeth_l3_main.c