diff options
author | Alex Shi <alex.shi@linaro.org> | 2017-02-10 12:01:01 +0800 |
---|---|---|
committer | Alex Shi <alex.shi@linaro.org> | 2017-02-10 12:01:01 +0800 |
commit | 106bdd9b95b3da7d762c4e0e59427444ff9f455d (patch) | |
tree | 98faf0ff11c604f2f257186efe6b438ccfce7e65 /net | |
parent | d8715e9813acd06f36ae484d569573b1972c5ec8 (diff) | |
parent | fd0d0fd17f47e0015e5be2a1e58434144a5f99e0 (diff) |
Merge branch 'linux-linaro-lsk-v4.4' into linux-linaro-lsk-v4.4-android
Diffstat (limited to 'net')
-rw-r--r-- | net/can/bcm.c | 23 | ||||
-rw-r--r-- | net/sunrpc/auth_gss/gss_rpc_xdr.c | 2 |
2 files changed, 17 insertions, 8 deletions
diff --git a/net/can/bcm.c b/net/can/bcm.c index 8ef1afacad82..24d66c1cc0cd 100644 --- a/net/can/bcm.c +++ b/net/can/bcm.c @@ -710,14 +710,23 @@ static struct bcm_op *bcm_find_op(struct list_head *ops, canid_t can_id, static void bcm_remove_op(struct bcm_op *op) { - hrtimer_cancel(&op->timer); - hrtimer_cancel(&op->thrtimer); - - if (op->tsklet.func) - tasklet_kill(&op->tsklet); + if (op->tsklet.func) { + while (test_bit(TASKLET_STATE_SCHED, &op->tsklet.state) || + test_bit(TASKLET_STATE_RUN, &op->tsklet.state) || + hrtimer_active(&op->timer)) { + hrtimer_cancel(&op->timer); + tasklet_kill(&op->tsklet); + } + } - if (op->thrtsklet.func) - tasklet_kill(&op->thrtsklet); + if (op->thrtsklet.func) { + while (test_bit(TASKLET_STATE_SCHED, &op->thrtsklet.state) || + test_bit(TASKLET_STATE_RUN, &op->thrtsklet.state) || + hrtimer_active(&op->thrtimer)) { + hrtimer_cancel(&op->thrtimer); + tasklet_kill(&op->thrtsklet); + } + } if ((op->frames) && (op->frames != &op->sframe)) kfree(op->frames); diff --git a/net/sunrpc/auth_gss/gss_rpc_xdr.c b/net/sunrpc/auth_gss/gss_rpc_xdr.c index eeeba5adee6d..2410d557ae39 100644 --- a/net/sunrpc/auth_gss/gss_rpc_xdr.c +++ b/net/sunrpc/auth_gss/gss_rpc_xdr.c @@ -260,7 +260,7 @@ static int gssx_dec_option_array(struct xdr_stream *xdr, if (!oa->data) return -ENOMEM; - creds = kmalloc(sizeof(struct svc_cred), GFP_KERNEL); + creds = kzalloc(sizeof(struct svc_cred), GFP_KERNEL); if (!creds) { kfree(oa->data); return -ENOMEM; |