mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: romieu@fr.zoreil.com
To: chas williams <chas@locutus.cmf.nrl.navy.mil>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH][ATM] cli() for net/atm/lec.c
Date: Thu, 20 Feb 2003 23:11:55 +0100	[thread overview]
Message-ID: <20030220231155.A2347@electric-eye.fr.zoreil.com> (raw)
In-Reply-To: <200302201751.h1KHpKqA009567@locutus.cmf.nrl.navy.mil>; from chas@locutus.cmf.nrl.navy.mil on Thu, Feb 20, 2003 at 12:51:20PM -0500

chas williams <chas@locutus.cmf.nrl.navy.mil> :
[...]
> @@ -2175,22 +2173,21 @@
>          }
>          if (!entry) {
>                  DPRINTK("LEC_ARP: Arp_check_empties: entry not found!\n");
> -                lec_arp_unlock(priv);
> +                lec_arp_put(priv);
>                  return;
>          }
> -        save_flags(flags);
> -        cli();
> +        LEC_ARP_LOCK();
>          del_timer(&entry->timer);
>          memcpy(entry->mac_addr, src, ETH_ALEN);
>          entry->status = ESI_FORWARD_DIRECT;
>          entry->last_used = jiffies;
>          prev->next = entry->next;
> -        restore_flags(flags);
> +        LEC_ARP_UNLOCK();

It isn't completely trivial that the prev <-> entry relationship
still holds at the point where LEC_ARP_LOCK() is called. Widening
the protected region would spare some brain cycles imho.

--
Ueimor

  parent reply	other threads:[~2003-02-20 22:02 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-02-20 17:51 chas williams
2003-02-20 19:06 ` Christoph Hellwig
2003-02-20 19:29   ` Jeff Garzik
2003-02-20 22:11 ` romieu [this message]
2003-02-21 17:40 ` chas williams
2003-02-21 17:57   ` Christoph Hellwig
2003-02-22  7:22     ` David S. Miller
2003-02-24  1:13       ` chas williams
2003-02-24  6:16         ` David S. 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=20030220231155.A2347@electric-eye.fr.zoreil.com \
    --to=romieu@fr.zoreil.com \
    --cc=chas@locutus.cmf.nrl.navy.mil \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®