Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'block-5.10-2020-11-27' of git://git.kernel.dk/linux-block

Pull block fix from Jens Axboe:
"Just a single fix, for a crash in the keyslot manager"

* tag 'block-5.10-2020-11-27' of git://git.kernel.dk/linux-block:
block/keyslot-manager: prevent crash when num_slots=1

+7
+7
block/keyslot-manager.c
··· 103 103 spin_lock_init(&ksm->idle_slots_lock); 104 104 105 105 slot_hashtable_size = roundup_pow_of_two(num_slots); 106 + /* 107 + * hash_ptr() assumes bits != 0, so ensure the hash table has at least 2 108 + * buckets. This only makes a difference when there is only 1 keyslot. 109 + */ 110 + if (slot_hashtable_size < 2) 111 + slot_hashtable_size = 2; 112 + 106 113 ksm->log_slot_ht_size = ilog2(slot_hashtable_size); 107 114 ksm->slot_hashtable = kvmalloc_array(slot_hashtable_size, 108 115 sizeof(ksm->slot_hashtable[0]),