sync Linux code from 0.11 to 3.x