]> granicus.if.org Git - zfs/commit
Add kpreempt_disable/enable around CPU_SEQID uses
authorMorgan Jones <mjones@rice.edu>
Mon, 19 Jun 2017 16:43:16 +0000 (16:43 +0000)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Mon, 19 Jun 2017 16:43:16 +0000 (09:43 -0700)
commitd9ad3fea3bd0368b6af0b08ccc4de1b080e2bcb7
tree8275909a37a01b0fa87f5ad906fb9950bc14fc3d
parent0241e491a08ffa471a08ceaa0b0943999d775cbe
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
module/icp/core/kcf_sched.c
module/zfs/dmu_object.c