Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Merge tag 'for-linus-4.7-2' of git://git.code.sf.net/p/openipmi/linux-ipmi

Pull ipmi bugfix from Corey Minyard:
"Fix a fairly significant ipmi list bug

This bug could cause lists to be corrupted"

* tag 'for-linus-4.7-2' of git://git.code.sf.net/p/openipmi/linux-ipmi:
ipmi: Remove smi_msg from waiting_rcv_msgs list before handle_one_recv_msg()

+6 -2
+6 -2
drivers/char/ipmi/ipmi_msghandler.c
··· 3820 3820 while (!list_empty(&intf->waiting_rcv_msgs)) { 3821 3821 smi_msg = list_entry(intf->waiting_rcv_msgs.next, 3822 3822 struct ipmi_smi_msg, link); 3823 + list_del(&smi_msg->link); 3823 3824 if (!run_to_completion) 3824 3825 spin_unlock_irqrestore(&intf->waiting_rcv_msgs_lock, 3825 3826 flags); ··· 3830 3829 if (rv > 0) { 3831 3830 /* 3832 3831 * To preserve message order, quit if we 3833 - * can't handle a message. 3832 + * can't handle a message. Add the message 3833 + * back at the head, this is safe because this 3834 + * tasklet is the only thing that pulls the 3835 + * messages. 3834 3836 */ 3837 + list_add(&smi_msg->link, &intf->waiting_rcv_msgs); 3835 3838 break; 3836 3839 } else { 3837 - list_del(&smi_msg->link); 3838 3840 if (rv == 0) 3839 3841 /* Message handled */ 3840 3842 ipmi_free_smi_msg(smi_msg);