Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2033f685 authored by Corey Minyard's avatar Corey Minyard
Browse files

ipmi: Free receive messages when in an oops



If the driver handles a response in an oops, it was just ignoring
the message.  However, the IPMI watchdog timer was counting on the
free happening to know when panic-time messages were complete.  So
free it in all cases.

Signed-off-by: default avatarCorey Minyard <cminyard@mvista.com>
parent 340ff31a
Loading
Loading
Loading
Loading
+5 −2
Original line number Diff line number Diff line
@@ -904,12 +904,14 @@ static int deliver_response(struct ipmi_smi *intf, struct ipmi_recv_msg *msg)
			rv = -EINVAL;
		}
		ipmi_free_recv_msg(msg);
	} else if (!oops_in_progress) {
	} else if (oops_in_progress) {
		/*
		 * If we are running in the panic context, calling the
		 * receive handler doesn't much meaning and has a deadlock
		 * risk.  At this moment, simply skip it in that case.
		 */
		ipmi_free_recv_msg(msg);
	} else {
		int index;
		struct ipmi_user *user = acquire_ipmi_user(msg->user, &index);

@@ -2220,6 +2222,7 @@ static int i_ipmi_request(struct ipmi_user *user,
	else {
		smi_msg = ipmi_alloc_smi_msg();
		if (smi_msg == NULL) {
			if (!supplied_recv)
				ipmi_free_recv_msg(recv_msg);
			rv = -ENOMEM;
			goto out;