linux-spi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Steven King <sfking-xS0NTnu2YfYAvxtiuMwx3w@public.gmane.org>
To: Axel Lin <axel.lin-8E1dMatC8ynQT0dZR+AlfA@public.gmane.org>
Cc: Mark Brown <broonie-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
	linux-spi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH] spi: coldfire-qspi: Prevent NULL pointer dereference
Date: Mon, 10 Mar 2014 08:48:40 -0700	[thread overview]
Message-ID: <201403100848.41186.sfking@fdwdc.com> (raw)
In-Reply-To: <1394345470.15686.1.camel@phoenix>

On Saturday 08 March 2014 10:11:10 pm Axel Lin wrote:
> If pdata->cs_control is NULL, we will hit NULL pointer dereference in
> mcfqspi_cs_select() and mcfqspi_cs_deselect(). Thus add NULL test for
> pdata->cs_control in probe().
>

NAK.

 I suggest you read the code again.  There is no NULL pointer dereference and 
further, by returning an error if cs_control is NULL, you've now broken the 
design which was that cs_control is optional.
--
To unsubscribe from this list: send the line "unsubscribe linux-spi" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  reply	other threads:[~2014-03-10 15:48 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-09  6:11 [PATCH] spi: coldfire-qspi: Prevent NULL pointer dereference Axel Lin
2014-03-10 15:48 ` Steven King [this message]
     [not found]   ` <201403100848.41186.sfking-xS0NTnu2YfYAvxtiuMwx3w@public.gmane.org>
2014-03-10 16:05     ` Mark Brown
2014-03-10 16:04 ` Steven King
     [not found]   ` <201403100904.05819.sfking-xS0NTnu2YfYAvxtiuMwx3w@public.gmane.org>
2014-03-10 16:06     ` Geert Uytterhoeven
2014-03-10 16:08     ` Mark Brown

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=201403100848.41186.sfking@fdwdc.com \
    --to=sfking-xs0ntnu2yfyavxtiumwx3w@public.gmane.org \
    --cc=axel.lin-8E1dMatC8ynQT0dZR+AlfA@public.gmane.org \
    --cc=broonie-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
    --cc=linux-spi-u79uwXL29TY76Z2rM5mHXA@public.gmane.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).