[kernel] fix possible NULL pointer dereference in sock_sendpage()