MFC r314996: Fix NULL pointer dereference and panic with shm file pread/pwrite.
PR: 217429 Approved by: dchagin