ENH: fix for kernel versions, big kernel lock on ioctl