Skip to content
Merged
Changes from 1 commit
Commits
Show all changes
55 commits
Select commit Hold shift + click to select a range
fdb8a1a
s390/pci: Fix stale function handles in error handling
PlaidCat Sep 4, 2025
adfc73e
s390/pci: Do not try re-enabling load/store if device is disabled
PlaidCat Sep 4, 2025
1123e46
drm/vkms: Fix use after free and double free on init error
PlaidCat Sep 4, 2025
6bc15ba
sch_ets: make est_qlen_notify() idempotent
PlaidCat Sep 4, 2025
93fe6a9
net_sched: ets: Fix double list add in class with netem as child qdisc
PlaidCat Sep 4, 2025
0e948c6
Bluetooth: hci_core: Fix use-after-free in vhci_flush()
PlaidCat Sep 4, 2025
8a6878f
i2c/designware: Fix an initialization issue
PlaidCat Sep 4, 2025
69d7f21
gfs2: Fix withdraw race
PlaidCat Sep 4, 2025
8c522e0
gfs2: Get rid of gfs2_glock_queue_put in signal_our_withdraw
PlaidCat Sep 4, 2025
f1f22be
gfs2: No more self recovery
PlaidCat Sep 4, 2025
5bbea70
writeback: fix false warning in inode_to_wb()
PlaidCat Sep 4, 2025
fc3a49f
gfs2: replace sd_aspace with sd_inode
PlaidCat Sep 4, 2025
0d2c5dd
gfs2: Remove unnecessary NULL check before free_percpu()
PlaidCat Sep 4, 2025
8246668
gfs2: Don't clear sb->s_fs_info in gfs2_sys_fs_add
PlaidCat Sep 4, 2025
fd87dfe
i40e: fix MMIO write access to an invalid page in i40e_clear_hw
PlaidCat Sep 4, 2025
d01f8a8
udp: Fix memory accounting leak.
PlaidCat Sep 4, 2025
f1128d1
blk-mq: fix tag_get wait task can't be awakened
PlaidCat Sep 4, 2025
c6b6838
blk-mq: Fix wrong wakeup batch configuration which will cause hang
PlaidCat Sep 4, 2025
907b4b8
sbitmap: Use single per-bitmap counting to wake up queued tags
PlaidCat Sep 4, 2025
3d0fe8c
sbitmap: Advance the queue index before waking up a queue
PlaidCat Sep 4, 2025
59a62f0
sched/wait: Deduplicate code with do-while
PlaidCat Sep 4, 2025
622a985
wait: Return number of exclusive waiters awaken
PlaidCat Sep 4, 2025
236f97d
sbitmap: Try each queue to wake up at least one waiter
PlaidCat Sep 4, 2025
2cec149
sbitmap: add __sbitmap_queue_get_batch()
PlaidCat Sep 4, 2025
279a256
lib/sbitmap: kill 'depth' from sbitmap_word
PlaidCat Sep 4, 2025
a42ee5e
lib/sbitmap: Fix invalid loop in __sbitmap_queue_get_batch()
PlaidCat Sep 4, 2025
2b02c21
sbitmap: remove unnecessary code in __sbitmap_queue_get_batch
PlaidCat Sep 4, 2025
3265cdc
sbitmap: Use atomic_long_try_cmpxchg in __sbitmap_queue_get_batch
PlaidCat Sep 4, 2025
6a76dfd
sbitmap: remove unnecessary calculation of alloc_hint in __sbitmap_ge…
PlaidCat Sep 4, 2025
f3b461b
sbitmap: remove redundant check in __sbitmap_queue_get_batch
PlaidCat Sep 4, 2025
cadcdd7
sbitmap: rewrite sbitmap_find_bit_in_index to reduce repeat code
PlaidCat Sep 4, 2025
846661b
sbitmap: add sbitmap_find_bit to remove repeat code in __sbitmap_get/…
PlaidCat Sep 4, 2025
d7c83dc
sbitmap: correct wake_batch recalculation to avoid potential IO hung
PlaidCat Sep 4, 2025
816620b
sbitmap: fix batching wakeup
PlaidCat Sep 4, 2025
5a7fde5
sbitmap: use READ_ONCE to access map->word
PlaidCat Sep 4, 2025
8eea495
sbitmap: fix io hung due to race on sbitmap_word::cleared
PlaidCat Sep 4, 2025
02f3fa1
lib/sbitmap: define swap_lock as raw_spinlock_t
PlaidCat Sep 4, 2025
91713fb
blk-mq: fix potential io hang by wrong 'wake_batch'
PlaidCat Sep 4, 2025
916bcc5
block: Fix lockdep warning in blk_mq_mark_tag_wait
PlaidCat Sep 4, 2025
d927f7c
sbitmap: remove stale comment in sbq_calc_wake_batch
PlaidCat Sep 4, 2025
b0715e0
tipc: Fix use-after-free in tipc_conn_close().
PlaidCat Sep 4, 2025
0479072
efi/x86: Support builtin command line
PlaidCat Sep 4, 2025
8493040
efi/libstub: Check return value of efi_parse_options
PlaidCat Sep 4, 2025
aaf3e1d
x86/efistub: Omit physical KASLR when memory reservations exist
PlaidCat Sep 4, 2025
0fda28f
filemap: remove use of wait bookmarks
PlaidCat Sep 4, 2025
838fdc2
net/sched: Abort __tc_modify_qdisc if parent class does not exist
PlaidCat Sep 4, 2025
e5be373
cxgb4: use port number to set mac addr
PlaidCat Sep 4, 2025
74693e7
net/sched: sch_qfq: Fix race condition on qfq_aggregate
PlaidCat Sep 4, 2025
50034aa
net/sched: sch_qfq: Avoid triggering might_sleep in atomic context in…
PlaidCat Sep 4, 2025
13fa887
RDMA/iwcm: Fix a use-after-free related to destroying CM IDs
PlaidCat Sep 4, 2025
bd8aeab
RDMA/iwcm: Fix WARNING:at_kernel/workqueue.c:#check_flush_dependency
PlaidCat Sep 4, 2025
445bada
RDMA/iwcm: Fix use-after-free of work objects after cm_id destruction
PlaidCat Sep 4, 2025
c51bac8
watchdog/perf: properly initialize the turbo mode timestamp and rearm…
PlaidCat Sep 4, 2025
6653155
scsi: lpfc: Use memcpy() for BIOS version
PlaidCat Sep 4, 2025
06a1b8b
Rebuild rocky8_10 with kernel-4.18.0-553.72.1.el8_10
PlaidCat Sep 4, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
sbitmap: remove redundant check in __sbitmap_queue_get_batch
jira LE-4066
Rebuild_History Non-Buildable kernel-4.18.0-553.72.1.el8_10
commit-author Kemeng Shi <shikemeng@huaweicloud.com>
commit 903e86f

Commit fbb564a ("lib/sbitmap: Fix invalid loop in
__sbitmap_queue_get_batch()") mentioned that "Checking free bits when
setting the target bits. Otherwise, it may reuse the busying bits."
This commit add check to make sure all masked bits in word before
cmpxchg is zero. Then the existing check after cmpxchg to check any
zero bit is existing in masked bits in word is redundant.

Actually, old value of word before cmpxchg is stored in val and we
will filter out busy bits in val by "(get_mask & ~val)" after cmpxchg.
So we will not reuse busy bits methioned in commit fbb564a
("lib/sbitmap: Fix invalid loop in __sbitmap_queue_get_batch()"). Revert
new-added check to remove redundant check.

Fixes: fbb564a ("lib/sbitmap: Fix invalid loop in __sbitmap_queue_get_batch()")
	Reviewed-by: Jan Kara <jack@suse.cz>
	Signed-off-by: Kemeng Shi <shikemeng@huaweicloud.com>
Link: https://lore.kernel.org/r/20230116205059.3821738-3-shikemeng@huaweicloud.com
	Signed-off-by: Jens Axboe <axboe@kernel.dk>
(cherry picked from commit 903e86f)
	Signed-off-by: Jonathan Maple <jmaple@ciq.com>
  • Loading branch information
PlaidCat committed Sep 4, 2025
commit f3b461bb3232168bdcd7d227cad6dd61da2d6340
8 changes: 3 additions & 5 deletions lib/sbitmap.c
Original file line number Diff line number Diff line change
Expand Up @@ -533,11 +533,9 @@ unsigned long __sbitmap_queue_get_batch(struct sbitmap_queue *sbq, int nr_tags,

get_mask = ((1UL << nr_tags) - 1) << nr;
val = READ_ONCE(map->word);
do {
if ((val & ~get_mask) != val)
goto next;
} while (!atomic_long_try_cmpxchg(ptr, &val,
get_mask | val));
while (!atomic_long_try_cmpxchg(ptr, &val,
get_mask | val))
;
get_mask = (get_mask & ~val) >> nr;
if (get_mask) {
*offset = nr + (index << sb->shift);
Expand Down