XRT icon indicating copy to clipboard operation
XRT copied to clipboard

vmalloc called when in atomic

Open ghost opened this issue 3 years ago • 1 comments

Bug reported by slab/slub memory checks:

BUG: sleeping function called from invalid context in_atomic() : 1, irqs_disabled() : 0, non_block: 0, xxxxxxxx ... vmalloc+xxxx zocl_read_sect+xxxx zocl_xclbin_read_axlf+xxxx zocl_read_axlf_ioctl+xxxxx

In functionzocl_xclbin_read_axlf, a call to zocl_read_sect is protected by the spinlock zdev->attr_rwlock while this function calls the vmalloc primitive, which one may block. This could lead to dead lock.

The call to zocl_xclbin_read_axlf is already synchronized by a mutex, is this spinlock necessary ?

ghost avatar Feb 14 '22 14:02 ghost

I will take a look and come back. Thanks.

saifuddin-xilinx avatar Feb 15 '22 05:02 saifuddin-xilinx