• Alexander Sverdlin's avatar
    crypto: qat - Silence smp_processor_id() warning · 1b82feb6
    Alexander Sverdlin authored
    It seems that smp_processor_id() is only used for a best-effort
    load-balancing, refer to qat_crypto_get_instance_node(). It's not feasible
    to disable preemption for the duration of the crypto requests. Therefore,
    just silence the warning. This commit is similar to e7a9b05c
    ("crypto: cavium - Fix smp_processor_id() warnings").
    
    Silences the following splat:
    BUG: using smp_processor_id() in preemptible [00000000] code: cryptomgr_test/2904
    caller is qat_alg_ablkcipher_setkey+0x300/0x4a0 [intel_qat]
    CPU: 1 PID: 2904 Comm: cryptomgr_test Tainted: P           O    4.14.69 #1
    ...
    Call Trace:
     dump_stack+0x5f/0x86
     check_preemption_disabled+0xd3/0xe0
     qat_alg_ablkcipher_setkey+0x300/0x4a0 [intel_qat]
     skcipher_setkey_ablkcipher+0x2b/0x40
     __test_skcipher+0x1f3/0xb20
     ? cpumask_next_and+0x26/0x40
     ? find_busiest_group+0x10e/0x9d0
     ? preempt_count_add+0x49/0xa0
     ? try_module_get+0x61/0xf0
     ? crypto_mod_get+0x15/0x30
     ? __kmalloc+0x1df/0x1f0
     ? __crypto_alloc_tfm+0x...
    1b82feb6
adf_common_drv.h 11.1 KB