mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
synced 2024-12-29 17:22:07 +00:00
for-5.9-rc6-tag
-----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEE8rQSAMVO+zA4DBdWxWXV+ddtWDsFAl9q8PUACgkQxWXV+ddt WDsHZg//YF3Rfeo7/zaRsfUPvNoKDcM69TW+HROJXu4+rYlOukyuh5T+wboRU1Ft 7ymiR18idPYbtOczmH1Pqw+3wyOr39WafcvAnndoUguXJHsUrriBNqkthQICt0CG hUUiofedaB+j+ti7AYGhF/tkqjd8LkCj8SGEz4cSUFCheIHR+ajFwFmx1Sw6NGJV h9SdKfbBpIqIpoExFhprNFlxdaKN9rlhYY+zXZYeCBdU6r89CkuLqxZ79GzaU0N7 PG7FxuuJXvyHhta2a6p8hnEp7perOG22OTXJhzXd5JXiNCfZ/w4SfhH/aPO/3t5V x42hO+FvloVSLS3woZqkBsCgCIe0a3QOT0YxZiM+1cwSgg8mVw4UBEB3PIgkfOVT LawMbcgSh1evsSazru8gujm4f8RVxpSxxWfhhRwjXtyB8K89e22yBa9Lwfj04SH7 O5O7VrLDDnHsQWinsEf4Rl6byA13jUCgI5eUxZ5B7Au0Pm9uMexDh3lvgE0W0ucY UvD8qAetu2NNZD68gZp597uHPrwu+Lr+VumIh4wF6doeShlIkbf/d+ntOgW9ey1S WFSh7sUdKg5pVf6KJQ4yc3aBA6un5lv9LnvPJOwc9HyMUj/cYuxywxWf1YMr5umv 7/6CkufYjTAmEERQeqE1I6UIgUiWkS9nIisB8BLbYkrMR9Wi1bs= =tFUE -----END PGP SIGNATURE----- Merge tag 'for-5.9-rc6-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux Pull btrfs fixes from David Sterba: "syzkaller started to hit us with reports, here's a fix for one type (stack overflow when printing checksums on read error). The other patch is a fix for sysfs object, we have a test for that and it leads to a crash." * tag 'for-5.9-rc6-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux: btrfs: fix put of uninitialized kobject after seed device delete btrfs: fix overflow when copying corrupt csums for a message
This commit is contained in:
commit
bffac4b543
@ -636,16 +636,15 @@ static int btree_readpage_end_io_hook(struct btrfs_io_bio *io_bio,
|
||||
csum_tree_block(eb, result);
|
||||
|
||||
if (memcmp_extent_buffer(eb, result, 0, csum_size)) {
|
||||
u32 val;
|
||||
u32 found = 0;
|
||||
|
||||
memcpy(&found, result, csum_size);
|
||||
u8 val[BTRFS_CSUM_SIZE] = { 0 };
|
||||
|
||||
read_extent_buffer(eb, &val, 0, csum_size);
|
||||
btrfs_warn_rl(fs_info,
|
||||
"%s checksum verify failed on %llu wanted %x found %x level %d",
|
||||
"%s checksum verify failed on %llu wanted " CSUM_FMT " found " CSUM_FMT " level %d",
|
||||
fs_info->sb->s_id, eb->start,
|
||||
val, found, btrfs_header_level(eb));
|
||||
CSUM_FMT_VALUE(csum_size, val),
|
||||
CSUM_FMT_VALUE(csum_size, result),
|
||||
btrfs_header_level(eb));
|
||||
ret = -EUCLEAN;
|
||||
goto err;
|
||||
}
|
||||
|
@ -1170,10 +1170,12 @@ int btrfs_sysfs_remove_devices_dir(struct btrfs_fs_devices *fs_devices,
|
||||
disk_kobj->name);
|
||||
}
|
||||
|
||||
kobject_del(&one_device->devid_kobj);
|
||||
kobject_put(&one_device->devid_kobj);
|
||||
if (one_device->devid_kobj.state_initialized) {
|
||||
kobject_del(&one_device->devid_kobj);
|
||||
kobject_put(&one_device->devid_kobj);
|
||||
|
||||
wait_for_completion(&one_device->kobj_unregister);
|
||||
wait_for_completion(&one_device->kobj_unregister);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
@ -1186,10 +1188,12 @@ int btrfs_sysfs_remove_devices_dir(struct btrfs_fs_devices *fs_devices,
|
||||
sysfs_remove_link(fs_devices->devices_kobj,
|
||||
disk_kobj->name);
|
||||
}
|
||||
kobject_del(&one_device->devid_kobj);
|
||||
kobject_put(&one_device->devid_kobj);
|
||||
if (one_device->devid_kobj.state_initialized) {
|
||||
kobject_del(&one_device->devid_kobj);
|
||||
kobject_put(&one_device->devid_kobj);
|
||||
|
||||
wait_for_completion(&one_device->kobj_unregister);
|
||||
wait_for_completion(&one_device->kobj_unregister);
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
Loading…
Reference in New Issue
Block a user