diff options
| author | Dave Airlie <airlied@redhat.com> | 2014-04-05 02:14:21 -0400 |
|---|---|---|
| committer | Dave Airlie <airlied@redhat.com> | 2014-04-05 02:14:21 -0400 |
| commit | 9f97ba806a9cb8e828baca71eca8b684939053d8 (patch) | |
| tree | ec036e36d1d2e64b6e67c4d5d24a5ecb6475aac0 /net/tipc | |
| parent | 82c68b6ccd54117a87cb2d9b91c2ee6e1280cf9d (diff) | |
| parent | 10b6ee4a87811a110cb01eaca01eb04da6801baf (diff) | |
Merge tag 'drm-intel-fixes-2014-04-04' of git://anongit.freedesktop.org/drm-intel into drm-next
Merge window -fixes pull request as usual. Well, I did sneak in Jani's
drm_i915_private_t typedef removal, need to have fun with a big sed job
too ;-)
Otherwise:
- hdmi interlaced fixes (Jesse&Ville)
- pipe error/underrun/crc tracking fixes, regression in late 3.14-rc (but
not cc: stable since only really relevant for igt runs)
- large cursor wm fixes (Chris)
- fix gpu turbo boost/throttle again, was getting stuck due to vlv rps
patches (Chris+Imre)
- fix runtime pm fallout (Paulo)
- bios framebuffer inherit fix (Chris)
- a few smaller things
* tag 'drm-intel-fixes-2014-04-04' of git://anongit.freedesktop.org/drm-intel: (196 commits)
Skip intel_crt_init for Dell XPS 8700
drm/i915: vlv: fix RPS interrupt mask setting
Revert "drm/i915/vlv: fixup DDR freq detection per Punit spec"
drm/i915: move power domain init earlier during system resume
drm/i915: Fix the computation of required fb size for pipe
drm/i915: don't get/put runtime PM at the debugfs forcewake file
drm/i915: fix WARNs when reading DDI state while suspended
drm/i915: don't read cursor registers on powered down pipes
drm/i915: get runtime PM at i915_display_info
drm/i915: don't read pp_ctrl_reg if we're suspended
drm/i915: get runtime PM at i915_reg_read_ioctl
drm/i915: don't schedule force_wake_timer at gen6_read
drm/i915: vlv: reserve the GT power context only once during driver init
drm/i915: prefer struct drm_i915_private to drm_i915_private_t
drm/i915/overlay: prefer struct drm_i915_private to drm_i915_private_t
drm/i915/ringbuffer: prefer struct drm_i915_private to drm_i915_private_t
drm/i915/display: prefer struct drm_i915_private to drm_i915_private_t
drm/i915/irq: prefer struct drm_i915_private to drm_i915_private_t
drm/i915/gem: prefer struct drm_i915_private to drm_i915_private_t
drm/i915/dma: prefer struct drm_i915_private to drm_i915_private_t
...
Diffstat (limited to 'net/tipc')
| -rw-r--r-- | net/tipc/subscr.c | 29 |
1 files changed, 15 insertions, 14 deletions
diff --git a/net/tipc/subscr.c b/net/tipc/subscr.c index 11c9ae00837d..642437231ad5 100644 --- a/net/tipc/subscr.c +++ b/net/tipc/subscr.c | |||
| @@ -263,9 +263,9 @@ static void subscr_cancel(struct tipc_subscr *s, | |||
| 263 | * | 263 | * |
| 264 | * Called with subscriber lock held. | 264 | * Called with subscriber lock held. |
| 265 | */ | 265 | */ |
| 266 | static struct tipc_subscription *subscr_subscribe(struct tipc_subscr *s, | 266 | static int subscr_subscribe(struct tipc_subscr *s, |
| 267 | struct tipc_subscriber *subscriber) | 267 | struct tipc_subscriber *subscriber, |
| 268 | { | 268 | struct tipc_subscription **sub_p) { |
| 269 | struct tipc_subscription *sub; | 269 | struct tipc_subscription *sub; |
| 270 | int swap; | 270 | int swap; |
| 271 | 271 | ||
| @@ -276,23 +276,21 @@ static struct tipc_subscription *subscr_subscribe(struct tipc_subscr *s, | |||
| 276 | if (s->filter & htohl(TIPC_SUB_CANCEL, swap)) { | 276 | if (s->filter & htohl(TIPC_SUB_CANCEL, swap)) { |
| 277 | s->filter &= ~htohl(TIPC_SUB_CANCEL, swap); | 277 | s->filter &= ~htohl(TIPC_SUB_CANCEL, swap); |
| 278 | subscr_cancel(s, subscriber); | 278 | subscr_cancel(s, subscriber); |
| 279 | return NULL; | 279 | return 0; |
| 280 | } | 280 | } |
| 281 | 281 | ||
| 282 | /* Refuse subscription if global limit exceeded */ | 282 | /* Refuse subscription if global limit exceeded */ |
| 283 | if (atomic_read(&subscription_count) >= TIPC_MAX_SUBSCRIPTIONS) { | 283 | if (atomic_read(&subscription_count) >= TIPC_MAX_SUBSCRIPTIONS) { |
| 284 | pr_warn("Subscription rejected, limit reached (%u)\n", | 284 | pr_warn("Subscription rejected, limit reached (%u)\n", |
| 285 | TIPC_MAX_SUBSCRIPTIONS); | 285 | TIPC_MAX_SUBSCRIPTIONS); |
| 286 | subscr_terminate(subscriber); | 286 | return -EINVAL; |
| 287 | return NULL; | ||
| 288 | } | 287 | } |
| 289 | 288 | ||
| 290 | /* Allocate subscription object */ | 289 | /* Allocate subscription object */ |
| 291 | sub = kmalloc(sizeof(*sub), GFP_ATOMIC); | 290 | sub = kmalloc(sizeof(*sub), GFP_ATOMIC); |
| 292 | if (!sub) { | 291 | if (!sub) { |
| 293 | pr_warn("Subscription rejected, no memory\n"); | 292 | pr_warn("Subscription rejected, no memory\n"); |
| 294 | subscr_terminate(subscriber); | 293 | return -ENOMEM; |
| 295 | return NULL; | ||
| 296 | } | 294 | } |
| 297 | 295 | ||
| 298 | /* Initialize subscription object */ | 296 | /* Initialize subscription object */ |
| @@ -306,8 +304,7 @@ static struct tipc_subscription *subscr_subscribe(struct tipc_subscr *s, | |||
| 306 | (sub->seq.lower > sub->seq.upper)) { | 304 | (sub->seq.lower > sub->seq.upper)) { |
| 307 | pr_warn("Subscription rejected, illegal request\n"); | 305 | pr_warn("Subscription rejected, illegal request\n"); |
| 308 | kfree(sub); | 306 | kfree(sub); |
| 309 | subscr_terminate(subscriber); | 307 | return -EINVAL; |
| 310 | return NULL; | ||
| 311 | } | 308 | } |
| 312 | INIT_LIST_HEAD(&sub->nameseq_list); | 309 | INIT_LIST_HEAD(&sub->nameseq_list); |
| 313 | list_add(&sub->subscription_list, &subscriber->subscription_list); | 310 | list_add(&sub->subscription_list, &subscriber->subscription_list); |
| @@ -320,8 +317,8 @@ static struct tipc_subscription *subscr_subscribe(struct tipc_subscr *s, | |||
| 320 | (Handler)subscr_timeout, (unsigned long)sub); | 317 | (Handler)subscr_timeout, (unsigned long)sub); |
| 321 | k_start_timer(&sub->timer, sub->timeout); | 318 | k_start_timer(&sub->timer, sub->timeout); |
| 322 | } | 319 | } |
| 323 | 320 | *sub_p = sub; | |
| 324 | return sub; | 321 | return 0; |
| 325 | } | 322 | } |
| 326 | 323 | ||
| 327 | /* Handle one termination request for the subscriber */ | 324 | /* Handle one termination request for the subscriber */ |
| @@ -335,10 +332,14 @@ static void subscr_conn_msg_event(int conid, struct sockaddr_tipc *addr, | |||
| 335 | void *usr_data, void *buf, size_t len) | 332 | void *usr_data, void *buf, size_t len) |
| 336 | { | 333 | { |
| 337 | struct tipc_subscriber *subscriber = usr_data; | 334 | struct tipc_subscriber *subscriber = usr_data; |
| 338 | struct tipc_subscription *sub; | 335 | struct tipc_subscription *sub = NULL; |
| 339 | 336 | ||
| 340 | spin_lock_bh(&subscriber->lock); | 337 | spin_lock_bh(&subscriber->lock); |
| 341 | sub = subscr_subscribe((struct tipc_subscr *)buf, subscriber); | 338 | if (subscr_subscribe((struct tipc_subscr *)buf, subscriber, &sub) < 0) { |
| 339 | spin_unlock_bh(&subscriber->lock); | ||
| 340 | subscr_terminate(subscriber); | ||
| 341 | return; | ||
| 342 | } | ||
| 342 | if (sub) | 343 | if (sub) |
| 343 | tipc_nametbl_subscribe(sub); | 344 | tipc_nametbl_subscribe(sub); |
| 344 | spin_unlock_bh(&subscriber->lock); | 345 | spin_unlock_bh(&subscriber->lock); |
