Avoid a panic and return EINVAL instead.

Merge from UFS r232692:
syscall() fuzzing can trigger this panic.

MFC after:	3 days