lkml.org 
[lkml]   [2003]   [Feb]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH][ATM] cli() for net/atm/lec.c
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
-
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/

\
 
 \ /
  Last update: 2005-03-22 13:33    [W:0.049 / U:1.872 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site