linux-parisc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Rolf Eike Beer <eike-kernel@sf-tec.de>
To: Mikulas Patocka <mpatocka@redhat.com>
Cc: Corey Minyard <minyard@acm.org>,
	openipmi-developer@lists.sourceforge.net,
	linux-parisc@vger.kernel.org
Subject: Re: [PATCH] ipmi_si: fix crash on parisc
Date: Wed, 06 Dec 2017 11:59:53 +0100	[thread overview]
Message-ID: <148bb897e55ffbe2225de4c0f1a32cf8@sf-tec.de> (raw)
In-Reply-To: <alpine.LRH.2.02.1712060052170.12854@file01.intranet.prod.int.rdu2.redhat.com>

Mikulas Patocka wrote:
> This patch fixes ipmi crash on parisc introduced in the kernel 4.15-rc.
> The pointer io.io_setup is not initialized and thus it causes crash in
> try_smi_init when attempting to call new_smi->io.io_setup.
> 
> Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
> 
> ---
>  drivers/char/ipmi/ipmi_si_parisc.c |    2 ++
>  1 file changed, 2 insertions(+)
> 
> Index: linux-4.15-rc2/drivers/char/ipmi/ipmi_si_parisc.c
> ===================================================================
> --- linux-4.15-rc2.orig/drivers/char/ipmi/ipmi_si_parisc.c	2017-12-06
> 01:19:49.000000000 +0100
> +++ linux-4.15-rc2/drivers/char/ipmi/ipmi_si_parisc.c	2017-12-06
> 06:40:12.000000000 +0100
> @@ -10,6 +10,8 @@ static int __init ipmi_parisc_probe(stru
>  {
>  	struct si_sm_io io;
> 
> +	memset(&io, 0, sizeof(io));
> +
>  	io.si_type	= SI_KCS;
>  	io.addr_source	= SI_DEVICETREE;
>  	io.addr_type	= IPMI_MEM_ADDR_SPACE;

Can't this be a C99 initializer for the whole struct? AFAIK this would 
set all remaining members to 0 anyway.

Eike

  reply	other threads:[~2017-12-06 10:59 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-06  9:25 [PATCH] ipmi_si: fix crash on parisc Mikulas Patocka
2017-12-06 10:59 ` Rolf Eike Beer [this message]
2017-12-06 16:08   ` Mikulas Patocka
2017-12-06 13:19 ` Corey Minyard

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=148bb897e55ffbe2225de4c0f1a32cf8@sf-tec.de \
    --to=eike-kernel@sf-tec.de \
    --cc=linux-parisc@vger.kernel.org \
    --cc=minyard@acm.org \
    --cc=mpatocka@redhat.com \
    --cc=openipmi-developer@lists.sourceforge.net \
    /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).