+ ipmi-split-device-discovery-and-registration-fix-mutex-use.patch added to -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The patch titled
     ipmi: fix mutex use
has been added to the -mm tree.  Its filename is
     ipmi-split-device-discovery-and-registration-fix-mutex-use.patch

Before you just go and hit "reply", please:
   a) Consider who else should be cc'ed
   b) Prefer to cc a suitable mailing list as well
   c) Ideally: find the original patch on the mailing list and do a
      reply-to-all to that, adding suitable additional cc's

*** Remember to use Documentation/SubmitChecklist when testing your code ***

See http://userweb.kernel.org/~akpm/stuff/added-to-mm.txt to find
out what to do about this

The current -mm tree may be found at http://userweb.kernel.org/~akpm/mmotm/

------------------------------------------------------
Subject: ipmi: fix mutex use
From: Tomas Henzl <thenzl@xxxxxxxxxx>

It looks like there is an unbalance with the mutexes after the latest IPMI
patchset applied.  For example in

static __devinit int init_ipmi_si(void)
....
	list_for_each_entry(e, &smi_infos, link) {
		if (!e->irq && (!type || e->addr_source == type)) {
			if (!try_smi_init(e)) {
				type = e->addr_source;
			}
		}
	}
	mutex_unlock(&smi_infos_lock);

we are calling mutex_unlock twice, because the
mutex_unlock(&smi_infos_lock) is also called from try_smi_init.

If the lock in try_smi_init is not needed this can be then solved by
removing the mutex_unlock(&smi_infos_lock) from try_smi_init.

Signed-off-by: Tomas Henzl <thenzl@xxxxxxxxxx>
Acked-by: Corey Minyard <cminyard@xxxxxxxxxx>
Cc: Matthew Garrett <mjg@xxxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---

 drivers/char/ipmi/ipmi_si_intf.c |    4 ----
 1 file changed, 4 deletions(-)

diff -puN drivers/char/ipmi/ipmi_si_intf.c~ipmi-split-device-discovery-and-registration-fix-mutex-use drivers/char/ipmi/ipmi_si_intf.c
--- a/drivers/char/ipmi/ipmi_si_intf.c~ipmi-split-device-discovery-and-registration-fix-mutex-use
+++ a/drivers/char/ipmi/ipmi_si_intf.c
@@ -3203,8 +3203,6 @@ static int try_smi_init(struct smi_info 
 		goto out_err_stop_timer;
 	}
 
-	mutex_unlock(&smi_infos_lock);
-
 	printk(KERN_INFO "IPMI %s interface initialized\n",
 	       si_to_str[new_smi->si_type]);
 
@@ -3254,8 +3252,6 @@ static int try_smi_init(struct smi_info 
 		new_smi->dev_registered = 0;
 	}
 
-	mutex_unlock(&smi_infos_lock);
-
 	return rv;
 }
 
_

Patches currently in -mm which might be from thenzl@xxxxxxxxxx are

ipmi-split-device-discovery-and-registration-fix-mutex-use.patch

--
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Kernel Newbies FAQ]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Photo]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux