diff options
| author | Dmitry Torokhov <dtor@insightbb.com> | 2006-11-04 22:42:39 -0500 | 
|---|---|---|
| committer | Dmitry Torokhov <dtor@insightbb.com> | 2006-11-04 22:42:39 -0500 | 
| commit | 752c58a471c108d64da1676b2925dfbd83eb177e (patch) | |
| tree | fbffa0d7c54cd812950dffc16d642c9d449f4faf /net/tipc/port.c | |
| parent | e52b29c2a637f6854d71a45646d7283d984a6dad (diff) | |
| parent | 10b1fbdb0a0ca91847a534ad26d0bc250c25b74f (diff) | |
Merge rsync://rsync.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
Diffstat (limited to 'net/tipc/port.c')
| -rw-r--r-- | net/tipc/port.c | 12 | 
1 files changed, 9 insertions, 3 deletions
| diff --git a/net/tipc/port.c b/net/tipc/port.c index b9c8c6b9e94..b7f3199523c 100644 --- a/net/tipc/port.c +++ b/net/tipc/port.c @@ -505,8 +505,13 @@ static void port_timeout(unsigned long ref)  	struct port *p_ptr = tipc_port_lock(ref);  	struct sk_buff *buf = NULL; -	if (!p_ptr || !p_ptr->publ.connected) +	if (!p_ptr) +		return; + +	if (!p_ptr->publ.connected) { +		tipc_port_unlock(p_ptr);  		return; +	}  	/* Last probe answered ? */  	if (p_ptr->probing_state == PROBING) { @@ -1131,11 +1136,12 @@ int tipc_publish(u32 ref, unsigned int scope, struct tipc_name_seq const *seq)  	int res = -EINVAL;  	p_ptr = tipc_port_lock(ref); +	if (!p_ptr) +		return -EINVAL; +  	dbg("tipc_publ %u, p_ptr = %x, conn = %x, scope = %x, "  	    "lower = %u, upper = %u\n",  	    ref, p_ptr, p_ptr->publ.connected, scope, seq->lower, seq->upper); -	if (!p_ptr) -		return -EINVAL;  	if (p_ptr->publ.connected)  		goto exit;  	if (seq->lower > seq->upper) | 
