From mboxrd@z Thu Jan 1 00:00:00 1970 From: walter harms Date: Sat, 10 Mar 2012 09:38:27 +0000 Subject: Re: [patch] spi: release lock on error path in spi_pump_messages() Message-Id: <4F5B2113.3060103@bfs.de> List-Id: References: <20120310085729.GB4647@elgon.mountain> In-Reply-To: <20120310085729.GB4647-mgFCXtclrQlZLf2FXnZxJA@public.gmane.org> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: Dan Carpenter Cc: spi-devel-general-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org, kernel-janitors-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org Am 10.03.2012 09:57, schrieb Dan Carpenter: > We should release the lock here and enable IRQs before returning. > > Signed-off-by: Dan Carpenter > > diff --git a/drivers/spi/spi.c b/drivers/spi/spi.c > index 5ae1e84..ab1bdce 100644 > --- a/drivers/spi/spi.c > +++ b/drivers/spi/spi.c > @@ -535,6 +535,7 @@ static void spi_pump_messages(struct kthread_work *work) > if (ret) { > dev_err(&master->dev, > "failed to unprepare transfer hardware\n"); > + spin_unlock_irqrestore(&master->queue_lock, flags); > return; > } > } hi Dan, do you want to protect dev_err() by a spn_lock ? re, wh > -- > To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html > > From mboxrd@z Thu Jan 1 00:00:00 1970 From: walter harms Subject: Re: [patch] spi: release lock on error path in spi_pump_messages() Date: Sat, 10 Mar 2012 10:38:27 +0100 Message-ID: <4F5B2113.3060103@bfs.de> References: <20120310085729.GB4647@elgon.mountain> Reply-To: wharms-fPG8STNUNVg@public.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Cc: spi-devel-general-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org, kernel-janitors-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: Dan Carpenter Return-path: In-Reply-To: <20120310085729.GB4647-mgFCXtclrQlZLf2FXnZxJA@public.gmane.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: spi-devel-general-bounces-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org List-Id: linux-spi.vger.kernel.org Am 10.03.2012 09:57, schrieb Dan Carpenter: > We should release the lock here and enable IRQs before returning. > > Signed-off-by: Dan Carpenter > > diff --git a/drivers/spi/spi.c b/drivers/spi/spi.c > index 5ae1e84..ab1bdce 100644 > --- a/drivers/spi/spi.c > +++ b/drivers/spi/spi.c > @@ -535,6 +535,7 @@ static void spi_pump_messages(struct kthread_work *work) > if (ret) { > dev_err(&master->dev, > "failed to unprepare transfer hardware\n"); > + spin_unlock_irqrestore(&master->queue_lock, flags); > return; > } > } hi Dan, do you want to protect dev_err() by a spn_lock ? re, wh > -- > To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in > the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org > More majordomo info at http://vger.kernel.org/majordomo-info.html > > ------------------------------------------------------------------------------ Virtualization & Cloud Management Using Capacity Planning Cloud computing makes use of virtualization - but cloud computing also focuses on allowing computing to be delivered as a service. http://www.accelacomm.com/jaw/sfnl/114/51521223/ From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753510Ab2CJJif (ORCPT ); Sat, 10 Mar 2012 04:38:35 -0500 Received: from mx01.sz.bfs.de ([194.94.69.103]:62227 "EHLO mx01.sz.bfs.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752358Ab2CJJib (ORCPT ); Sat, 10 Mar 2012 04:38:31 -0500 Message-ID: <4F5B2113.3060103@bfs.de> Date: Sat, 10 Mar 2012 10:38:27 +0100 From: walter harms Reply-To: wharms@bfs.de User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; de; rv:1.9.1.16) Gecko/20101125 SUSE/3.0.11 Thunderbird/3.0.11 MIME-Version: 1.0 To: Dan Carpenter CC: Grant Likely , spi-devel-general@lists.sourceforge.net, linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org Subject: Re: [patch] spi: release lock on error path in spi_pump_messages() References: <20120310085729.GB4647@elgon.mountain> In-Reply-To: <20120310085729.GB4647@elgon.mountain> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Am 10.03.2012 09:57, schrieb Dan Carpenter: > We should release the lock here and enable IRQs before returning. > > Signed-off-by: Dan Carpenter > > diff --git a/drivers/spi/spi.c b/drivers/spi/spi.c > index 5ae1e84..ab1bdce 100644 > --- a/drivers/spi/spi.c > +++ b/drivers/spi/spi.c > @@ -535,6 +535,7 @@ static void spi_pump_messages(struct kthread_work *work) > if (ret) { > dev_err(&master->dev, > "failed to unprepare transfer hardware\n"); > + spin_unlock_irqrestore(&master->queue_lock, flags); > return; > } > } hi Dan, do you want to protect dev_err() by a spn_lock ? re, wh > -- > To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html > >