Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit583090b

Browse files
committed
Merge tag 'block5.9-2020-10-08' of git://git.kernel.dk/linux-block
Pull block fixes from Jens Axboe: "A few fixes that should go into this release: - NVMe controller error path reference fix (Chaitanya) - Fix regression with IBM partitions on non-dasd devices (Christoph) - Fix a missing clear in the compat CDROM packet structure (Peilin)"* tag 'block5.9-2020-10-08' of git://git.kernel.dk/linux-block: partitions/ibm: fix non-DASD devices nvme-core: put ctrl ref when module ref get fail block/scsi-ioctl: Fix kernel-infoleak in scsi_put_cdrom_generic_arg()
2 parents3fdd47c +e0894cd commit583090b

File tree

3 files changed

+7
-5
lines changed

3 files changed

+7
-5
lines changed

‎block/partitions/ibm.c‎

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -305,8 +305,6 @@ int ibm_partition(struct parsed_partitions *state)
305305
if (!disk->fops->getgeo)
306306
gotoout_exit;
307307
fn=symbol_get(dasd_biodasdinfo);
308-
if (!fn)
309-
gotoout_exit;
310308
blocksize=bdev_logical_block_size(bdev);
311309
if (blocksize <=0)
312310
gotoout_symbol;
@@ -326,7 +324,7 @@ int ibm_partition(struct parsed_partitions *state)
326324
geo->start=get_start_sect(bdev);
327325
if (disk->fops->getgeo(bdev,geo))
328326
gotoout_freeall;
329-
if (fn(disk,info)) {
327+
if (!fn||fn(disk,info)) {
330328
kfree(info);
331329
info=NULL;
332330
}
@@ -370,7 +368,8 @@ int ibm_partition(struct parsed_partitions *state)
370368
out_nogeo:
371369
kfree(info);
372370
out_symbol:
373-
symbol_put(dasd_biodasdinfo);
371+
if (fn)
372+
symbol_put(dasd_biodasdinfo);
374373
out_exit:
375374
returnres;
376375
}

‎block/scsi_ioctl.c‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -651,6 +651,7 @@ struct compat_cdrom_generic_command {
651651
compat_int_tstat;
652652
compat_caddr_tsense;
653653
unsignedchardata_direction;
654+
unsignedcharpad[3];
654655
compat_int_tquiet;
655656
compat_int_ttimeout;
656657
compat_caddr_treserved[1];

‎drivers/nvme/host/core.c‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3265,8 +3265,10 @@ static int nvme_dev_open(struct inode *inode, struct file *file)
32653265
}
32663266

32673267
nvme_get_ctrl(ctrl);
3268-
if (!try_module_get(ctrl->ops->module))
3268+
if (!try_module_get(ctrl->ops->module)) {
3269+
nvme_put_ctrl(ctrl);
32693270
return-EINVAL;
3271+
}
32703272

32713273
file->private_data=ctrl;
32723274
return0;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp