From: romieu@fr.zoreil.com
To: Frank Davis <fdavis@si.rr.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH] 2.5.53 : net/atm/lec.c
Date: Tue, 31 Dec 2002 00:07:56 +0100 [thread overview]
Message-ID: <20021231000756.A17128@electric-eye.fr.zoreil.com> (raw)
In-Reply-To: <Pine.LNX.4.44.0212282007210.952-100000@linux-dev>; from fdavis@si.rr.com on Sat, Dec 28, 2002 at 08:17:19PM -0500
Greetings,
Frank Davis <fdavis@si.rr.com> :
[locking in net/atm/lec.c]
net/atm/lec.c::lec_arp_destroy()
-> spin_lock_irqsave(&lec_lock, flags);
-> lec_arp_remove(priv->lec_arp_tables, entry);
-> spin_lock_irqsave(&lec_lock, flags);
-> good bye Charlie !
Both lec_arp_check_expire() (timer function) and lec_arp_destroy() are
walking the lec_arp_table from the 'lec_priv' they were attached to and if
the intent of lec_arp_{lock/unlock} is to protect the timer function
lec_arp_check_expire() by virtue of refcounting, it seems slightly racy.
If you are wondering who the callers of lec_arp_remove() are:
lec_arp_remove
<- lec_atm_send
<- lecdev_ops.send = lec_atm_send
<- lec_arp_destroy
<- lec_atm_close
<- lecdev_ops.close = lec_atm_close
<- lec_arp_check_expire
<- priv->lec_arp_timer.function = lec_arp_check_expire;
<- lec_addr_delete
<- lec_atm_send
<- lec_vcc_close
<- lec_push
<- vcc->push = lec_push;
<- lec_arp_check_empties
<- lec_push
Removing the lock from lec_arp_remove() and asking callers to do themselves
the locking (liek lec_arp_destroy) doesn't seem too unsane.
Btw, del_timer_sync() in lec_arp_destroy() shouldn't hurt imho.
--
Ueimor
prev parent reply other threads:[~2002-12-30 22:59 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-12-29 1:17 Frank Davis
2002-12-30 23:07 ` romieu [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=20021231000756.A17128@electric-eye.fr.zoreil.com \
--to=romieu@fr.zoreil.com \
--cc=fdavis@si.rr.com \
--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®