linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Javi Merino <javi.merino@arm.com>
To: Mans Rullgard <mans.rullgard@linaro.org>
Cc: "linux-arm-kernel@lists.infradead.org" 
	<linux-arm-kernel@lists.infradead.org>,
	"linaro-dev@lists.linaro.org" <linaro-dev@lists.linaro.org>,
	"patches@linaro.org" <patches@linaro.org>,
	Russell King <linux@arm.linux.org.uk>,
	Jassi Brar <jaswinder.singh@linaro.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Boojin Kim <boojin.kim@samsung.com>,
	Kukjin Kim <kgene.kim@samsung.com>
Subject: Re: [PATCH] ARM: pl330: fix null pointer dereference in pl330_chan_ctrl()
Date: Fri, 13 Jan 2012 13:48:16 +0000	[thread overview]
Message-ID: <4F103620.8070504@arm.com> (raw)
In-Reply-To: <1326458191-23492-1-git-send-email-mans.rullgard@linaro.org>

On 13/01/12 12:36, Mans Rullgard wrote:
> This fixes the thrd->req_running field being accessed before thrd
> is checked for null.  The error was introduced in abb959f.
> 
> Signed-off-by: Mans Rullgard <mans.rullgard@linaro.org>
> ---
>  arch/arm/common/pl330.c |    3 ++-

As Russell points out, the s5p tree has merged this file with
drivers/dma/pl330.c so this bug is now in that file.  Please rebase the
patch on top of linux-next.

Other than that, yes, that's my fault.

Acked-by: Javi Merino <javi.merino@arm.com>

>  1 files changed, 2 insertions(+), 1 deletions(-)
> 
> diff --git a/arch/arm/common/pl330.c b/arch/arm/common/pl330.c
> index 8d8df74..67abef5 100644
> --- a/arch/arm/common/pl330.c
> +++ b/arch/arm/common/pl330.c
> @@ -1496,12 +1496,13 @@ int pl330_chan_ctrl(void *ch_id, enum pl330_chan_op op)
>  	struct pl330_thread *thrd = ch_id;
>  	struct pl330_dmac *pl330;
>  	unsigned long flags;
> -	int ret = 0, active = thrd->req_running;
> +	int ret = 0, active;
>  
>  	if (!thrd || thrd->free || thrd->dmac->state == DYING)
>  		return -EINVAL;
>  
>  	pl330 = thrd->dmac;
> +	active = thrd->req_running;
>  
>  	spin_lock_irqsave(&pl330->lock, flags);
>  



  parent reply	other threads:[~2012-01-13 13:48 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-13 12:36 [PATCH] ARM: pl330: fix null pointer dereference in pl330_chan_ctrl() Mans Rullgard
2012-01-13 13:02 ` Russell King - ARM Linux
2012-01-13 13:48 ` Javi Merino [this message]
2012-01-13 19:46   ` Mans Rullgard
2012-01-14 21:53 ` Sergei Shtylyov
2012-01-25 12:11   ` [PATCH] DMA: " Mans Rullgard

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4F103620.8070504@arm.com \
    --to=javi.merino@arm.com \
    --cc=boojin.kim@samsung.com \
    --cc=jaswinder.singh@linaro.org \
    --cc=kgene.kim@samsung.com \
    --cc=linaro-dev@lists.linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@arm.linux.org.uk \
    --cc=mans.rullgard@linaro.org \
    --cc=patches@linaro.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).