All of lore.kernel.org
 help / color / mirror / Atom feed
From: Domen Puncer <domen@coderock.org>
To: linux-kernel@vger.kernel.org
Subject: intermezzo/replicator.c - bug in izo_rep_cache_clean() [2.6.0-test8]?
Date: Sat, 18 Oct 2003 13:21:58 +0200	[thread overview]
Message-ID: <200310181321.58317.domen@coderock.org> (raw)

Hi.

This is an old one... posted to intermezzo ml a couple of times, but
still isn't fixed in -test8.


On Saturday 12 of July 2003 18:07, Matthew Wilcox wrote:
> On Sat, Jul 12, 2003 at 05:22:55PM +0200, Domen Puncer wrote:
> > ---
> > fs/intermezzo/replicator.c:83: //izo_rep_cache_clean()
> >                 tmp = bucket = &fset->fset_clients[i];
> >
> >                 tmp = tmp->next;
> >                 while (tmp != bucket) {
> >                         struct izo_offset_rec *offrec;
> >                         tmp = tmp->next;
> >                         list_del(tmp);
> >                         offrec = list_entry(tmp, struct izo_offset_rec,
> >                                             or_list);
> >                         PRESTO_FREE(offrec, sizeof(struct
> > izo_offset_rec)); }
> >
> > This code just doesn't look right.
> > We delete tmp (tmp->next = LIST_POISON1)... next time we'll
> >  list_del(LIST_POISON1)!!
> > We also do not delete first entry in the list
> > &fset->fset_clients[i]->next.
>
> Yup, looks like a bug.  I bet they meant to list_del(&tmp->prev).

I guess it could be written like this:
        list_for_each_save(tmp, next, bucket) {
                struct izo_offset_rec *offrec;
                list_del(tmp);
                ...


        Domen


                 reply	other threads:[~2003-10-18 11:22 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=200310181321.58317.domen@coderock.org \
    --to=domen@coderock.org \
    --cc=linux-kernel@vger.kernel.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 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.