missing spin_unlock in tcp_v4_get_port

2005-08-22 Thread Ted Unangst

There appears to be a missing spin_unlock in tcp_v4_get_port.

do {rover++;
if (rover > high)
rover = low;
head = &tcp_bhash[tcp_bhashfn(rover)];
spin_lock(&head->lock);
head->lock is acquired.
tb_for_each(tb, node, &head->chain)
if (tb->port == rover)
goto next;
we don't find what we want.  break out of while loop.
break;
next:
spin_unlock(&head->lock);
} while (--remaining > 0);
tcp_port_rover = rover;
spin_unlock(&tcp_portalloc_lock);

/* Exhausted local port range during search? */
ret = 1;
if (remaining <= 0)
goto fail;
here we go to fail; head->lock is still acquired.

fail_unlock:
spin_unlock(&head->lock);
fail:
local_bh_enable();
return ret;

Is this a real bug?  The same code was also copy-pasted into 
tcp_v6_get_port.



--
Ted Unangst www.coverity.com Coverity, Inc.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


some missing spin_unlocks

2005-08-22 Thread Ted Unangst

I think these are all real bugs.

sound/synth/emux/emux_synth.c snd_emux_note_on, line 101
snd_assert will return without unlocking emu->voice_lock (line 89)

sound/pci/au88x0/au88x0_core.c vortex_adb_allocroute, search for EBUSY
returns without unlocking vortex->lock

net/rose/rose_route.c rose_route_frame, line 998
returns without unlocking rose_node_list_lock, rose_neigh_list_lock, or 
rose_route_list_lock


net/rose/rose_timer.c rose_heartbeat_expiry, line 141
rose_destroy_socket does not unlock sk as far as i can see

drivers/net/irda/donauboe.c toshoboe_net_ioctl, search for EPERM
returns without unlocking self->lock


--
Ted Unangst www.coverity.com Coverity, Inc.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: The latest Microsoft FUD. This time from BillG, himself.

2001-06-30 Thread Ted Unangst

On Sat, 30 Jun 2001, Dmitri Pogosyan wrote:

> Well, this is an old as world argument used to take your freedom away -
> 'law obeying citizens have nothing to fear'

except that you are opting in, by purchasing the product.

> Why not allow police to search your car at every moment they wish ?
> If you have nothing to hide, it is just a minor inconvenience, but how
> many criminals will be caught !  Let us put permanent roadblocks at
> every
> entrance to the cities !

microsoft != government.  the us constitution only applies to government,
not private industries, and certainly wouldn't help you, in canada.

> And now I have to ask permission every time I put my own purchased CD in
> my computer and explain and prove that I'm not a pirate.  Speak about
> living in freedom.

you purchased it, meaning you wanted it.  nobody, except maybe your boss
made you buy it, and then you can always get a new job.  you have as much
freedom as you want, don't use ms products if you don't like them.

ted

--
"I promise you a police car on every sidewalk."
  - M. Barry Mayor of Washington, DC

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/



Re: Uncle Sam Wants YOU!

2001-07-01 Thread Ted Unangst

On Sun, 1 Jul 2001, Ben Ford wrote:

> Name a single tech company anywhere in the world that doesn't have to
> deal with microsoftisms.

http://www.wasabisystems.com/

> Well, when you realize that Bill Gates (not MS, just Bill Gates
> personally) has enough money to give every person in the world $10 out
> of his pocket, then you see this argument in a different light.

that's called capitalism.

ted

--
"First, it was not a strip bar, it was an erotic club.  And second,
what can I say?  I'm a night owl."
  - M. Barry, Mayor of Washington, DC

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/