lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Wed, 16 Dec 2009 20:20:22 +0200
From:	Felipe Balbi <felipe.balbi@...ia.com>
To:	"Balbi Felipe (Nokia-D/Helsinki)" <felipe.balbi@...ia.com>
Cc:	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	Tony Lindgren <tony@...mide.com>,
	Samuel Ortiz <sameo@...ux.intel.com>,
	Santosh Shilimkar <santosh.shilimkar@...com>,
	Balaji T K <balajitk@...com>, Rajendra Nayak <rnayak@...com>,
	Thomas Gleixner <tglx@...utronix.de>,
	"linux-omap@...r.kernel.org" <linux-omap@...r.kernel.org>
Subject: Re: [PATCH] mfd: twl4030-irq: irq_desc->lock converted to
 raw_spinlock_t

On Wed, Dec 16, 2009 at 07:18:50PM +0100, Balbi Felipe (Nokia-D/Helsinki) wrote:
>commit 239007b8440abff689632f50cdf0f2b9e895b534 converted
>the spinlock_t to raw_spinlock_t. Unfortunately twl4030-irq
>was left aside on the conversion.
>
>Cc: Thomas Gleixner <tglx@...utronix.de>
>Cc: Tony Lindgre <tony@...mide.com>

oops, my n is failing.

Tony Lindgren, below is better version:

========== cut here =================

 From 17edd64d8e813713da6fb9fa018ab5f79d94d159 Mon Sep 17 00:00:00 2001
From: Felipe Balbi <felipe.balbi@...ia.com>
Date: Wed, 16 Dec 2009 20:11:22 +0200
Subject: [PATCH] mfd: twl4030-irq: irq_desc->lock converted to raw_spinlock_t

commit 239007b8440abff689632f50cdf0f2b9e895b534 converted
the spinlock_t to raw_spinlock_t. Unfortunately twl4030-irq
was left aside on the conversion.

Cc: Thomas Gleixner <tglx@...utronix.de>
Cc: Tony Lindgren <tony@...mide.com>
Cc: linux-omap@...r.kernel.org
Signed-off-by: Felipe Balbi <felipe.balbi@...ia.com>
---

I'm not sure this is the expected fix since twl4030-irq handler
should be running in thread context. Currently mask/unmask/set_type
are deferred to a workqueue. Thomas, should this be done ? How
do you expect irq chips on slow busses to implement mask/unmask/set_type ?

  drivers/mfd/twl4030-irq.c |    4 ++--
  1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/mfd/twl4030-irq.c b/drivers/mfd/twl4030-irq.c
index 20d29ba..9df9a5a 100644
--- a/drivers/mfd/twl4030-irq.c
+++ b/drivers/mfd/twl4030-irq.c
@@ -568,12 +568,12 @@ static void twl4030_sih_do_edge(struct work_struct *work)
  
  		bytes[byte] &= ~(0x03 << off);
  
-		spin_lock_irq(&d->lock);
+		raw_spin_lock_irq(&d->lock);
  		if (d->status & IRQ_TYPE_EDGE_RISING)
  			bytes[byte] |= BIT(off + 1);
  		if (d->status & IRQ_TYPE_EDGE_FALLING)
  			bytes[byte] |= BIT(off + 0);
-		spin_unlock_irq(&d->lock);
+		raw_spin_unlock_irq(&d->lock);
  
  		edge_change &= ~BIT(i);
  	}
-- 
1.6.6.rc0


-- 
balbi
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ