From: "Peter W. Morreale" <morreale@radiantdata.com>
To: "Stuart MacDonald" <stuartm@connecttech.com>
Cc: "'Linux Kernel Mailing List'" <linux-kernel@vger.kernel.org>
Subject: Possible Spam:Re: Problems in list.h macros?
Date: Wed, 06 Oct 2004 16:38:54 -0600 [thread overview]
Message-ID: <416473FE.5030309@radiantdata.com> (raw)
In-Reply-To: 030801c4abeb$c9316ba0$294b82ce@stuartm
From list.h:
* list_for_each_safe - iterate over a list safe against removal
of list entry
It's only safe to remove entries.
-PWM
Stuart MacDonald wrote:
>I am referring to a stock 2.4.27's linux/list.h.
>
>1: list_for_each(_entry)_safe() calls seem not to be as safe as they
>are implied to be. They seem to be only actually safe *iff* a
>list_del() is the only operation performed on the list entry. If pos
>is freed after a list_del, aren't you toast? If n has its pointers
>modified, say by a list_add() to a different list, don't you end up
>at the new list instead of the original list? Shouldn't this be noted
>in the macro comments?
>
>..Stu
>
>-
>To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
>the body of a message to majordomo@vger.kernel.org
>More majordomo info at http://vger.kernel.org/majordomo-info.html
>Please read the FAQ at http://www.tux.org/lkml/
>
>
>
prev parent reply other threads:[~2004-10-06 22:41 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-10-06 21:31 Problems in list.h macros? Stuart MacDonald
2004-10-06 22:38 ` Peter W. Morreale [this message]
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=416473FE.5030309@radiantdata.com \
--to=morreale@radiantdata.com \
--cc=linux-kernel@vger.kernel.org \
--cc=stuartm@connecttech.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