Skip to contentSkip to conversation

Revert "ipmi_si: fix memory leak on new_smi"

PATCH In review [email protected] 2 participants 2 messages Dec 27, 2017

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Revert "ipmi_si: fix memory leak on new_smi"

From: Corey Minyard <[email protected]>

This reverts commit c97e41076a298dbc4e910c33048e553658388eed.

A backport was requested of c0a32fe13cd32 "ipmi_si: fix memory leak on new_smi", but the backport shouldn't have been done. This change needs to be reverted, as it can result in an oops and the previous code is correct.

Reverts: c97e41076a29 ("ipmi_si: fix memory leak on new_smi")

---

This is for 4.14 stable tree only. In hindsight, I should scrutinize stable kernel requests from others in the IPMI tree. Sorry about that.

 drivers/char/ipmi/ipmi_si_intf.c | 1 -
 1 file changed, 1 deletion(-)
drivers/char/ipmi/ipmi_si_intf.c +0 -1
index e1cbb78..c04aa11 100644
@@ -3469,7 +3469,6 @@ static int add_smi(struct smi_info *new_smi)
 				 ipmi_addr_src_to_str(new_smi->addr_source),
 				 si_to_str[new_smi->si_type]);
 			rv = -EBUSY;
-			kfree(new_smi);
 			goto out_err;
 		}
 	}
Signature · 1 line
2.7.4
#1 lore raw
Quoted 10 lines · On Wed, Dec 27, 2017 at 09:41:44AM -0600, [email protected] wrote:

From: Corey Minyard <[email protected]>

This reverts commit c97e41076a298dbc4e910c33048e553658388eed.

A backport was requested of c0a32fe13cd32 "ipmi_si: fix memory leak on new_smi", but the backport shouldn't have been done. This change needs to be reverted, as it can result in an oops and the previous code is correct.

Reverts: c97e41076a29 ("ipmi_si: fix memory leak on new_smi")

Quoted 8 lines

---

This is for 4.14 stable tree only. In hindsight, I should scrutinize stable kernel requests from others in the IPMI tree. Sorry about that.

I just queued this patch up from someone else already. Thanks for it, and sorry for the problems.

greg k-h

Quoted 18 lines
 drivers/char/ipmi/ipmi_si_intf.c | 1 -
 1 file changed, 1 deletion(-)
drivers/char/ipmi/ipmi_si_intf.c +0 -1
index e1cbb78..c04aa11 100644
@@ -3469,7 +3469,6 @@ static int add_smi(struct smi_info *new_smi)
 				 ipmi_addr_src_to_str(new_smi->addr_source),
 				 si_to_str[new_smi->si_type]);
 			rv = -EBUSY;
-			kfree(new_smi);
 			goto out_err;
 		}
 	}
Signature · 1 line
2.7.4