Skip to content

Commit

Permalink
Version 1.7.3_20190220-1449 released
Browse files Browse the repository at this point in the history
Based on TAG LA.UM.6.2.r1-08900-sdm660.0 from CAF.
  • Loading branch information
Jenkins committed Feb 25, 2019
1 parent 49677b7 commit 23aef8f
Show file tree
Hide file tree
Showing 4 changed files with 62 additions and 52 deletions.
16 changes: 12 additions & 4 deletions drivers/media/platform/msm/vidc/venus_hfi.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* Copyright (c) 2012-2017, The Linux Foundation. All rights reserved.
/* Copyright (c) 2012-2018, The Linux Foundation. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 and
Expand Down Expand Up @@ -1652,7 +1652,7 @@ static int __iface_cmdq_write_relaxed(struct venus_hfi_device *device,
__strict_check(device);

if (!__core_in_valid_state(device)) {
dprintk(VIDC_DBG, "%s - fw not in init state\n", __func__);
dprintk(VIDC_ERR, "%s - fw not in init state\n", __func__);
result = -EINVAL;
goto err_q_null;
}
Expand Down Expand Up @@ -3378,8 +3378,6 @@ static void __process_sys_error(struct venus_hfi_device *device)
{
struct hfi_sfr_struct *vsfr = NULL;

__set_state(device, VENUS_STATE_DEINIT);

/* Once SYS_ERROR received from HW, it is safe to halt the AXI.
* With SYS_ERROR, Venus FW may have crashed and HW might be
* active and causing unnecessary transactions. Hence it is
Expand Down Expand Up @@ -3626,6 +3624,10 @@ static int __response_handler(struct venus_hfi_device *device)
"Too many packets in message queue to handle at once, deferring read\n");
break;
}

/* do not read packets after sys error packet */
if (info->response_type == HAL_SYS_ERROR)
break;
}

if (requeue_pm_work && device->res->sw_power_collapsible) {
Expand Down Expand Up @@ -3688,6 +3690,12 @@ static void venus_hfi_core_work_handler(struct work_struct *work)
i < num_responses; ++i) {
struct msm_vidc_cb_info *r = &device->response_pkt[i];

if (!__core_in_valid_state(device)) {
dprintk(VIDC_ERR,
"Ignore responses from %d to %d as device is in invalid state",
(i + 1), num_responses);
break;
}
device->callback(r->response_type, &r->response);
}

Expand Down
3 changes: 2 additions & 1 deletion drivers/media/usb/em28xx/em28xx-dvb.c
Original file line number Diff line number Diff line change
Expand Up @@ -1806,6 +1806,8 @@ static int em28xx_dvb_fini(struct em28xx *dev)
}
}

em28xx_unregister_dvb(dvb);

/* remove I2C SEC */
client = dvb->i2c_client_sec;
if (client) {
Expand All @@ -1827,7 +1829,6 @@ static int em28xx_dvb_fini(struct em28xx *dev)
i2c_unregister_device(client);
}

em28xx_unregister_dvb(dvb);
kfree(dvb);
dev->dvb = NULL;
kref_put(&dev->ref, em28xx_free_device);
Expand Down
9 changes: 8 additions & 1 deletion fs/jbd2/transaction.c
Original file line number Diff line number Diff line change
Expand Up @@ -1362,6 +1362,13 @@ int jbd2_journal_dirty_metadata(handle_t *handle, struct buffer_head *bh)
if (jh->b_transaction == transaction &&
jh->b_jlist != BJ_Metadata) {
jbd_lock_bh_state(bh);
if (jh->b_transaction == transaction &&
jh->b_jlist != BJ_Metadata)
pr_err("JBD2: assertion failure: h_type=%u "
"h_line_no=%u block_no=%llu jlist=%u\n",
handle->h_type, handle->h_line_no,
(unsigned long long) bh->b_blocknr,
jh->b_jlist);
J_ASSERT_JH(jh, jh->b_transaction != transaction ||
jh->b_jlist == BJ_Metadata);
jbd_unlock_bh_state(bh);
Expand All @@ -1381,11 +1388,11 @@ int jbd2_journal_dirty_metadata(handle_t *handle, struct buffer_head *bh)
* of the transaction. This needs to be done
* once a transaction -bzzz
*/
jh->b_modified = 1;
if (handle->h_buffer_credits <= 0) {
ret = -ENOSPC;
goto out_unlock_bh;
}
jh->b_modified = 1;
handle->h_buffer_credits--;
}

Expand Down
86 changes: 40 additions & 46 deletions net/key/af_key.c
Original file line number Diff line number Diff line change
Expand Up @@ -187,30 +187,22 @@ static int pfkey_release(struct socket *sock)
return 0;
}

static int pfkey_broadcast_one(struct sk_buff *skb, struct sk_buff **skb2,
gfp_t allocation, struct sock *sk)
static int pfkey_broadcast_one(struct sk_buff *skb, gfp_t allocation,
struct sock *sk)
{
int err = -ENOBUFS;

sock_hold(sk);
if (*skb2 == NULL) {
if (atomic_read(&skb->users) != 1) {
*skb2 = skb_clone(skb, allocation);
} else {
*skb2 = skb;
atomic_inc(&skb->users);
}
}
if (*skb2 != NULL) {
if (atomic_read(&sk->sk_rmem_alloc) <= sk->sk_rcvbuf) {
skb_set_owner_r(*skb2, sk);
skb_queue_tail(&sk->sk_receive_queue, *skb2);
sk->sk_data_ready(sk);
*skb2 = NULL;
err = 0;
}
if (atomic_read(&sk->sk_rmem_alloc) > sk->sk_rcvbuf)
return err;

skb = skb_clone(skb, allocation);

if (skb) {
skb_set_owner_r(skb, sk);
skb_queue_tail(&sk->sk_receive_queue, skb);
sk->sk_data_ready(sk);
err = 0;
}
sock_put(sk);
return err;
}

Expand All @@ -219,13 +211,12 @@ static int pfkey_broadcast_one(struct sk_buff *skb, struct sk_buff **skb2,
#define BROADCAST_ONE 1
#define BROADCAST_REGISTERED 2
#define BROADCAST_PROMISC_ONLY 4
static int pfkey_broadcast(struct sk_buff *skb,
static int pfkey_broadcast(struct sk_buff *skb, gfp_t allocation,
int broadcast_flags, struct sock *one_sk,
struct net *net)
{
struct netns_pfkey *net_pfkey = net_generic(net, pfkey_net_id);
struct sock *sk;
struct sk_buff *skb2 = NULL;
int err = -ESRCH;

/* XXX Do we need something like netlink_overrun? I think
Expand All @@ -244,7 +235,7 @@ static int pfkey_broadcast(struct sk_buff *skb,
* socket.
*/
if (pfk->promisc)
pfkey_broadcast_one(skb, &skb2, GFP_ATOMIC, sk);
pfkey_broadcast_one(skb, GFP_ATOMIC, sk);

/* the exact target will be processed later */
if (sk == one_sk)
Expand All @@ -259,7 +250,7 @@ static int pfkey_broadcast(struct sk_buff *skb,
continue;
}

err2 = pfkey_broadcast_one(skb, &skb2, GFP_ATOMIC, sk);
err2 = pfkey_broadcast_one(skb, GFP_ATOMIC, sk);

/* Error is cleared after successful sending to at least one
* registered KM */
Expand All @@ -269,9 +260,8 @@ static int pfkey_broadcast(struct sk_buff *skb,
rcu_read_unlock();

if (one_sk != NULL)
err = pfkey_broadcast_one(skb, &skb2, GFP_KERNEL, one_sk);
err = pfkey_broadcast_one(skb, allocation, one_sk);

kfree_skb(skb2);
kfree_skb(skb);
return err;
}
Expand All @@ -292,7 +282,7 @@ static int pfkey_do_dump(struct pfkey_sock *pfk)
hdr = (struct sadb_msg *) pfk->dump.skb->data;
hdr->sadb_msg_seq = 0;
hdr->sadb_msg_errno = rc;
pfkey_broadcast(pfk->dump.skb, BROADCAST_ONE,
pfkey_broadcast(pfk->dump.skb, GFP_ATOMIC, BROADCAST_ONE,
&pfk->sk, sock_net(&pfk->sk));
pfk->dump.skb = NULL;
}
Expand Down Expand Up @@ -333,7 +323,7 @@ static int pfkey_error(const struct sadb_msg *orig, int err, struct sock *sk)
hdr->sadb_msg_len = (sizeof(struct sadb_msg) /
sizeof(uint64_t));

pfkey_broadcast(skb, BROADCAST_ONE, sk, sock_net(sk));
pfkey_broadcast(skb, GFP_KERNEL, BROADCAST_ONE, sk, sock_net(sk));

return 0;
}
Expand Down Expand Up @@ -1374,7 +1364,7 @@ static int pfkey_getspi(struct sock *sk, struct sk_buff *skb, const struct sadb_

xfrm_state_put(x);

pfkey_broadcast(resp_skb, BROADCAST_ONE, sk, net);
pfkey_broadcast(resp_skb, GFP_KERNEL, BROADCAST_ONE, sk, net);

return 0;
}
Expand Down Expand Up @@ -1461,7 +1451,7 @@ static int key_notify_sa(struct xfrm_state *x, const struct km_event *c)
hdr->sadb_msg_seq = c->seq;
hdr->sadb_msg_pid = c->portid;

pfkey_broadcast(skb, BROADCAST_ALL, NULL, xs_net(x));
pfkey_broadcast(skb, GFP_ATOMIC, BROADCAST_ALL, NULL, xs_net(x));

return 0;
}
Expand Down Expand Up @@ -1574,7 +1564,7 @@ static int pfkey_get(struct sock *sk, struct sk_buff *skb, const struct sadb_msg
out_hdr->sadb_msg_reserved = 0;
out_hdr->sadb_msg_seq = hdr->sadb_msg_seq;
out_hdr->sadb_msg_pid = hdr->sadb_msg_pid;
pfkey_broadcast(out_skb, BROADCAST_ONE, sk, sock_net(sk));
pfkey_broadcast(out_skb, GFP_ATOMIC, BROADCAST_ONE, sk, sock_net(sk));

return 0;
}
Expand Down Expand Up @@ -1679,8 +1669,8 @@ static int pfkey_register(struct sock *sk, struct sk_buff *skb, const struct sad
return -ENOBUFS;
}

pfkey_broadcast(supp_skb, BROADCAST_REGISTERED, sk, sock_net(sk));

pfkey_broadcast(supp_skb, GFP_KERNEL, BROADCAST_REGISTERED, sk,
sock_net(sk));
return 0;
}

Expand All @@ -1698,7 +1688,8 @@ static int unicast_flush_resp(struct sock *sk, const struct sadb_msg *ihdr)
hdr->sadb_msg_errno = (uint8_t) 0;
hdr->sadb_msg_len = (sizeof(struct sadb_msg) / sizeof(uint64_t));

return pfkey_broadcast(skb, BROADCAST_ONE, sk, sock_net(sk));
return pfkey_broadcast(skb, GFP_ATOMIC, BROADCAST_ONE, sk,
sock_net(sk));
}

static int key_notify_sa_flush(const struct km_event *c)
Expand All @@ -1719,7 +1710,7 @@ static int key_notify_sa_flush(const struct km_event *c)
hdr->sadb_msg_len = (sizeof(struct sadb_msg) / sizeof(uint64_t));
hdr->sadb_msg_reserved = 0;

pfkey_broadcast(skb, BROADCAST_ALL, NULL, c->net);
pfkey_broadcast(skb, GFP_ATOMIC, BROADCAST_ALL, NULL, c->net);

return 0;
}
Expand Down Expand Up @@ -1776,7 +1767,7 @@ static int dump_sa(struct xfrm_state *x, int count, void *ptr)
out_hdr->sadb_msg_pid = pfk->dump.msg_portid;

if (pfk->dump.skb)
pfkey_broadcast(pfk->dump.skb, BROADCAST_ONE,
pfkey_broadcast(pfk->dump.skb, GFP_ATOMIC, BROADCAST_ONE,
&pfk->sk, sock_net(&pfk->sk));
pfk->dump.skb = out_skb;

Expand Down Expand Up @@ -1856,7 +1847,7 @@ static int pfkey_promisc(struct sock *sk, struct sk_buff *skb, const struct sadb
new_hdr->sadb_msg_errno = 0;
}

pfkey_broadcast(skb, BROADCAST_ALL, NULL, sock_net(sk));
pfkey_broadcast(skb, GFP_KERNEL, BROADCAST_ALL, NULL, sock_net(sk));
return 0;
}

Expand Down Expand Up @@ -2190,7 +2181,7 @@ static int key_notify_policy(struct xfrm_policy *xp, int dir, const struct km_ev
out_hdr->sadb_msg_errno = 0;
out_hdr->sadb_msg_seq = c->seq;
out_hdr->sadb_msg_pid = c->portid;
pfkey_broadcast(out_skb, BROADCAST_ALL, NULL, xp_net(xp));
pfkey_broadcast(out_skb, GFP_ATOMIC, BROADCAST_ALL, NULL, xp_net(xp));
return 0;

}
Expand Down Expand Up @@ -2410,7 +2401,7 @@ static int key_pol_get_resp(struct sock *sk, struct xfrm_policy *xp, const struc
out_hdr->sadb_msg_errno = 0;
out_hdr->sadb_msg_seq = hdr->sadb_msg_seq;
out_hdr->sadb_msg_pid = hdr->sadb_msg_pid;
pfkey_broadcast(out_skb, BROADCAST_ONE, sk, xp_net(xp));
pfkey_broadcast(out_skb, GFP_ATOMIC, BROADCAST_ONE, sk, xp_net(xp));
err = 0;

out:
Expand Down Expand Up @@ -2664,7 +2655,7 @@ static int dump_sp(struct xfrm_policy *xp, int dir, int count, void *ptr)
out_hdr->sadb_msg_pid = pfk->dump.msg_portid;

if (pfk->dump.skb)
pfkey_broadcast(pfk->dump.skb, BROADCAST_ONE,
pfkey_broadcast(pfk->dump.skb, GFP_ATOMIC, BROADCAST_ONE,
&pfk->sk, sock_net(&pfk->sk));
pfk->dump.skb = out_skb;

Expand Down Expand Up @@ -2717,7 +2708,7 @@ static int key_notify_policy_flush(const struct km_event *c)
hdr->sadb_msg_satype = SADB_SATYPE_UNSPEC;
hdr->sadb_msg_len = (sizeof(struct sadb_msg) / sizeof(uint64_t));
hdr->sadb_msg_reserved = 0;
pfkey_broadcast(skb_out, BROADCAST_ALL, NULL, c->net);
pfkey_broadcast(skb_out, GFP_ATOMIC, BROADCAST_ALL, NULL, c->net);
return 0;

}
Expand Down Expand Up @@ -2779,7 +2770,7 @@ static int pfkey_process(struct sock *sk, struct sk_buff *skb, const struct sadb
void *ext_hdrs[SADB_EXT_MAX];
int err;

pfkey_broadcast(skb_clone(skb, GFP_KERNEL),
pfkey_broadcast(skb_clone(skb, GFP_KERNEL), GFP_KERNEL,
BROADCAST_PROMISC_ONLY, NULL, sock_net(sk));

memset(ext_hdrs, 0, sizeof(ext_hdrs));
Expand Down Expand Up @@ -3001,7 +2992,8 @@ static int key_notify_sa_expire(struct xfrm_state *x, const struct km_event *c)
out_hdr->sadb_msg_seq = 0;
out_hdr->sadb_msg_pid = 0;

pfkey_broadcast(out_skb, BROADCAST_REGISTERED, NULL, xs_net(x));
pfkey_broadcast(out_skb, GFP_ATOMIC, BROADCAST_REGISTERED, NULL,
xs_net(x));
return 0;
}

Expand Down Expand Up @@ -3191,7 +3183,8 @@ static int pfkey_send_acquire(struct xfrm_state *x, struct xfrm_tmpl *t, struct
xfrm_ctx->ctx_len);
}

return pfkey_broadcast(skb, BROADCAST_REGISTERED, NULL, xs_net(x));
return pfkey_broadcast(skb, GFP_ATOMIC, BROADCAST_REGISTERED, NULL,
xs_net(x));
}

static struct xfrm_policy *pfkey_compile_policy(struct sock *sk, int opt,
Expand Down Expand Up @@ -3389,7 +3382,8 @@ static int pfkey_send_new_mapping(struct xfrm_state *x, xfrm_address_t *ipaddr,
n_port->sadb_x_nat_t_port_port = sport;
n_port->sadb_x_nat_t_port_reserved = 0;

return pfkey_broadcast(skb, BROADCAST_REGISTERED, NULL, xs_net(x));
return pfkey_broadcast(skb, GFP_ATOMIC, BROADCAST_REGISTERED, NULL,
xs_net(x));
}

#ifdef CONFIG_NET_KEY_MIGRATE
Expand Down Expand Up @@ -3581,7 +3575,7 @@ static int pfkey_send_migrate(const struct xfrm_selector *sel, u8 dir, u8 type,
}

/* broadcast migrate message to sockets */
pfkey_broadcast(skb, BROADCAST_ALL, NULL, &init_net);
pfkey_broadcast(skb, GFP_ATOMIC, BROADCAST_ALL, NULL, &init_net);

return 0;

Expand Down

0 comments on commit 23aef8f

Please sign in to comment.