mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@oracle.com>
To: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Cc: macro@linux-mips.org, ralf@linux-mips.org, davem@davemloft.net,
	akpm@linux-foundation.org, netdev@vger.kernel.org,
	linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: Re: [PATCH] defxx: Fix a sentinel at the end of a 'eisa_device_id' structure
Date: Mon, 3 Feb 2020 12:55:53 +0300	[thread overview]
Message-ID: <20200203095553.GN1778@kadam> (raw)
In-Reply-To: <20200202142341.22124-1-christophe.jaillet@wanadoo.fr>

On Sun, Feb 02, 2020 at 03:23:41PM +0100, Christophe JAILLET wrote:
> 'struct eisa_device_id' must be ended by an empty string, not a NULL
> pointer. Otherwise, a NULL pointer dereference may occur in
> 'eisa_bus_match()'.
> 
> Also convert some spaces to tab to please 'checkpatch.pl'.
> 
> Fixes: e89a2cfb7d7b ("[TC] defxx: TURBOchannel support")
> Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
> ---
>  drivers/net/fddi/defxx.c | 10 +++++-----
>  1 file changed, 5 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/net/fddi/defxx.c b/drivers/net/fddi/defxx.c
> index 077c68498f04..7ef0c57f07c6 100644
> --- a/drivers/net/fddi/defxx.c
> +++ b/drivers/net/fddi/defxx.c
> @@ -3768,11 +3768,11 @@ static void dfx_pci_unregister(struct pci_dev *pdev)
>  
>  #ifdef CONFIG_EISA
>  static const struct eisa_device_id dfx_eisa_table[] = {
> -        { "DEC3001", DEFEA_PROD_ID_1 },
> -        { "DEC3002", DEFEA_PROD_ID_2 },
> -        { "DEC3003", DEFEA_PROD_ID_3 },
> -        { "DEC3004", DEFEA_PROD_ID_4 },
> -        { }
> +	{ "DEC3001", DEFEA_PROD_ID_1 },
> +	{ "DEC3002", DEFEA_PROD_ID_2 },
> +	{ "DEC3003", DEFEA_PROD_ID_3 },
> +	{ "DEC3004", DEFEA_PROD_ID_4 },
> +	{ "" }

You haven't changed runtime at all.  :P (struct eisa_device_id)->sig[]
is an array, not a pointer.  There is no NULL dereference because an
array in the middle of another array can't be NULL.

regards,
dan carpenter


  parent reply	other threads:[~2020-02-03  9:58 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-02 14:23 Christophe JAILLET
2020-02-02 19:12 ` Maciej W. Rozycki
2020-02-03  9:55 ` Dan Carpenter [this message]
2020-02-03 10:20   ` Maciej W. Rozycki
2020-02-03 17:38     ` Jakub Kicinski

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=20200203095553.GN1778@kadam \
    --to=dan.carpenter@oracle.com \
    --cc=akpm@linux-foundation.org \
    --cc=christophe.jaillet@wanadoo.fr \
    --cc=davem@davemloft.net \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=macro@linux-mips.org \
    --cc=netdev@vger.kernel.org \
    --cc=ralf@linux-mips.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

all inboxes | Powered by JetHome®