netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* inet_csk_get_port lock imbalance?
@ 2009-06-18 13:55 Jiri Slaby
  2009-06-18 14:14 ` Florian Westphal
  0 siblings, 1 reply; 3+ messages in thread
From: Jiri Slaby @ 2009-06-18 13:55 UTC (permalink / raw)
  To: David Miller; +Cc: netdev, kuznet

Hi,

we've found a weird locking discipline in inet_csk_get_port. Who is
supposed to unlock the spin lock in the place marked in the code below?

do {
        head = &hashinfo->bhash[inet_bhashfn(net, rover,
                        hashinfo->bhash_size)];
        spin_lock(&head->lock);
        inet_bind_bucket_for_each(tb, node, &head->chain)
                if (ib_net(tb) == net && tb->port == rover) {
...
		}
        break;  ////////// here
next:
        spin_unlock(&head->lock);
        if (++rover > high)
                rover = low;
} while (--remaining > 0);

Thanks.


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2009-06-18 14:23 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-06-18 13:55 inet_csk_get_port lock imbalance? Jiri Slaby
2009-06-18 14:14 ` Florian Westphal
2009-06-18 14:23   ` Jiri Slaby

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).