davidker / unisys

Master repository for new changes to drivers/staging/unisys and drivers/visorbus
Other
2 stars 1 forks source link

Add error handling for crash_message errors #114

Closed ghost closed 7 years ago

ghost commented 7 years ago
 > 
 > static void
 > save_crash_message(struct controlvm_message *msg, enum crash_obj_type typ)
 > {
 >  u32 local_crash_msg_offset;
 >  u16 local_crash_msg_count;
 > 
 >  if (visorchannel_read(controlvm_channel,
 >                offsetof(struct spar_controlvm_channel_protocol,
 >                     saved_crash_message_count),
 >                &local_crash_msg_count, sizeof(u16)) < 0) {
 >      POSTCODE_LINUX_2(CRASH_DEV_CTRL_RD_FAILURE_PC,
 >               POSTCODE_SEVERITY_ERR);
 >      return;
 >  }
 > 
 >  if (local_crash_msg_count != CONTROLVM_CRASHMSG_MAX) {
 >      POSTCODE_LINUX_3(CRASH_DEV_COUNT_FAILURE_PC,
 >               local_crash_msg_count,
 >               POSTCODE_SEVERITY_ERR);
 >      return;

No errors being returned despite this obviously being an error?

ghost commented 7 years ago

Issue fixed in commit 8dff01f7d.

davidker commented 7 years ago

Sorry, a lot of the error ones are fixed due to the work I'm doing in the overall error handling task. I guess we can clean some of this up.