Skip to contentSkip to conversation

MFD: ezx-pcap, fix lock imbalance

PATCH In review Jiri Slaby 3 participants 4 messages Jul 1, 2009 Multifunction devices (MFD)

lore
Share & tools
lore

Jiri Slaby

author
#0 lore raw

PATCH 1/1 MFD: ezx-pcap, fix lock imbalance

There is an omitted unlock in pcap_adc_irq ISR on one fail path. Fix that.

---
 drivers/mfd/ezx-pcap.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
drivers/mfd/ezx-pcap.c +3 -1
index 671a7ef..c1de4af 100644
@@ -238,8 +238,10 @@ static irqreturn_t pcap_adc_irq(int irq, void *_pcap)
 	mutex_lock(&pcap->adc_mutex);
 	req = pcap->adc_queue[pcap->adc_head];
 
-	if (WARN(!req, KERN_WARNING "adc irq without pending request\n"))
+	if (WARN(!req, KERN_WARNING "adc irq without pending request\n")) {
+		mutex_unlock(&pcap->adc_mutex);
 		return IRQ_HANDLED;
+	}
 
 	/* read requested channels results */
 	ezx_pcap_read(pcap, PCAP_REG_ADC, &tmp);
Signature · 1 line
1.6.3.2
#1 lore raw

Hi Jiri,

Em Qua, 2009-07-01 às 08:53 +0200, Jiri Slaby escreveu:

Quoted 3 lines

There is an omitted unlock in pcap_adc_irq ISR on one fail path. Fix that.

I would be happy to ack this, however, you are late. ;)

http://patchwork.kernel.org/patch/32002/

Samuel seems to be unreachable ATM, last email I have from him is from June 16. :(

Quoted 20 lines
---
 drivers/mfd/ezx-pcap.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
drivers/mfd/ezx-pcap.c +3 -1
index 671a7ef..c1de4af 100644
@@ -238,8 +238,10 @@ static irqreturn_t pcap_adc_irq(int irq, void *_pcap)
 	mutex_lock(&pcap->adc_mutex);
 	req = pcap->adc_queue[pcap->adc_head];
 
-	if (WARN(!req, KERN_WARNING "adc irq without pending request\n"))
+	if (WARN(!req, KERN_WARNING "adc irq without pending request\n")) {
+		mutex_unlock(&pcap->adc_mutex);
 		return IRQ_HANDLED;
+	}
 
 	/* read requested channels results */
 	ezx_pcap_read(pcap, PCAP_REG_ADC, &tmp);
Signature · 1 line
Daniel Ribeiro
author
#2 lore raw
Quoted 6 lines · Daniel Ribeiro

Em Qua, 2009-07-01 às 08:53 +0200, Jiri Slaby escreveu:

Quoted 3 lines

There is an omitted unlock in pcap_adc_irq ISR on one fail path. Fix that.

I would be happy to ack this, however, you are late. ;)

Heh :), nevermind.

#3 lore raw
In reply to Daniel Ribeiro

Hi Daniel,

Quoted 5 lines · Daniel Ribeiro

Hi Jiri,

Em Qua, 2009-07-01 às 08:53 +0200, Jiri Slaby escreveu:

Quoted 2 lines

There is an omitted unlock in pcap_adc_irq ISR on one fail path. Fix that.

Quoted 8 lines
Quoted 1 line

I would be happy to ack this, however, you are late. ;)

http://patchwork.kernel.org/patch/32002/

Samuel seems to be unreachable ATM, last email I have from him is from June 16. :(

Sorry for the delay, I was travelling. I'll be going through my mail backlog today.

Cheers,
Samuel.

Quoted 23 lines
Quoted 20 lines
---
 drivers/mfd/ezx-pcap.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
drivers/mfd/ezx-pcap.c +3 -1
index 671a7ef..c1de4af 100644
@@ -238,8 +238,10 @@ static irqreturn_t pcap_adc_irq(int irq, void *_pcap)
 	mutex_lock(&pcap->adc_mutex);
 	req = pcap->adc_queue[pcap->adc_head];
 
-	if (WARN(!req, KERN_WARNING "adc irq without pending request\n"))
+	if (WARN(!req, KERN_WARNING "adc irq without pending request\n")) {
+		mutex_unlock(&pcap->adc_mutex);
 		return IRQ_HANDLED;
+	}
 
 	/* read requested channels results */
 	ezx_pcap_read(pcap, PCAP_REG_ADC, &tmp);
Signature · 1 line
Daniel Ribeiro
Signature · 2 lines
Intel Open Source Technology Centre
http://oss.intel.com/