datapath: Fix nil dereference in logging statement
datapath: Fix nil dereference in logging statement

If the command context is cancelled at just the wrong time, then it's
possible for the compiler to have run but the linker not yet run, which
means that the process in the *Cmd is nil. In this case, we would
attempt to dereference the process to get its pid but the process
pointer is nil, leading to a crash.

Fix this by checking that the pointer is non-nil before dereferencing.

Found via the unit test failure:

  ... Panic: runtime error: invalid memory address or nil pointer dereference (PC=0x45BA7A)

  /usr/local/go/src/runtime/panic.go:513
    in gopanic
  /usr/local/go/src/runtime/panic.go:82
    in panicmem
  /usr/local/go/src/runtime/signal_unix.go:390
    in sigpanic
  compile.go:167
    in compileAndLink
  compile.go:230
    in compile
  loader.go:73
    in compileDatapath
  loader.go:112
    in compileAndLoad
  loader_test.go:187
    in LoaderTestSuite.TestCompileFailure
  /usr/local/go/src/reflect/value.go:308
    in Value.Call
  /usr/local/go/src/runtime/asm_amd64.s:1333
    in goexit
  PANIC: loader_test.go:169: LoaderTestSuite.TestCompileFailure

Fixes: d9a9f240d83d ("loader: Log PIDs of compiler/linker on error")

Signed-off-by: Joe Stringer <16a9a54ddf4259952e3c118c763138e83693d7fd@cilium.io>

tgraf/cilium,tgraf/cilium,cilium-team/cilium,michi-covalent/cilium,tklauser/cilium,cilium/cilium,michi-covalent/cilium,cilium/cilium,tgraf/cilium,tklauser/cilium,tgraf/cilium,tgraf/cilium,michi-covalent/cilium,cilium-team/cilium,tklauser/cilium,tgraf/cilium,tklauser/cilium,cilium/cilium,michi-covalent/cilium,cilium/cilium,michi-covalent/cilium,cilium/cilium,tklauser/cilium