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:	Thu, 29 Jan 2009 15:50:42 -0800
From:	Andrew Morton <akpm@...ux-foundation.org>
To:	Hans-Christian Egtvedt <hans-christian.egtvedt@...el.com>
Cc:	hans-christian.egtvedt@...el.com, linux-kernel@...r.kernel.org,
	Kay Sievers <kay.sievers@...y.org>,
	Haavard Skinnemoen <hskinnemoen@...el.com>,
	Huang Weiyi <weiyi.huang@...il.com>
Subject: Re: [PATCH 1/1] atmel-ssc: fix misuse of dev_dbg when requested ssc
 instance is not found

On Thu, 29 Jan 2009 17:46:55 +0100
Hans-Christian Egtvedt <hans-christian.egtvedt@...el.com> wrote:

> On Mon, 19 Jan 2009 13:57:56 +0100
> Hans-Christian Egtvedt <hans-christian.egtvedt@...el.com> wrote:
> > This patch replaces the dev_dbg(...) with a pr_err since the ssc
> > pointer is not valid when the id is not found in the list.
> > 
> > Signed-off-by: Hans-Christian Egtvedt
> > <hans-christian.egtvedt@...el.com> ---
> >  drivers/misc/atmel-ssc.c |    2 +-
> >  1 files changed, 1 insertions(+), 1 deletions(-)
> > 
> > diff --git a/drivers/misc/atmel-ssc.c b/drivers/misc/atmel-ssc.c
> > index 6b35874..6cff1bb 100644
> > --- a/drivers/misc/atmel-ssc.c
> > +++ b/drivers/misc/atmel-ssc.c
> > @@ -35,7 +35,7 @@ struct ssc_device *ssc_request(unsigned int ssc_num)
> >  
> >  	if (!ssc_valid) {
> >  		spin_unlock(&user_lock);
> > -		dev_dbg(&ssc->pdev->dev, "could not find requested device\n");
> > +		pr_err("ssc: ssc%d platform device is missing\n", ssc_num);
> >  		return ERR_PTR(-ENODEV);
> >  	}
> >  
> 
> Bump, or did I miss the merge window?
> 

(Top-posting repaired.  Please don't do that!  It makes it horrid to
reply to you)

(Suitable cc's added - this was why your patch got lost)

The patch seems reasonable but the changelog seems to be quite
misleading.  I did this:

   The ssc pointer is not valid when the id is not found in the
   list.  Convert the message from a debug one into an error message
   and avoid dereferencing the bad pointer.

OK?
--
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