linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Stefan Richter <stefanr@s5r6.in-berlin.de>
To: Hannes Hering <hannes.hering@linux.vnet.ibm.com>
Cc: jeff@garzik.org, themann@de.ibm.com, netdev@vger.kernel.org,
	linux-kernel@vger.kernel.org, raisch@de.ibm.com,
	ossrosch@linux.vnet.ibm.com, linuxppc-dev@ozlabs.org,
	ossthema@de.ibm.com, osstklei@de.ibm.com
Subject: Re: [PATCH] ehea: Fix: Remove adapter from adapter list in error path
Date: Wed, 11 Feb 2009 15:15:34 +0100	[thread overview]
Message-ID: <4992DD86.1030607@s5r6.in-berlin.de> (raw)
In-Reply-To: <200902111329.02954.hannes.hering@linux.vnet.ibm.com>

Hannes Hering wrote:
> Remove adapter from adapter list before freeing data structure in error path.
...
> --- linux-2.6.29-rc4/drivers/net/ehea/ehea_main.c	2009-02-11 13:13:47.812542928 +0100
> +++ patched_kernel/drivers/net/ehea/ehea_main.c	2009-02-11 13:14:04.197540184 +0100
> @@ -3448,6 +3448,7 @@ out_kill_eq:
>  	ehea_destroy_eq(adapter->neq);
>  
>  out_free_ad:
> +	list_del(&adapter->list);
>  	kfree(adapter);
>  
>  out:

On a related note, ehea_set_mac_addr()/ehea_update_bcmc_registrations()
accesses adapter_list without serialization by ehea_fw_handles.lock and
thus apparently unsafely.

There may be other unsafe accesses of adapter_list; that's just the
first one which I spotted.
-- 
Stefan Richter
-=====-==--= --=- -=-==
http://arcgraph.de/sr/

  reply	other threads:[~2009-02-11 14:43 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-02-11 12:29 [PATCH] ehea: Fix: Remove adapter from adapter list in error path Hannes Hering
2009-02-11 14:15 ` Stefan Richter [this message]
2009-02-11 21:48 ` David Miller

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=4992DD86.1030607@s5r6.in-berlin.de \
    --to=stefanr@s5r6.in-berlin.de \
    --cc=hannes.hering@linux.vnet.ibm.com \
    --cc=jeff@garzik.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxppc-dev@ozlabs.org \
    --cc=netdev@vger.kernel.org \
    --cc=ossrosch@linux.vnet.ibm.com \
    --cc=ossthema@de.ibm.com \
    --cc=osstklei@de.ibm.com \
    --cc=raisch@de.ibm.com \
    --cc=themann@de.ibm.com \
    /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).