Skip to contentSkip to conversation

set block device for dummy log . In this fix try to avoid null in the call bio_set_dev(bio, bdev) because in case bdev is null we have NULL pointer dereference ticket reference https://bugzilla.kernel.org/show_bug.cgi?id=203737

PATCH New Kovtunenko Oleksandr 1 participant 1 message Jun 17, 2019 JFS filesystem

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 set block device for dummy log . In this fix try to avoid null in the call bio_set_dev(bio, bdev) because in case bdev is null we have NULL pointer dereference ticket reference https://bugzilla.kernel.org/show_bug.cgi?id=203737

---
 fs/jfs/jfs_logmgr.c | 1 +
 1 file changed, 1 insertion(+)
fs/jfs/jfs_logmgr.c +1 -0
index 6b68df3..3cd7026 100644
@@ -1223,6 +1223,7 @@ static int open_dummy_log(struct super_block *sb)
 		/* Make up some stuff */
 		dummy_log->base = 0;
 		dummy_log->size = 1024;
+         	dummy_log->bdev = sb->s_bdev;
 		rc = lmLogInit(dummy_log);
 		if (rc) {
 			kfree(dummy_log);
Signature · 1 line
1.8.3.1