All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dave Jones <davej@redhat.com>
To: Takashi Iwai <tiwai@suse.de>
Cc: alsa-devel@lists.sourceforge.net,
	Linux Kernel <linux-kernel@vger.kernel.org>
Subject: Re: list corruption on removal of snd_seq_dummy
Date: Mon, 26 Jun 2006 23:27:38 -0400	[thread overview]
Message-ID: <20060627032738.GA26575@redhat.com> (raw)
In-Reply-To: <s5hzmg49mi5.wl%tiwai@suse.de>

On Fri, Jun 23, 2006 at 12:47:46PM +0200, Takashi Iwai wrote:
 
 > > The code in question is doing..
 > > 
 > >         __list_add(&deleted_list,
 > >                client->ports_list_head.prev,
 > >                client->ports_list_head.next);
 > > 
 > > which looks fishy, as those two elements aren't going to be consecutive,
 > > as __list_add expects.
 > 
 > I think the code behaves correctly but probably misusing __list_add().
 > It movies the whole entries from an existing list_head A
 > (clients->ports_list_head) to a new list_head B (deleted_list).
 > The above is exapnded:
 > 
 > 	A->next->prev = B;
 > 	B->next = A->next;
 > 	B->prev = A->prev;
 > 	A->prev->next = B;
 > 
 > Any better way to achieve it using standard macros?

Why can't you just list_move() the elements ?

		Dave

-- 
http://www.codemonkey.org.uk

Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642

WARNING: multiple messages have this Message-ID (diff)
From: Dave Jones <davej@redhat.com>
To: Takashi Iwai <tiwai@suse.de>
Cc: alsa-devel@lists.sourceforge.net,
	Linux Kernel <linux-kernel@vger.kernel.org>
Subject: Re: list corruption on removal of snd_seq_dummy
Date: Mon, 26 Jun 2006 23:27:38 -0400	[thread overview]
Message-ID: <20060627032738.GA26575@redhat.com> (raw)
In-Reply-To: <s5hzmg49mi5.wl%tiwai@suse.de>

On Fri, Jun 23, 2006 at 12:47:46PM +0200, Takashi Iwai wrote:
 
 > > The code in question is doing..
 > > 
 > >         __list_add(&deleted_list,
 > >                client->ports_list_head.prev,
 > >                client->ports_list_head.next);
 > > 
 > > which looks fishy, as those two elements aren't going to be consecutive,
 > > as __list_add expects.
 > 
 > I think the code behaves correctly but probably misusing __list_add().
 > It movies the whole entries from an existing list_head A
 > (clients->ports_list_head) to a new list_head B (deleted_list).
 > The above is exapnded:
 > 
 > 	A->next->prev = B;
 > 	B->next = A->next;
 > 	B->prev = A->prev;
 > 	A->prev->next = B;
 > 
 > Any better way to achieve it using standard macros?

Why can't you just list_move() the elements ?

		Dave

-- 
http://www.codemonkey.org.uk

  reply	other threads:[~2006-06-27  3:27 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-06-23  3:15 list corruption on removal of snd_seq_dummy Dave Jones
2006-06-23 10:47 ` Takashi Iwai
2006-06-27  3:27   ` Dave Jones [this message]
2006-06-27  3:27     ` Dave Jones
2006-06-27  9:28     ` Takashi Iwai
2006-06-27  9:28       ` Takashi Iwai
  -- strict thread matches above, loose matches on Subject: below --
2006-06-27 12:05 Chuck Ebbert
2006-06-27 12:38 ` Takashi Iwai
2006-06-27 12:38   ` Takashi Iwai
2006-06-27 16:58   ` Dave Jones
2006-06-27 16:58     ` Dave Jones
2006-06-27 17:07     ` Takashi Iwai
2006-06-27 17:07       ` Takashi Iwai

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=20060627032738.GA26575@redhat.com \
    --to=davej@redhat.com \
    --cc=alsa-devel@lists.sourceforge.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tiwai@suse.de \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.