s390/dasd: module warning and error check fix
Subsystems (3)
Stefan Haberland
maintainercover s390/dasd: module warning and error check fix
Hi Jens,
please apply the following two patches for the merge window. They fix module description warnings and an error check in a dasd function.
Carlos López (1):
s390/dasd: fix error checks in dasd_copy_pair_store()
Jeff Johnson (1):
s390/dasd: add missing MODULE_DESCRIPTION() macros
drivers/s390/block/dasd_devmap.c | 10 ++++++++-- drivers/s390/block/dasd_diag.c | 1 + drivers/s390/block/dasd_eckd.c | 1 + drivers/s390/block/dasd_fba.c | 1 + 4 files changed, 11 insertions(+), 2 deletions(-)
Signature · 1 line
2.40.1
Stefan Haberland
maintainerPATCH 1/2 s390/dasd: add missing MODULE_DESCRIPTION() macros
From: Jeff Johnson <[email protected]>
With ARCH=s390, make allmodconfig && make W=1 C=1 reports:
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/s390/block/dasd_diag_mod.o
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/s390/block/dasd_eckd_mod.o
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/s390/block/dasd_fba_mod.o
Add the missing invocations of the MODULE_DESCRIPTION() macro.
--- drivers/s390/block/dasd_diag.c | 1 + drivers/s390/block/dasd_eckd.c | 1 + drivers/s390/block/dasd_fba.c | 1 + 3 files changed, 3 insertions(+)
drivers/s390/block/dasd_diag.c +1 -0
@@ -29,6 +29,7 @@#include "dasd_int.h" #include "dasd_diag.h" +MODULE_DESCRIPTION ("S/390 Support for DIAG access to DASD Disks" );MODULE_LICENSE ("GPL" );/* The maximum number of blocks per request (max_blocks) is dependent on the
drivers/s390/block/dasd_eckd.c +1 -0
@@ -44,6 +44,7 @@/* 64k are 128 x 512 byte sectors */ #define DASD_RAW_SECTORS_PER_TRACK 128 +MODULE_DESCRIPTION ("S/390 DASD ECKD Disks device driver" );MODULE_LICENSE ("GPL" );static struct dasd_discipline dasd_eckd_discipline;
drivers/s390/block/dasd_fba.c +1 -0
@@ -32,6 +32,7 @@#define DASD_FBA_CCW_LOCATE 0x43#define DASD_FBA_CCW_DEFINE_EXTENT 0x63 +MODULE_DESCRIPTION ("S/390 DASD FBA Disks device driver" );MODULE_LICENSE ("GPL" );static struct dasd_discipline dasd_fba_discipline;
Signature · 1 line
2.40.1
Stefan Haberland
maintainerPATCH 2/2 s390/dasd: fix error checks in dasd_copy_pair_store()
In reply to Stefan HaberlandFrom: Carlos López <[email protected]>
dasd_add_busid() can return an error via ERR_PTR() if an allocation fails. However, two callsites in dasd_copy_pair_store() do not check the result, potentially resulting in a NULL pointer dereference. Fix this by checking the result with IS_ERR() and returning the error up the stack.
--- drivers/s390/block/dasd_devmap.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-)
drivers/s390/block/dasd_devmap.c +8 -2
@@ -2248,13 +2248,19 @@ static ssize_t dasd_copy_pair_store(struct device *dev,/* allocate primary devmap if needed */ prim_devmap =dasd_find_busid (prim_busid); -if (IS_ERR (prim_devmap)) +if (IS_ERR (prim_devmap)) { prim_devmap =dasd_add_busid (prim_busid,DASD_FEATURE_DEFAULT ); +if (IS_ERR (prim_devmap)) +return PTR_ERR (prim_devmap); + }/* allocate secondary devmap if needed */ sec_devmap =dasd_find_busid (sec_busid); -if (IS_ERR (sec_devmap)) +if (IS_ERR (sec_devmap)) { sec_devmap =dasd_add_busid (sec_busid,DASD_FEATURE_DEFAULT ); +if (IS_ERR (sec_devmap)) +return PTR_ERR (sec_devmap); + }/* setting copy relation is only allowed for offline secondary */ if (sec_devmap->device)
Signature · 1 line
2.40.1
Quoted 10 lines · Stefan Haberland
please apply the following two patches for the merge window. They fix module description warnings and an error check in a dasd function.
Carlos López (1):
s390/dasd: fix error checks indasd_copy_pair_store()Jeff Johnson (1):
s390/dasd: add missingMODULE_DESCRIPTION()macros[...]
Applied, thanks!
[1/2] s390/dasd: add missing MODULE_DESCRIPTION() macros
commit: 1f5a33315362cb8ade2b15489c985ada0cc8623b
[2/2] s390/dasd: fix error checks in dasd_copy_pair_store()
commit: 8e64d2356cbc800b4cd0e3e614797f76bcf0cdb8Best regards,
Signature · 1 line
Jens Axboe