davidker / unisys

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

handle failed memory allocation in bus_epilog() #95

Closed selltc closed 7 years ago

selltc commented 7 years ago

KanBoard-25160

This is in-response to the error-handling problems GregKH pointed out in his 8/21 email.

Here is the particular problem Greg pointed out:

 >              pmsg_hdr = bus_info->pending_msg_hdr;
 >              goto out_respond;
 >      }
 >
 >      if (need_response) {
 >              pmsg_hdr = kzalloc(sizeof(*pmsg_hdr), GFP_KERNEL);
 >              if (!pmsg_hdr) {
 >                      POSTCODE_LINUX_4(MALLOC_FAILURE_PC, cmd,
 >                                       bus_info->chipset_bus_no,
 >                                       POSTCODE_SEVERITY_ERR);
 >                      return;

 Wait!  You just ran out of memory!  And you don't care???

 Your poor users, they really liked that data that you just dropped on
 the floor, too bad they will never see it again...

How this is implemented will largely depend upon how github #91 is addressed.

davidker commented 7 years ago

Bus epilog is gone