diff options
| author | Jens Axboe <jens.axboe@oracle.com> | 2010-05-21 21:27:26 +0200 | 
|---|---|---|
| committer | Jens Axboe <jens.axboe@oracle.com> | 2010-05-21 21:27:26 +0200 | 
| commit | ee9a3607fb03e804ddf624544105f4e34260c380 (patch) | |
| tree | ce41b6e0fa10982a306f6c142a92dbf3c9961284 /net/tipc/subscr.c | |
| parent | b492e95be0ae672922f4734acf3f5d35c30be948 (diff) | |
| parent | d515e86e639890b33a09390d062b0831664f04a2 (diff) | |
Merge branch 'master' into for-2.6.35
Conflicts:
	fs/ext3/fsync.c
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Diffstat (limited to 'net/tipc/subscr.c')
| -rw-r--r-- | net/tipc/subscr.c | 15 | 
1 files changed, 10 insertions, 5 deletions
| diff --git a/net/tipc/subscr.c b/net/tipc/subscr.c index ff123e56114..ab6eab4c45e 100644 --- a/net/tipc/subscr.c +++ b/net/tipc/subscr.c @@ -274,7 +274,7 @@ static void subscr_cancel(struct tipc_subscr *s,  {  	struct subscription *sub;  	struct subscription *sub_temp; -	__u32 type, lower, upper; +	__u32 type, lower, upper, timeout, filter;  	int found = 0;  	/* Find first matching subscription, exit if not found */ @@ -282,12 +282,18 @@ static void subscr_cancel(struct tipc_subscr *s,  	type = ntohl(s->seq.type);  	lower = ntohl(s->seq.lower);  	upper = ntohl(s->seq.upper); +	timeout = ntohl(s->timeout); +	filter = ntohl(s->filter) & ~TIPC_SUB_CANCEL;  	list_for_each_entry_safe(sub, sub_temp, &subscriber->subscription_list,  				 subscription_list) {  			if ((type == sub->seq.type) &&  			    (lower == sub->seq.lower) && -			    (upper == sub->seq.upper)) { +			    (upper == sub->seq.upper) && +			    (timeout == sub->timeout) && +                            (filter == sub->filter) && +                             !memcmp(s->usr_handle,sub->evt.s.usr_handle, +				     sizeof(s->usr_handle)) ){  				found = 1;  				break;  			} @@ -304,7 +310,7 @@ static void subscr_cancel(struct tipc_subscr *s,  		k_term_timer(&sub->timer);  		spin_lock_bh(subscriber->lock);  	} -	dbg("Cancel: removing sub %u,%u,%u from subscriber %x list\n", +	dbg("Cancel: removing sub %u,%u,%u from subscriber %p list\n",  	    sub->seq.type, sub->seq.lower, sub->seq.upper, subscriber);  	subscr_del(sub);  } @@ -352,8 +358,7 @@ static struct subscription *subscr_subscribe(struct tipc_subscr *s,  	sub->seq.upper = ntohl(s->seq.upper);  	sub->timeout = ntohl(s->timeout);  	sub->filter = ntohl(s->filter); -	if ((!(sub->filter & TIPC_SUB_PORTS) == -	     !(sub->filter & TIPC_SUB_SERVICE)) || +	if ((sub->filter && (sub->filter != TIPC_SUB_PORTS)) ||  	    (sub->seq.lower > sub->seq.upper)) {  		warn("Subscription rejected, illegal request\n");  		kfree(sub); | 
