mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-22 02:27:36 +03:00
Add kpreempt_disable/enable around CPU_SEQID uses
In zfs/dmu_object and icp/core/kcf_sched, the CPU_SEQID macro should be surrounded by `kpreempt_disable` and `kpreempt_enable` calls to avoid a Linux kernel BUG warning. These code paths use the cpuid to minimize lock contention and is is safe to reschedule the process to a different processor at any time. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Morgan Jones <me@numin.it> Closes #6239
This commit is contained in:
committed by
Brian Behlendorf
parent
0241e491a0
commit
d9ad3fea3b
@@ -1306,8 +1306,11 @@ kcf_reqid_insert(kcf_areq_node_t *areq)
|
||||
int indx;
|
||||
crypto_req_id_t id;
|
||||
kcf_areq_node_t *headp;
|
||||
kcf_reqid_table_t *rt =
|
||||
kcf_reqid_table[CPU_SEQID & REQID_TABLE_MASK];
|
||||
kcf_reqid_table_t *rt;
|
||||
|
||||
kpreempt_disable();
|
||||
rt = kcf_reqid_table[CPU_SEQID & REQID_TABLE_MASK];
|
||||
kpreempt_enable();
|
||||
|
||||
mutex_enter(&rt->rt_lock);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user