cve_id stringlengths 13 16 | repo stringclasses 12
values | repo_url stringclasses 10
values | file_path stringlengths 7 62 | function_name stringlengths 4 52 | pa stringlengths 50 341k | pb stringlengths 33 341k | px stringlengths 50 338k | py stringlengths 33 338k | pa_sliced stringlengths 31 44.3k | pb_sliced stringlengths 31 44.6k | px_sliced stringlengths 51 45.8k | py_sliced stringlengths 33 46.9k | patch_sliced stringlengths 0 46.8k |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
CVE-2021-47008 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | arch/x86/kvm/svm/sev.c | sev_vcpu_deliver_sipi_vector | void sev_vcpu_deliver_sipi_vector(struct kvm_vcpu *vcpu, u8 vector) {
struct vcpu_svm *svm = to_svm(vcpu);
if (!svm->received_first_sipi) {
svm->received_first_sipi = true;
return;
}
ghcb_set_sw_exit_info_2(svm->ghcb, 1);
} | void sev_vcpu_deliver_sipi_vector(struct kvm_vcpu *vcpu, u8 vector) {
struct vcpu_svm *svm = to_svm(vcpu);
if (!svm->received_first_sipi) {
svm->received_first_sipi = true;
return;
}
if (!svm->ghcb) {
return;
}
ghcb_set_sw_exit_info_2(svm->ghcb, 1);
} | void sev_vcpu_deliver_sipi_vector(struct kvm_vcpu *vcpu, u8 vector) {
struct vcpu_svm *svm = to_svm(vcpu);
if (!svm->received_first_sipi) {
svm->received_first_sipi = true;
return;
}
ghcb_set_sw_exit_info_2(svm->ghcb, 1);
} | void sev_vcpu_deliver_sipi_vector(struct kvm_vcpu *vcpu, u8 vector) {
struct vcpu_svm *svm = to_svm(vcpu);
if (!svm->received_first_sipi) {
svm->received_first_sipi = true;
return;
}
if (!svm->ghcb) {
return;
}
ghcb_set_sw_exit_info_2(svm->ghcb, 1);
} | void sev_vcpu_deliver_sipi_vector(struct kvm_vcpu *vcpu, u8 vector) {
struct vcpu_svm *svm = to_svm(vcpu);
if (!svm->received_first_sipi) {
svm->received_first_sipi = true;
return;
}
ghcb_set_sw_exit_info_2(svm->ghcb, 1);
}
| void sev_vcpu_deliver_sipi_vector(struct kvm_vcpu *vcpu, u8 vector) {
struct vcpu_svm *svm = to_svm(vcpu);
if (!svm->received_first_sipi) {
svm->received_first_sipi = true;
return;
}
if (!svm->ghcb) {
return;
}
ghcb_set_sw_exit_info_2(svm->ghcb, 1);
}
| void sev_vcpu_deliver_sipi_vector(struct kvm_vcpu *vcpu, u8 vector) {
struct vcpu_svm *svm = to_svm(vcpu);
if (!svm->received_first_sipi) {
svm->received_first_sipi = true;
return;
}
ghcb_set_sw_exit_info_2(svm->ghcb, 1);
}
| void sev_vcpu_deliver_sipi_vector(struct kvm_vcpu *vcpu, u8 vector) {
struct vcpu_svm *svm = to_svm(vcpu);
if (!svm->received_first_sipi) {
svm->received_first_sipi = true;
return;
}
if (!svm->ghcb) {
return;
}
ghcb_set_sw_exit_info_2(svm->ghcb, 1);
} | void sev_vcpu_deliver_sipi_vector(struct kvm_vcpu *vcpu, u8 vector) {
struct vcpu_svm *svm = to_svm(vcpu);
if (!svm->received_first_sipi) {
svm->received_first_sipi = true;
return;
}
+ if (!svm->ghcb) {
+ return;
+ }
ghcb_set_sw_exit_info_2(svm->ghcb, 1);
} |
CVE-2021-47008 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | arch/x86/kvm/svm/svm.c | svm_complete_emulated_msr | static int svm_complete_emulated_msr(struct kvm_vcpu *vcpu, int err) {
struct vcpu_svm *svm = to_svm(vcpu);
if (!sev_es_guest(svm->vcpu.kvm) || !err) {
return kvm_complete_insn_gp(&svm->vcpu, err);
}
ghcb_set_sw_exit_info_1(svm->ghcb, 1);
ghcb_set_sw_exit_info_2(svm->ghcb, X86_TRAP_GP | SVM_... | static int svm_complete_emulated_msr(struct kvm_vcpu *vcpu, int err) {
struct vcpu_svm *svm = to_svm(vcpu);
if (!err || !sev_es_guest(vcpu->kvm) || WARN_ON_ONCE(!svm->ghcb)) {
return kvm_complete_insn_gp(&svm->vcpu, err);
}
ghcb_set_sw_exit_info_1(svm->ghcb, 1);
ghcb_set_sw_exit_info_2(svm->... | static int svm_complete_emulated_msr(struct kvm_vcpu *vcpu, int err) {
struct vcpu_svm *svm = to_svm(vcpu);
if (!sev_es_guest(svm->vcpu.kvm) || !err) {
return kvm_complete_insn_gp(&svm->vcpu, err);
}
ghcb_set_sw_exit_info_1(svm->ghcb, 1);
ghcb_set_sw_exit_info_2(svm->ghcb, X86_TRAP_GP | SVM_... | static int svm_complete_emulated_msr(struct kvm_vcpu *vcpu, int err) {
struct vcpu_svm *svm = to_svm(vcpu);
if (!err || !sev_es_guest(vcpu->kvm) || WARN_ON_ONCE(!svm->ghcb)) {
return kvm_complete_insn_gp(&svm->vcpu, err);
}
ghcb_set_sw_exit_info_1(svm->ghcb, 1);
ghcb_set_sw_exit_info_2(svm->... | static int svm_complete_emulated_msr(struct kvm_vcpu *vcpu, int err) {
struct vcpu_svm *svm = to_svm(vcpu);
if (!sev_es_guest(svm->vcpu.kvm) || !err) {
return kvm_complete_insn_gp(&svm->vcpu, err);
}
ghcb_set_sw_exit_info_1(svm->ghcb, 1);
ghcb_set_sw_exit_info_2(svm->ghcb, X86_TRAP_GP | SVM_... | static int svm_complete_emulated_msr(struct kvm_vcpu *vcpu, int err) {
struct vcpu_svm *svm = to_svm(vcpu);
if (!err || !sev_es_guest(vcpu->kvm) || WARN_ON_ONCE(!svm->ghcb)) {
return kvm_complete_insn_gp(&svm->vcpu, err);
}
ghcb_set_sw_exit_info_1(svm->ghcb, 1);
ghcb_set_sw_exit_info_2(svm->... | static int svm_complete_emulated_msr(struct kvm_vcpu *vcpu, int err) {
struct vcpu_svm *svm = to_svm(vcpu);
if (!sev_es_guest(svm->vcpu.kvm) || !err) {
return kvm_complete_insn_gp(&svm->vcpu, err);
}
ghcb_set_sw_exit_info_1(svm->ghcb, 1);
ghcb_set_sw_exit_info_2(svm->ghcb, X86_TRAP_GP | SVM_... | static int svm_complete_emulated_msr(struct kvm_vcpu *vcpu, int err) {
struct vcpu_svm *svm = to_svm(vcpu);
if (!err || !sev_es_guest(vcpu->kvm) || WARN_ON_ONCE(!svm->ghcb)) {
return kvm_complete_insn_gp(&svm->vcpu, err);
}
ghcb_set_sw_exit_info_1(svm->ghcb, 1);
ghcb_set_sw_exit_info_2(svm->... | static int svm_complete_emulated_msr(struct kvm_vcpu *vcpu, int err) {
struct vcpu_svm *svm = to_svm(vcpu);
- if (!sev_es_guest(svm->vcpu.kvm) || !err) {
+ if (!err || !sev_es_guest(vcpu->kvm) || WARN_ON_ONCE(!svm->ghcb)) {
return kvm_complete_insn_gp(&svm->vcpu, err);
}
ghcb_set_sw_exit_... |
CVE-2021-47010 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | net/ipv4/tcp_cong.c | tcp_set_default_congestion_control | int tcp_set_default_congestion_control(struct net *net, const char *name) {
struct tcp_congestion_ops *ca;
const struct tcp_congestion_ops *prev;
int ret;
rcu_read_lock();
ca = tcp_ca_find_autoload(net, name);
if (!ca) {
ret = -ENOENT;
} else if (!try_module_get(ca->owner)) {
... | int tcp_set_default_congestion_control(struct net *net, const char *name) {
struct tcp_congestion_ops *ca;
const struct tcp_congestion_ops *prev;
int ret;
rcu_read_lock();
ca = tcp_ca_find_autoload(net, name);
if (!ca) {
ret = -ENOENT;
} else if (!try_module_get(ca->owner)) {
... | int tcp_set_default_congestion_control(struct net *net, const char *name) {
struct tcp_congestion_ops *ca;
const struct tcp_congestion_ops *prev;
int ret;
rcu_read_lock();
ca = tcp_ca_find_autoload(net, name);
if (!ca) {
ret = -ENOENT;
} else if (!try_module_get(ca->owner)) {
... | int tcp_set_default_congestion_control(struct net *net, const char *name) {
struct tcp_congestion_ops *ca;
const struct tcp_congestion_ops *prev;
int ret;
rcu_read_lock();
ca = tcp_ca_find_autoload(net, name);
if (!ca) {
ret = -ENOENT;
} else if (!try_module_get(ca->owner)) {
... | int tcp_set_default_congestion_control(struct net *net, const char *name) {
ca = tcp_ca_find_autoload(net, name);
if (!ca) {
} else if (!try_module_get(ca->owner)) {
} else {
prev = xchg(&net->ipv4.tcp_congestion_control, ca);
if (prev) {
module_put(prev->owner);
}
... | int tcp_set_default_congestion_control(struct net *net, const char *name) {
ca = tcp_ca_find_autoload(net, name);
if (!ca) {
} else if (!try_module_get(ca->owner)) {
} else if (!net_eq(net, &init_net) && !(ca->flags & TCP_CONG_NON_RESTRICTED)) {
ret = -EPERM;
} else {
prev = xchg(&ne... | int tcp_set_default_congestion_control(struct net *net, const char *name) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
ca = tcp_ca_find_autoload(net, name);
if (!ca) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
} else if (!try_module_get(ca->owner)) {
/* PLACEHOLDER: DO NOT DELETE THIS COM... | int tcp_set_default_congestion_control(struct net *net, const char *name) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
ca = tcp_ca_find_autoload(net, name);
if (!ca) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
} else if (!try_module_get(ca->owner)) {
/* PLACEHOLDER: DO NOT DELETE THIS COM... | int tcp_set_default_congestion_control(struct net *net, const char *name) {
ca = tcp_ca_find_autoload(net, name);
if (!ca) {
} else if (!try_module_get(ca->owner)) {
+ } else if (!net_eq(net, &init_net) && !(ca->flags & TCP_CONG_NON_RESTRICTED)) {
+ ret = -EPERM;
} else {
prev = ... |
CVE-2021-47011 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | mm/memcontrol.c | drain_obj_stock | static void drain_obj_stock(struct memcg_stock_pcp *stock) {
struct obj_cgroup *old = stock->cached_objcg;
if (!old) {
return;
}
if (stock->nr_bytes) {
unsigned int nr_pages = stock->nr_bytes >> PAGE_SHIFT;
unsigned int nr_bytes = stock->nr_bytes & (PAGE_SIZE - 1);
if (nr... | static void drain_obj_stock(struct memcg_stock_pcp *stock) {
struct obj_cgroup *old = stock->cached_objcg;
if (!old) {
return;
}
if (stock->nr_bytes) {
unsigned int nr_pages = stock->nr_bytes >> PAGE_SHIFT;
unsigned int nr_bytes = stock->nr_bytes & (PAGE_SIZE - 1);
if (nr... | static void drain_obj_stock(struct memcg_stock_pcp *stock) {
struct obj_cgroup *old = stock->cached_objcg;
if (!old) {
return;
}
if (stock->nr_bytes) {
unsigned int nr_pages = stock->nr_bytes >> PAGE_SHIFT;
unsigned int nr_bytes = stock->nr_bytes & (PAGE_SIZE - 1);
if (nr... | static void drain_obj_stock(struct memcg_stock_pcp *stock) {
struct obj_cgroup *old = stock->cached_objcg;
if (!old) {
return;
}
if (stock->nr_bytes) {
unsigned int nr_pages = stock->nr_bytes >> PAGE_SHIFT;
unsigned int nr_bytes = stock->nr_bytes & (PAGE_SIZE - 1);
if (nr... | static void drain_obj_stock(struct memcg_stock_pcp *stock) {
struct obj_cgroup *old = stock->cached_objcg;
if (!old) {
return;
}
if (stock->nr_bytes) {
unsigned int nr_pages = stock->nr_bytes >> PAGE_SHIFT;
if (nr_pages) {
rcu_read_lock();
__memcg_kmem_unc... | static void drain_obj_stock(struct memcg_stock_pcp *stock) {
struct obj_cgroup *old = stock->cached_objcg;
if (!old) {
return;
}
if (stock->nr_bytes) {
unsigned int nr_pages = stock->nr_bytes >> PAGE_SHIFT;
if (nr_pages) {
struct mem_cgroup *memcg;
rcu_rea... | static void drain_obj_stock(struct memcg_stock_pcp *stock) {
struct obj_cgroup *old = stock->cached_objcg;
if (!old) {
return;
}
if (stock->nr_bytes) {
unsigned int nr_pages = stock->nr_bytes >> PAGE_SHIFT;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (nr_pages) {
... | static void drain_obj_stock(struct memcg_stock_pcp *stock) {
struct obj_cgroup *old = stock->cached_objcg;
if (!old) {
return;
}
if (stock->nr_bytes) {
unsigned int nr_pages = stock->nr_bytes >> PAGE_SHIFT;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (nr_pages) {
... | static void drain_obj_stock(struct memcg_stock_pcp *stock) {
struct obj_cgroup *old = stock->cached_objcg;
if (!old) {
return;
}
if (stock->nr_bytes) {
unsigned int nr_pages = stock->nr_bytes >> PAGE_SHIFT;
if (nr_pages) {
+ struct mem_cgroup *memcg;
... |
CVE-2021-47012 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/infiniband/sw/siw/siw_mem.c | siw_mr_add_mem | int siw_mr_add_mem(struct siw_mr *mr, struct ib_pd *pd, void *mem_obj, u64 start, u64 len, int rights) {
struct siw_device *sdev = to_siw_dev(pd->device);
struct siw_mem *mem = kzalloc(sizeof(*mem), GFP_KERNEL);
struct xa_limit limit = XA_LIMIT(1, 0x00ffffff);
u32 id, next;
if (!mem) {
retur... | int siw_mr_add_mem(struct siw_mr *mr, struct ib_pd *pd, void *mem_obj, u64 start, u64 len, int rights) {
struct siw_device *sdev = to_siw_dev(pd->device);
struct siw_mem *mem = kzalloc(sizeof(*mem), GFP_KERNEL);
struct xa_limit limit = XA_LIMIT(1, 0x00ffffff);
u32 id, next;
if (!mem) {
retur... | int siw_mr_add_mem(struct siw_mr *mr, struct ib_pd *pd, void *mem_obj, u64 start, u64 len, int rights) {
struct siw_device *sdev = to_siw_dev(pd->device);
struct siw_mem *mem = kzalloc(sizeof(*mem), GFP_KERNEL);
struct xa_limit limit = XA_LIMIT(1, 0x00ffffff);
u32 id, next;
if (!mem) {
retur... | int siw_mr_add_mem(struct siw_mr *mr, struct ib_pd *pd, void *mem_obj, u64 start, u64 len, int rights) {
struct siw_device *sdev = to_siw_dev(pd->device);
struct siw_mem *mem = kzalloc(sizeof(*mem), GFP_KERNEL);
struct xa_limit limit = XA_LIMIT(1, 0x00ffffff);
u32 id, next;
if (!mem) {
retur... | int siw_mr_add_mem(struct siw_mr *mr, struct ib_pd *pd, void *mem_obj, u64 start, u64 len, int rights) {
struct siw_device *sdev = to_siw_dev(pd->device);
struct siw_mem *mem = kzalloc(sizeof(*mem), GFP_KERNEL);
struct xa_limit limit = XA_LIMIT(1, 0x00ffffff);
if (!mem) {
return -ENOMEM;
}
... | int siw_mr_add_mem(struct siw_mr *mr, struct ib_pd *pd, void *mem_obj, u64 start, u64 len, int rights) {
struct siw_device *sdev = to_siw_dev(pd->device);
struct siw_mem *mem = kzalloc(sizeof(*mem), GFP_KERNEL);
struct xa_limit limit = XA_LIMIT(1, 0x00ffffff);
if (!mem) {
return -ENOMEM;
}
... | int siw_mr_add_mem(struct siw_mr *mr, struct ib_pd *pd, void *mem_obj, u64 start, u64 len, int rights) {
struct siw_device *sdev = to_siw_dev(pd->device);
struct siw_mem *mem = kzalloc(sizeof(*mem), GFP_KERNEL);
struct xa_limit limit = XA_LIMIT(1, 0x00ffffff);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT ... | int siw_mr_add_mem(struct siw_mr *mr, struct ib_pd *pd, void *mem_obj, u64 start, u64 len, int rights) {
struct siw_device *sdev = to_siw_dev(pd->device);
struct siw_mem *mem = kzalloc(sizeof(*mem), GFP_KERNEL);
struct xa_limit limit = XA_LIMIT(1, 0x00ffffff);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT ... | int siw_mr_add_mem(struct siw_mr *mr, struct ib_pd *pd, void *mem_obj, u64 start, u64 len, int rights) {
struct siw_device *sdev = to_siw_dev(pd->device);
struct siw_mem *mem = kzalloc(sizeof(*mem), GFP_KERNEL);
struct xa_limit limit = XA_LIMIT(1, 0x00ffffff);
if (!mem) {
return -ENOMEM;
... |
CVE-2021-47013 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/net/ethernet/qualcomm/emac/emac-mac.c | emac_mac_tx_buf_send | int emac_mac_tx_buf_send(struct emac_adapter *adpt, struct emac_tx_queue *tx_q, struct sk_buff *skb) {
struct emac_tpd tpd;
u32 prod_idx;
memset(&tpd, 0, sizeof(tpd));
if (emac_tso_csum(adpt, tx_q, skb, &tpd) != 0) {
dev_kfree_skb_any(skb);
return NETDEV_TX_OK;
}
if (skb_vlan_tag... | int emac_mac_tx_buf_send(struct emac_adapter *adpt, struct emac_tx_queue *tx_q, struct sk_buff *skb) {
struct emac_tpd tpd;
u32 prod_idx;
int len;
memset(&tpd, 0, sizeof(tpd));
if (emac_tso_csum(adpt, tx_q, skb, &tpd) != 0) {
dev_kfree_skb_any(skb);
return NETDEV_TX_OK;
}
if ... | int emac_mac_tx_buf_send(struct emac_adapter *adpt, struct emac_tx_queue *tx_q, struct sk_buff *skb) {
struct emac_tpd tpd;
u32 prod_idx;
memset(&tpd, 0, sizeof(tpd));
if (emac_tso_csum(adpt, tx_q, skb, &tpd) != 0) {
dev_kfree_skb_any(skb);
return NETDEV_TX_OK;
}
if (skb_vlan_tag... | int emac_mac_tx_buf_send(struct emac_adapter *adpt, struct emac_tx_queue *tx_q, struct sk_buff *skb) {
struct emac_tpd tpd;
u32 prod_idx;
int len;
memset(&tpd, 0, sizeof(tpd));
if (emac_tso_csum(adpt, tx_q, skb, &tpd) != 0) {
dev_kfree_skb_any(skb);
return NETDEV_TX_OK;
}
if ... | int emac_mac_tx_buf_send(struct emac_adapter *adpt, struct emac_tx_queue *tx_q, struct sk_buff *skb) {
u32 prod_idx;
memset(&tpd, 0, sizeof(tpd));
if (emac_tso_csum(adpt, tx_q, skb, &tpd) != 0) {
return NETDEV_TX_OK;
}
if (skb_vlan_tag_present(skb)) {
EMAC_VLAN_TO_TAG(skb_vlan_tag_ge... | int emac_mac_tx_buf_send(struct emac_adapter *adpt, struct emac_tx_queue *tx_q, struct sk_buff *skb) {
u32 prod_idx;
int len;
memset(&tpd, 0, sizeof(tpd));
if (emac_tso_csum(adpt, tx_q, skb, &tpd) != 0) {
return NETDEV_TX_OK;
}
if (skb_vlan_tag_present(skb)) {
EMAC_VLAN_TO_TAG(sk... | int emac_mac_tx_buf_send(struct emac_adapter *adpt, struct emac_tx_queue *tx_q, struct sk_buff *skb) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
u32 prod_idx;
memset(&tpd, 0, sizeof(tpd));
if (emac_tso_csum(adpt, tx_q, skb, &tpd) != 0) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
retu... | int emac_mac_tx_buf_send(struct emac_adapter *adpt, struct emac_tx_queue *tx_q, struct sk_buff *skb) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
u32 prod_idx;
int len;
memset(&tpd, 0, sizeof(tpd));
if (emac_tso_csum(adpt, tx_q, skb, &tpd) != 0) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */... | int emac_mac_tx_buf_send(struct emac_adapter *adpt, struct emac_tx_queue *tx_q, struct sk_buff *skb) {
u32 prod_idx;
+ int len;
memset(&tpd, 0, sizeof(tpd));
if (emac_tso_csum(adpt, tx_q, skb, &tpd) != 0) {
return NETDEV_TX_OK;
}
if (skb_vlan_tag_present(skb)) {
EMAC_VLAN_... |
CVE-2021-47015 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/net/ethernet/broadcom/bnxt/bnxt.c | bnxt_rx_pkt | static int bnxt_rx_pkt(struct bnxt *bp, struct bnxt_cp_ring_info *cpr, u32 *raw_cons, u8 *event) {
struct bnxt_napi *bnapi = cpr->bnapi;
struct bnxt_rx_ring_info *rxr = bnapi->rx_ring;
struct net_device *dev = bp->dev;
struct rx_cmp *rxcmp;
struct rx_cmp_ext *rxcmp1;
u32 tmp_raw_cons = *raw_cons... | static int bnxt_rx_pkt(struct bnxt *bp, struct bnxt_cp_ring_info *cpr, u32 *raw_cons, u8 *event) {
struct bnxt_napi *bnapi = cpr->bnapi;
struct bnxt_rx_ring_info *rxr = bnapi->rx_ring;
struct net_device *dev = bp->dev;
struct rx_cmp *rxcmp;
struct rx_cmp_ext *rxcmp1;
u32 tmp_raw_cons = *raw_cons... | static int bnxt_rx_pkt(struct bnxt *bp, struct bnxt_cp_ring_info *cpr, u32 *raw_cons, u8 *event) {
struct bnxt_napi *bnapi = cpr->bnapi;
struct bnxt_rx_ring_info *rxr = bnapi->rx_ring;
struct net_device *dev = bp->dev;
struct rx_cmp *rxcmp;
struct rx_cmp_ext *rxcmp1;
u32 tmp_raw_cons = *raw_cons... | static int bnxt_rx_pkt(struct bnxt *bp, struct bnxt_cp_ring_info *cpr, u32 *raw_cons, u8 *event) {
struct bnxt_napi *bnapi = cpr->bnapi;
struct bnxt_rx_ring_info *rxr = bnapi->rx_ring;
struct net_device *dev = bp->dev;
struct rx_cmp *rxcmp;
struct rx_cmp_ext *rxcmp1;
u32 tmp_raw_cons = *raw_cons... | static int bnxt_rx_pkt(struct bnxt *bp, struct bnxt_cp_ring_info *cpr, u32 *raw_cons, u8 *event) {
u32 tmp_raw_cons = *raw_cons;
u16 cfa_code, cons, prod, cp_cons = RG_CMP(tmp_raw_cons);
rxcmp = (struct rx_cmp *)
&cpr->cp_desc_ring[CP_RG(cp_cons)][CP_IDX(cp_cons)];
cmp_type = RX_CMP_TYPE(rxc... | static int bnxt_rx_pkt(struct bnxt *bp, struct bnxt_cp_ring_info *cpr, u32 *raw_cons, u8 *event) {
u32 tmp_raw_cons = *raw_cons;
u16 cfa_code, cons, prod, cp_cons = RG_CMP(tmp_raw_cons);
rxcmp = (struct rx_cmp *)
&cpr->cp_desc_ring[CP_RG(cp_cons)][CP_IDX(cp_cons)];
cmp_type = RX_CMP_TYPE(rxc... | static int bnxt_rx_pkt(struct bnxt *bp, struct bnxt_cp_ring_info *cpr, u32 *raw_cons, u8 *event) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
u32 tmp_raw_cons = *raw_cons;
u16 cfa_code, cons, prod, cp_cons = RG_CMP(tmp_raw_cons);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
rxcmp = (struct rx_cm... | static int bnxt_rx_pkt(struct bnxt *bp, struct bnxt_cp_ring_info *cpr, u32 *raw_cons, u8 *event) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
u32 tmp_raw_cons = *raw_cons;
u16 cfa_code, cons, prod, cp_cons = RG_CMP(tmp_raw_cons);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
rxcmp = (struct rx_cm... | static int bnxt_rx_pkt(struct bnxt *bp, struct bnxt_cp_ring_info *cpr, u32 *raw_cons, u8 *event) {
u32 tmp_raw_cons = *raw_cons;
u16 cfa_code, cons, prod, cp_cons = RG_CMP(tmp_raw_cons);
rxcmp = (struct rx_cmp *)
&cpr->cp_desc_ring[CP_RG(cp_cons)][CP_IDX(cp_cons)];
cmp_type = RX_CMP_TY... |
CVE-2021-47016 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | arch/m68k/mvme147/config.c | mvme147_sched_init | void mvme147_sched_init (irq_handler_t timer_routine) {
if (request_irq(PCC_IRQ_TIMER1, mvme147_timer_int, IRQF_TIMER, "timer 1", timer_routine)) {
pr_err("Couldn't register timer interrupt\n");
}
m147_pcc->t1_preload = PCC_TIMER_PRELOAD;
m147_pcc->t1_cntrl = 0x0;
m147_pcc->t1_cntrl = 0x3;
... | void mvme147_sched_init (irq_handler_t timer_routine) {
if (request_irq(PCC_IRQ_TIMER1, mvme147_timer_int, IRQF_TIMER, "timer 1", timer_routine)) {
pr_err("Couldn't register timer interrupt\n");
}
m147_pcc->t1_preload = PCC_TIMER_PRELOAD;
m147_pcc->t1_cntrl = PCC_TIMER_CLR_OVF | PCC_TIMER_COC_EN... | void mvme147_sched_init (void) {
if (request_irq(PCC_IRQ_TIMER1, mvme147_timer_int, IRQF_TIMER, "timer 1", NULL)) {
pr_err("Couldn't register timer interrupt\n");
}
m147_pcc->t1_preload = PCC_TIMER_PRELOAD;
m147_pcc->t1_cntrl = 0x0;
m147_pcc->t1_cntrl = 0x3;
m147_pcc->t1_int_cntrl = PCC_... | void mvme147_sched_init (void) {
if (request_irq(PCC_IRQ_TIMER1, mvme147_timer_int, IRQF_TIMER, "timer 1", NULL)) {
pr_err("Couldn't register timer interrupt\n");
}
m147_pcc->t1_preload = PCC_TIMER_PRELOAD;
m147_pcc->t1_cntrl = PCC_TIMER_CLR_OVF | PCC_TIMER_COC_EN | PCC_TIMER_TIC_EN;
m147_pc... | void mvme147_sched_init (irq_handler_t timer_routine) {
if (request_irq(PCC_IRQ_TIMER1, mvme147_timer_int, IRQF_TIMER, "timer 1", timer_routine)) {
pr_err("Couldn't register timer interrupt\n");
}
m147_pcc->t1_preload = PCC_TIMER_PRELOAD;
m147_pcc->t1_cntrl = 0x0;
m147_pcc->t1_cntrl = 0x3;
... | void mvme147_sched_init (irq_handler_t timer_routine) {
if (request_irq(PCC_IRQ_TIMER1, mvme147_timer_int, IRQF_TIMER, "timer 1", timer_routine)) {
pr_err("Couldn't register timer interrupt\n");
}
m147_pcc->t1_preload = PCC_TIMER_PRELOAD;
m147_pcc->t1_cntrl = PCC_TIMER_CLR_OVF | PCC_TIMER_COC_EN... | void mvme147_sched_init (void) {
if (request_irq(PCC_IRQ_TIMER1, mvme147_timer_int, IRQF_TIMER, "timer 1", NULL)) {
pr_err("Couldn't register timer interrupt\n");
}
m147_pcc->t1_preload = PCC_TIMER_PRELOAD;
m147_pcc->t1_cntrl = 0x0;
m147_pcc->t1_cntrl = 0x3;
m147_pcc->t1_int_cntrl = PCC_... | void mvme147_sched_init (void) {
if (request_irq(PCC_IRQ_TIMER1, mvme147_timer_int, IRQF_TIMER, "timer 1", NULL)) {
pr_err("Couldn't register timer interrupt\n");
}
m147_pcc->t1_preload = PCC_TIMER_PRELOAD;
m147_pcc->t1_cntrl = PCC_TIMER_CLR_OVF | PCC_TIMER_COC_EN | PCC_TIMER_TIC_EN;
m147_pc... | void mvme147_sched_init (irq_handler_t timer_routine) {
if (request_irq(PCC_IRQ_TIMER1, mvme147_timer_int, IRQF_TIMER, "timer 1", timer_routine)) {
pr_err("Couldn't register timer interrupt\n");
}
m147_pcc->t1_preload = PCC_TIMER_PRELOAD;
- m147_pcc->t1_cntrl = 0x0;
- m147_pcc->t1_cntrl =... |
CVE-2021-47016 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | arch/m68k/mvme147/config.c | mvme147_timer_int | static irqreturn_t mvme147_timer_int (int irq, void *dev_id) {
irq_handler_t timer_routine = dev_id;
unsigned long flags;
local_irq_save(flags);
m147_pcc->t1_int_cntrl = PCC_TIMER_T_CLR;
m147_pcc->t1_cntrl = PCC_TIMER_CLR_OVF;
clk_total += PCC_TIMER_CYCLES;
timer_routine(0, NULL);
local_... | static irqreturn_t mvme147_timer_int (int irq, void *dev_id) {
irq_handler_t timer_routine = dev_id;
unsigned long flags;
local_irq_save(flags);
m147_pcc->t1_cntrl = PCC_TIMER_CLR_OVF | PCC_TIMER_COC_EN | PCC_TIMER_TIC_EN;
m147_pcc->t1_int_cntrl = PCC_T_ENAB | PCC_TIMER_T_CLR | PCC_LEVEL_TIMER1;
... | static irqreturn_t mvme147_timer_int (int irq, void *dev_id) {
unsigned long flags;
local_irq_save(flags);
m147_pcc->t1_int_cntrl = PCC_TIMER_T_CLR;
m147_pcc->t1_cntrl = PCC_TIMER_CLR_OVF;
clk_total += PCC_TIMER_CYCLES;
legacy_timer_tick(1);
local_irq_restore(flags);
return IRQ_HANDLED;
... | static irqreturn_t mvme147_timer_int (int irq, void *dev_id) {
unsigned long flags;
local_irq_save(flags);
m147_pcc->t1_cntrl = PCC_TIMER_CLR_OVF | PCC_TIMER_COC_EN | PCC_TIMER_TIC_EN;
m147_pcc->t1_int_cntrl = PCC_T_ENAB | PCC_TIMER_T_CLR | PCC_LEVEL_TIMER1;
clk_total += PCC_TIMER_CYCLES;
legacy... | static irqreturn_t mvme147_timer_int (int irq, void *dev_id) {
local_irq_save(flags);
m147_pcc->t1_int_cntrl = PCC_TIMER_T_CLR;
m147_pcc->t1_cntrl = PCC_TIMER_CLR_OVF;
clk_total += PCC_TIMER_CYCLES;
}
| static irqreturn_t mvme147_timer_int (int irq, void *dev_id) {
local_irq_save(flags);
m147_pcc->t1_cntrl = PCC_TIMER_CLR_OVF | PCC_TIMER_COC_EN | PCC_TIMER_TIC_EN;
m147_pcc->t1_int_cntrl = PCC_T_ENAB | PCC_TIMER_T_CLR | PCC_LEVEL_TIMER1;
clk_total += PCC_TIMER_CYCLES;
}
| static irqreturn_t mvme147_timer_int (int irq, void *dev_id) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
local_irq_save(flags);
m147_pcc->t1_int_cntrl = PCC_TIMER_T_CLR;
m147_pcc->t1_cntrl = PCC_TIMER_CLR_OVF;
clk_total += PCC_TIMER_CYCLES;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
}
| static irqreturn_t mvme147_timer_int (int irq, void *dev_id) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
local_irq_save(flags);
m147_pcc->t1_cntrl = PCC_TIMER_CLR_OVF | PCC_TIMER_COC_EN | PCC_TIMER_TIC_EN;
m147_pcc->t1_int_cntrl = PCC_T_ENAB | PCC_TIMER_T_CLR | PCC_LEVEL_TIMER1;
clk_total += PCC... | static irqreturn_t mvme147_timer_int (int irq, void *dev_id) {
local_irq_save(flags);
- m147_pcc->t1_int_cntrl = PCC_TIMER_T_CLR;
- m147_pcc->t1_cntrl = PCC_TIMER_CLR_OVF;
+ m147_pcc->t1_cntrl = PCC_TIMER_CLR_OVF | PCC_TIMER_COC_EN | PCC_TIMER_TIC_EN;
+ m147_pcc->t1_int_cntrl = PCC_T_ENAB | PCC_TIMER_... |
CVE-2021-47016 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | arch/m68k/mvme16x/config.c | mvme16x_sched_init | void mvme16x_sched_init (irq_handler_t timer_routine) {
uint16_t brdno = be16_to_cpu(mvme_bdid.brdno);
int irq;
out_be32(PCCTCNT1, 0);
out_be32(PCCTCMP1, PCC_TIMER_CYCLES);
out_8(PCCTOVR1, in_8(PCCTOVR1) | PCCTOVR1_TIC_EN | PCCTOVR1_COC_EN);
out_8(PCCTIC1, PCCTIC1_T_EN | 6);
if (request_irq(... | void mvme16x_sched_init (irq_handler_t timer_routine) {
uint16_t brdno = be16_to_cpu(mvme_bdid.brdno);
int irq;
if (request_irq(MVME16x_IRQ_TIMER, mvme16x_timer_int, IRQF_TIMER, "timer", timer_routine)) {
panic ("Couldn't register timer int");
}
out_be32(PCCTCNT1, 0);
out_be32(PCCTCMP1, ... | void mvme16x_sched_init(void) {
uint16_t brdno = be16_to_cpu(mvme_bdid.brdno);
int irq;
out_be32(PCCTCNT1, 0);
out_be32(PCCTCMP1, PCC_TIMER_CYCLES);
out_8(PCCTOVR1, in_8(PCCTOVR1) | PCCTOVR1_TIC_EN | PCCTOVR1_COC_EN);
out_8(PCCTIC1, PCCTIC1_T_EN | 6);
if (request_irq(MVME16x_IRQ_TIMER, mvme1... | void mvme16x_sched_init(void) {
uint16_t brdno = be16_to_cpu(mvme_bdid.brdno);
int irq;
if (request_irq(MVME16x_IRQ_TIMER, mvme16x_timer_int, IRQF_TIMER, "timer", NULL)) {
panic ("Couldn't register timer int");
}
out_be32(PCCTCNT1, 0);
out_be32(PCCTCMP1, PCC_TIMER_CYCLES);
out_8(PCCT... | void mvme16x_sched_init (irq_handler_t timer_routine) {
uint16_t brdno = be16_to_cpu(mvme_bdid.brdno);
int irq;
out_be32(PCCTCNT1, 0);
out_be32(PCCTCMP1, PCC_TIMER_CYCLES);
out_8(PCCTOVR1, in_8(PCCTOVR1) | PCCTOVR1_TIC_EN | PCCTOVR1_COC_EN);
out_8(PCCTIC1, PCCTIC1_T_EN | 6);
if (request_irq(... | void mvme16x_sched_init (irq_handler_t timer_routine) {
uint16_t brdno = be16_to_cpu(mvme_bdid.brdno);
int irq;
if (request_irq(MVME16x_IRQ_TIMER, mvme16x_timer_int, IRQF_TIMER, "timer", timer_routine)) {
panic ("Couldn't register timer int");
}
out_be32(PCCTCNT1, 0);
out_be32(PCCTCMP1, ... | void mvme16x_sched_init(void) {
uint16_t brdno = be16_to_cpu(mvme_bdid.brdno);
int irq;
out_be32(PCCTCNT1, 0);
out_be32(PCCTCMP1, PCC_TIMER_CYCLES);
out_8(PCCTOVR1, in_8(PCCTOVR1) | PCCTOVR1_TIC_EN | PCCTOVR1_COC_EN);
out_8(PCCTIC1, PCCTIC1_T_EN | 6);
if (request_irq(MVME16x_IRQ_TIMER, mvme1... | void mvme16x_sched_init(void) {
uint16_t brdno = be16_to_cpu(mvme_bdid.brdno);
int irq;
if (request_irq(MVME16x_IRQ_TIMER, mvme16x_timer_int, IRQF_TIMER, "timer", NULL)) {
panic ("Couldn't register timer int");
}
out_be32(PCCTCNT1, 0);
out_be32(PCCTCMP1, PCC_TIMER_CYCLES);
out_8(PCCT... | void mvme16x_sched_init (irq_handler_t timer_routine) {
uint16_t brdno = be16_to_cpu(mvme_bdid.brdno);
int irq;
- out_be32(PCCTCNT1, 0);
- out_be32(PCCTCMP1, PCC_TIMER_CYCLES);
- out_8(PCCTOVR1, in_8(PCCTOVR1) | PCCTOVR1_TIC_EN | PCCTOVR1_COC_EN);
- out_8(PCCTIC1, PCCTIC1_T_EN | 6);
if (requ... |
CVE-2021-47016 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | arch/m68k/mvme16x/config.c | mvme16x_timer_int | static irqreturn_t mvme16x_timer_int (int irq, void *dev_id) {
irq_handler_t timer_routine = dev_id;
unsigned long flags;
local_irq_save(flags);
out_8(PCCTIC1, in_8(PCCTIC1) | PCCTIC1_T_CLR);
out_8(PCCTOVR1, PCCTOVR1_OVR_CLR);
clk_total += PCC_TIMER_CYCLES;
timer_routine(0, NULL);
local_... | static irqreturn_t mvme16x_timer_int (int irq, void *dev_id) {
irq_handler_t timer_routine = dev_id;
unsigned long flags;
local_irq_save(flags);
out_8(PCCTOVR1, PCCTOVR1_OVR_CLR | PCCTOVR1_TIC_EN | PCCTOVR1_COC_EN);
out_8(PCCTIC1, PCCTIC1_T_EN | PCCTIC1_T_CLR | PCCTIC1_T_LEVEL);
clk_total += PCC... | static irqreturn_t mvme16x_timer_int (int irq, void *dev_id) {
unsigned long flags;
local_irq_save(flags);
out_8(PCCTIC1, in_8(PCCTIC1) | PCCTIC1_T_CLR);
out_8(PCCTOVR1, PCCTOVR1_OVR_CLR);
clk_total += PCC_TIMER_CYCLES;
legacy_timer_tick(1);
local_irq_restore(flags);
return IRQ_HANDLED;
... | static irqreturn_t mvme16x_timer_int (int irq, void *dev_id) {
unsigned long flags;
local_irq_save(flags);
out_8(PCCTOVR1, PCCTOVR1_OVR_CLR | PCCTOVR1_TIC_EN | PCCTOVR1_COC_EN);
out_8(PCCTIC1, PCCTIC1_T_EN | PCCTIC1_T_CLR | PCCTIC1_T_LEVEL);
clk_total += PCC_TIMER_CYCLES;
legacy_timer_tick(1);
... | static irqreturn_t mvme16x_timer_int (int irq, void *dev_id) {
local_irq_save(flags);
out_8(PCCTIC1, in_8(PCCTIC1) | PCCTIC1_T_CLR);
out_8(PCCTOVR1, PCCTOVR1_OVR_CLR);
clk_total += PCC_TIMER_CYCLES;
}
| static irqreturn_t mvme16x_timer_int (int irq, void *dev_id) {
local_irq_save(flags);
out_8(PCCTOVR1, PCCTOVR1_OVR_CLR | PCCTOVR1_TIC_EN | PCCTOVR1_COC_EN);
out_8(PCCTIC1, PCCTIC1_T_EN | PCCTIC1_T_CLR | PCCTIC1_T_LEVEL);
clk_total += PCC_TIMER_CYCLES;
}
| static irqreturn_t mvme16x_timer_int (int irq, void *dev_id) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
local_irq_save(flags);
out_8(PCCTIC1, in_8(PCCTIC1) | PCCTIC1_T_CLR);
out_8(PCCTOVR1, PCCTOVR1_OVR_CLR);
clk_total += PCC_TIMER_CYCLES;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
}
| static irqreturn_t mvme16x_timer_int (int irq, void *dev_id) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
local_irq_save(flags);
out_8(PCCTOVR1, PCCTOVR1_OVR_CLR | PCCTOVR1_TIC_EN | PCCTOVR1_COC_EN);
out_8(PCCTIC1, PCCTIC1_T_EN | PCCTIC1_T_CLR | PCCTIC1_T_LEVEL);
clk_total += PCC_TIMER_CYCLES;
... | static irqreturn_t mvme16x_timer_int (int irq, void *dev_id) {
local_irq_save(flags);
- out_8(PCCTIC1, in_8(PCCTIC1) | PCCTIC1_T_CLR);
- out_8(PCCTOVR1, PCCTOVR1_OVR_CLR);
+ out_8(PCCTOVR1, PCCTOVR1_OVR_CLR | PCCTOVR1_TIC_EN | PCCTOVR1_COC_EN);
+ out_8(PCCTIC1, PCCTIC1_T_EN | PCCTIC1_T_CLR | PCCTIC1_T... |
CVE-2021-47017 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/net/wireless/ath/ath10k/htc.c | ath10k_htc_send_bundle | static int ath10k_htc_send_bundle(struct ath10k_htc_ep *ep, struct sk_buff *bundle_skb, struct sk_buff_head *tx_save_head) {
struct ath10k_hif_sg_item sg_item;
struct ath10k_htc *htc = ep->htc;
struct ath10k *ar = htc->ar;
struct sk_buff *skb;
int ret, cn = 0;
unsigned int skb_len;
ath10k_db... | static int ath10k_htc_send_bundle(struct ath10k_htc_ep *ep, struct sk_buff *bundle_skb, struct sk_buff_head *tx_save_head) {
struct ath10k_hif_sg_item sg_item;
struct ath10k_htc *htc = ep->htc;
struct ath10k *ar = htc->ar;
struct sk_buff *skb;
int ret, cn = 0;
unsigned int skb_len;
ath10k_db... | static int ath10k_htc_send_bundle(struct ath10k_htc_ep *ep, struct sk_buff *bundle_skb, struct sk_buff_head *tx_save_head) {
struct ath10k_hif_sg_item sg_item;
struct ath10k_htc *htc = ep->htc;
struct ath10k *ar = htc->ar;
struct sk_buff *skb;
int ret, cn = 0;
unsigned int skb_len;
ath10k_db... | static int ath10k_htc_send_bundle(struct ath10k_htc_ep *ep, struct sk_buff *bundle_skb, struct sk_buff_head *tx_save_head) {
struct ath10k_hif_sg_item sg_item;
struct ath10k_htc *htc = ep->htc;
struct ath10k *ar = htc->ar;
struct sk_buff *skb;
int ret, cn = 0;
unsigned int skb_len;
ath10k_db... | static int ath10k_htc_send_bundle(struct ath10k_htc_ep *ep, struct sk_buff *bundle_skb, struct sk_buff_head *tx_save_head) {
struct ath10k_htc *htc = ep->htc;
struct ath10k *ar = htc->ar;
ath10k_dbg(ar, ATH10K_DBG_HTC, "bundle skb len %d\n", bundle_skb->len);
skb_len = bundle_skb->len;
ret = ath10k_... | static int ath10k_htc_send_bundle(struct ath10k_htc_ep *ep, struct sk_buff *bundle_skb, struct sk_buff_head *tx_save_head) {
struct ath10k_htc *htc = ep->htc;
struct ath10k *ar = htc->ar;
ath10k_dbg(ar, ATH10K_DBG_HTC, "bundle skb len %d\n", bundle_skb->len);
skb_len = bundle_skb->len;
ret = ath10k_... | static int ath10k_htc_send_bundle(struct ath10k_htc_ep *ep, struct sk_buff *bundle_skb, struct sk_buff_head *tx_save_head) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
struct ath10k_htc *htc = ep->htc;
struct ath10k *ar = htc->ar;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
ath10k_dbg(ar, ATH10... | static int ath10k_htc_send_bundle(struct ath10k_htc_ep *ep, struct sk_buff *bundle_skb, struct sk_buff_head *tx_save_head) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
struct ath10k_htc *htc = ep->htc;
struct ath10k *ar = htc->ar;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
ath10k_dbg(ar, ATH10... | static int ath10k_htc_send_bundle(struct ath10k_htc_ep *ep, struct sk_buff *bundle_skb, struct sk_buff_head *tx_save_head) {
struct ath10k_htc *htc = ep->htc;
struct ath10k *ar = htc->ar;
ath10k_dbg(ar, ATH10K_DBG_HTC, "bundle skb len %d\n", bundle_skb->len);
skb_len = bundle_skb->len;
ret = a... |
CVE-2021-47018 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | arch/powerpc/include/asm/fixmap.h | __set_fixmap | static inline void __set_fixmap(enum fixed_addresses idx, phys_addr_t phys, pgprot_t flags) {
if (__builtin_constant_p(idx)) {
BUILD_BUG_ON(idx >= __end_of_fixed_addresses);
} else if (WARN_ON(idx >= __end_of_fixed_addresses)) {
return;
}
map_kernel_page(__fix_to_virt(idx), phys, flags);... | static inline void __set_fixmap(enum fixed_addresses idx, phys_addr_t phys, pgprot_t flags) {
BUILD_BUG_ON(IS_ENABLED(CONFIG_PPC64) && __FIXADDR_SIZE > FIXADDR_SIZE);
if (__builtin_constant_p(idx)) {
BUILD_BUG_ON(idx >= __end_of_fixed_addresses);
} else if (WARN_ON(idx >= __end_of_fixed_addresses)) ... | static inline void __set_fixmap(enum fixed_addresses idx, phys_addr_t phys, pgprot_t flags) {
if (__builtin_constant_p(idx)) {
BUILD_BUG_ON(idx >= __end_of_fixed_addresses);
} else if (WARN_ON(idx >= __end_of_fixed_addresses)) {
return;
}
map_kernel_page(__fix_to_virt(idx), phys, flags);... | static inline void __set_fixmap(enum fixed_addresses idx, phys_addr_t phys, pgprot_t flags) {
BUILD_BUG_ON(IS_ENABLED(CONFIG_PPC64) && __FIXADDR_SIZE > FIXADDR_SIZE);
if (__builtin_constant_p(idx)) {
BUILD_BUG_ON(idx >= __end_of_fixed_addresses);
} else if (WARN_ON(idx >= __end_of_fixed_addresses)) ... | static inline void __set_fixmap(enum fixed_addresses idx, phys_addr_t phys, pgprot_t flags) {
if (__builtin_constant_p(idx)) {
BUILD_BUG_ON(idx >= __end_of_fixed_addresses);
} else if (WARN_ON(idx >= __end_of_fixed_addresses)) {
return;
}
map_kernel_page(__fix_to_virt(idx), phys, flags);... | static inline void __set_fixmap(enum fixed_addresses idx, phys_addr_t phys, pgprot_t flags) {
BUILD_BUG_ON(IS_ENABLED(CONFIG_PPC64) && __FIXADDR_SIZE > FIXADDR_SIZE);
if (__builtin_constant_p(idx)) {
BUILD_BUG_ON(idx >= __end_of_fixed_addresses);
} else if (WARN_ON(idx >= __end_of_fixed_addresses)) ... | static inline void __set_fixmap(enum fixed_addresses idx, phys_addr_t phys, pgprot_t flags) {
if (__builtin_constant_p(idx)) {
BUILD_BUG_ON(idx >= __end_of_fixed_addresses);
} else if (WARN_ON(idx >= __end_of_fixed_addresses)) {
return;
}
map_kernel_page(__fix_to_virt(idx), phys, flags);... | static inline void __set_fixmap(enum fixed_addresses idx, phys_addr_t phys, pgprot_t flags) {
BUILD_BUG_ON(IS_ENABLED(CONFIG_PPC64) && __FIXADDR_SIZE > FIXADDR_SIZE);
if (__builtin_constant_p(idx)) {
BUILD_BUG_ON(idx >= __end_of_fixed_addresses);
} else if (WARN_ON(idx >= __end_of_fixed_addresses)) ... | static inline void __set_fixmap(enum fixed_addresses idx, phys_addr_t phys, pgprot_t flags) {
+ BUILD_BUG_ON(IS_ENABLED(CONFIG_PPC64) && __FIXADDR_SIZE > FIXADDR_SIZE);
if (__builtin_constant_p(idx)) {
BUILD_BUG_ON(idx >= __end_of_fixed_addresses);
} else if (WARN_ON(idx >= __end_of_fixed_address... |
CVE-2021-47020 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/soundwire/stream.c | sdw_stream_add_slave | int sdw_stream_add_slave(struct sdw_slave *slave, struct sdw_stream_config *stream_config, struct sdw_port_config *port_config, unsigned int num_ports, struct sdw_stream_runtime *stream) {
struct sdw_slave_runtime *s_rt;
struct sdw_master_runtime *m_rt;
int ret;
mutex_lock(&slave->bus->bus_lock);
m_... | int sdw_stream_add_slave(struct sdw_slave *slave, struct sdw_stream_config *stream_config, struct sdw_port_config *port_config, unsigned int num_ports, struct sdw_stream_runtime *stream) {
struct sdw_slave_runtime *s_rt;
struct sdw_master_runtime *m_rt;
int ret;
mutex_lock(&slave->bus->bus_lock);
m_... | int sdw_stream_add_slave(struct sdw_slave *slave, struct sdw_stream_config *stream_config, struct sdw_port_config *port_config, unsigned int num_ports, struct sdw_stream_runtime *stream) {
struct sdw_slave_runtime *s_rt;
struct sdw_master_runtime *m_rt;
int ret;
mutex_lock(&slave->bus->bus_lock);
m_... | int sdw_stream_add_slave(struct sdw_slave *slave, struct sdw_stream_config *stream_config, struct sdw_port_config *port_config, unsigned int num_ports, struct sdw_stream_runtime *stream) {
struct sdw_slave_runtime *s_rt;
struct sdw_master_runtime *m_rt;
int ret;
mutex_lock(&slave->bus->bus_lock);
m_... | int sdw_stream_add_slave(struct sdw_slave *slave, struct sdw_stream_config *stream_config, struct sdw_port_config *port_config, unsigned int num_ports, struct sdw_stream_runtime *stream) {
m_rt = sdw_alloc_master_rt(slave->bus, stream_config, stream);
s_rt = sdw_alloc_slave_rt(slave, stream_config, stream);
... | int sdw_stream_add_slave(struct sdw_slave *slave, struct sdw_stream_config *stream_config, struct sdw_port_config *port_config, unsigned int num_ports, struct sdw_stream_runtime *stream) {
m_rt = sdw_alloc_master_rt(slave->bus, stream_config, stream);
s_rt = sdw_alloc_slave_rt(slave, stream_config, stream);
... | int sdw_stream_add_slave(struct sdw_slave *slave, struct sdw_stream_config *stream_config, struct sdw_port_config *port_config, unsigned int num_ports, struct sdw_stream_runtime *stream) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
m_rt = sdw_alloc_master_rt(slave->bus, stream_config, stream);
/* PLACEHO... | int sdw_stream_add_slave(struct sdw_slave *slave, struct sdw_stream_config *stream_config, struct sdw_port_config *port_config, unsigned int num_ports, struct sdw_stream_runtime *stream) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
m_rt = sdw_alloc_master_rt(slave->bus, stream_config, stream);
/* PLACEHO... | int sdw_stream_add_slave(struct sdw_slave *slave, struct sdw_stream_config *stream_config, struct sdw_port_config *port_config, unsigned int num_ports, struct sdw_stream_runtime *stream) {
m_rt = sdw_alloc_master_rt(slave->bus, stream_config, stream);
s_rt = sdw_alloc_slave_rt(slave, stream_config, stream);
... |
CVE-2021-47023 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/net/ethernet/marvell/prestera/prestera_main.c | prestera_port_handle_event | static void prestera_port_handle_event(struct prestera_switch *sw, struct prestera_event *evt, void *arg) {
struct delayed_work *caching_dw;
struct prestera_port *port;
port = prestera_find_port(sw, evt->port_evt.port_id);
if (!port || !port->dev) {
return;
}
caching_dw = &port->cached_h... | static void prestera_port_handle_event(struct prestera_switch *sw, struct prestera_event *evt, void *arg) {
struct delayed_work *caching_dw;
struct prestera_port *port;
port = prestera_find_port(sw, evt->port_evt.port_id);
if (!port || !port->dev) {
return;
}
caching_dw = &port->cached_h... | static void prestera_port_handle_event(struct prestera_switch *sw, struct prestera_event *evt, void *arg) {
struct delayed_work *caching_dw;
struct prestera_port *port;
port = prestera_find_port(sw, evt->port_evt.port_id);
if (!port || !port->dev) {
return;
}
caching_dw = &port->cached_h... | static void prestera_port_handle_event(struct prestera_switch *sw, struct prestera_event *evt, void *arg) {
struct delayed_work *caching_dw;
struct prestera_port *port;
port = prestera_find_port(sw, evt->port_evt.port_id);
if (!port || !port->dev) {
return;
}
caching_dw = &port->cached_h... | static void prestera_port_handle_event(struct prestera_switch *sw, struct prestera_event *evt, void *arg) {
port = prestera_find_port(sw, evt->port_evt.port_id);
if (!port || !port->dev) {
return;
}
if (evt->id == PRESTERA_PORT_EVENT_STATE_CHANGED) {
if (evt->port_evt.data.oper_state) {
... | static void prestera_port_handle_event(struct prestera_switch *sw, struct prestera_event *evt, void *arg) {
port = prestera_find_port(sw, evt->port_evt.port_id);
if (!port || !port->dev) {
return;
}
if (evt->id == PRESTERA_PORT_EVENT_STATE_CHANGED) {
if (evt->port_evt.data.oper_state) {
... | static void prestera_port_handle_event(struct prestera_switch *sw, struct prestera_event *evt, void *arg) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
port = prestera_find_port(sw, evt->port_evt.port_id);
if (!port || !port->dev) {
return;
}
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
... | static void prestera_port_handle_event(struct prestera_switch *sw, struct prestera_event *evt, void *arg) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
port = prestera_find_port(sw, evt->port_evt.port_id);
if (!port || !port->dev) {
return;
}
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
... | static void prestera_port_handle_event(struct prestera_switch *sw, struct prestera_event *evt, void *arg) {
port = prestera_find_port(sw, evt->port_evt.port_id);
if (!port || !port->dev) {
return;
}
if (evt->id == PRESTERA_PORT_EVENT_STATE_CHANGED) {
if (evt->port_evt.data.oper_st... |
CVE-2021-47024 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | net/vmw_vsock/virtio_transport_common.c | virtio_transport_do_close | static void virtio_transport_do_close(struct vsock_sock *vsk, bool cancel_timeout) {
struct sock *sk = sk_vsock(vsk);
sock_set_flag(sk, SOCK_DONE);
vsk->peer_shutdown = SHUTDOWN_MASK;
if (vsock_stream_has_data(vsk) <= 0) {
sk->sk_state = TCP_CLOSG;
}
sk->sk_state_change(sk);
if (vsk-... | static void virtio_transport_do_close(struct vsock_sock *vsk, bool cancel_timeout) {
struct sock *sk = sk_vsock(vsk);
sock_set_flag(sk, SOCK_DONE);
vsk->peer_shutdown = SHUTDOWN_MASK;
if (vsock_stream_has_data(vsk) <= 0) {
sk->sk_state = TCP_CLOSG;
}
sk->sk_state_change(sk);
if (vsk-... | static void virtio_transport_do_close(struct vsock_sock *vsk, bool cancel_timeout) {
struct sock *sk = sk_vsock(vsk);
sock_set_flag(sk, SOCK_DONE);
vsk->peer_shutdown = SHUTDOWN_MASK;
if (vsock_stream_has_data(vsk) <= 0) {
sk->sk_state = TCP_CLOSG;
}
sk->sk_state_change(sk);
if (vsk-... | static void virtio_transport_do_close(struct vsock_sock *vsk, bool cancel_timeout) {
struct sock *sk = sk_vsock(vsk);
sock_set_flag(sk, SOCK_DONE);
vsk->peer_shutdown = SHUTDOWN_MASK;
if (vsock_stream_has_data(vsk) <= 0) {
sk->sk_state = TCP_CLOSG;
}
sk->sk_state_change(sk);
if (vsk-... | static void virtio_transport_do_close(struct vsock_sock *vsk, bool cancel_timeout) {
struct sock *sk = sk_vsock(vsk);
if (vsk->close_work_scheduled && (!cancel_timeout || cancel_delayed_work(&vsk->close_work))) {
vsock_remove_sock(vsk);
sock_put(sk);
}
}
| static void virtio_transport_do_close(struct vsock_sock *vsk, bool cancel_timeout) {
struct sock *sk = sk_vsock(vsk);
if (vsk->close_work_scheduled && (!cancel_timeout || cancel_delayed_work(&vsk->close_work))) {
virtio_transport_remove_sock(vsk);
sock_put(sk);
}
}
| static void virtio_transport_do_close(struct vsock_sock *vsk, bool cancel_timeout) {
struct sock *sk = sk_vsock(vsk);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (vsk->close_work_scheduled && (!cancel_timeout || cancel_delayed_work(&vsk->close_work))) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */... | static void virtio_transport_do_close(struct vsock_sock *vsk, bool cancel_timeout) {
struct sock *sk = sk_vsock(vsk);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (vsk->close_work_scheduled && (!cancel_timeout || cancel_delayed_work(&vsk->close_work))) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */... | static void virtio_transport_do_close(struct vsock_sock *vsk, bool cancel_timeout) {
struct sock *sk = sk_vsock(vsk);
if (vsk->close_work_scheduled && (!cancel_timeout || cancel_delayed_work(&vsk->close_work))) {
- vsock_remove_sock(vsk);
+ virtio_transport_remove_sock(vsk);
sock_put(s... |
CVE-2021-47024 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | net/vmw_vsock/virtio_transport_common.c | virtio_transport_release | void virtio_transport_release(struct vsock_sock *vsk) {
struct virtio_vsock_sock *vvs = vsk->trans;
struct virtio_vsock_pkt *pkt, *tmp;
struct sock *sk = &vsk->sk;
bool remove_sock = true;
if (sk->sk_type == SOCK_STREAM) {
remove_sock = virtio_transport_close(vsk);
}
list_for_each_en... | void virtio_transport_release(struct vsock_sock *vsk) {
struct sock *sk = &vsk->sk;
bool remove_sock = true;
if (sk->sk_type == SOCK_STREAM) {
remove_sock = virtio_transport_close(vsk);
}
if (remove_sock) {
sock_set_flag(sk, SOCK_DONE);
virtio_transport_remove_sock(vsk);
... | void virtio_transport_release(struct vsock_sock *vsk) {
struct virtio_vsock_sock *vvs = vsk->trans;
struct virtio_vsock_pkt *pkt, *tmp;
struct sock *sk = &vsk->sk;
bool remove_sock = true;
if (sk->sk_type == SOCK_STREAM) {
remove_sock = virtio_transport_close(vsk);
}
list_for_each_en... | void virtio_transport_release(struct vsock_sock *vsk) {
struct sock *sk = &vsk->sk;
bool remove_sock = true;
if (sk->sk_type == SOCK_STREAM) {
remove_sock = virtio_transport_close(vsk);
}
if (remove_sock) {
sock_set_flag(sk, SOCK_DONE);
virtio_transport_remove_sock(vsk);
... | void virtio_transport_release(struct vsock_sock *vsk) {
struct virtio_vsock_sock *vvs = vsk->trans;
struct virtio_vsock_pkt *pkt, *tmp;
struct sock *sk = &vsk->sk;
if (sk->sk_type == SOCK_STREAM) {
remove_sock = virtio_transport_close(vsk);
}
list_for_each_entry_safe(pkt, tmp, &vvs->rx_q... | void virtio_transport_release(struct vsock_sock *vsk) {
struct sock *sk = &vsk->sk;
if (sk->sk_type == SOCK_STREAM) {
remove_sock = virtio_transport_close(vsk);
}
if (remove_sock) {
sock_set_flag(sk, SOCK_DONE);
virtio_transport_remove_sock(vsk);
}
}
| void virtio_transport_release(struct vsock_sock *vsk) {
struct virtio_vsock_sock *vvs = vsk->trans;
struct virtio_vsock_pkt *pkt, *tmp;
struct sock *sk = &vsk->sk;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (sk->sk_type == SOCK_STREAM) {
remove_sock = virtio_transport_close(vsk);
}... | void virtio_transport_release(struct vsock_sock *vsk) {
struct sock *sk = &vsk->sk;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (sk->sk_type == SOCK_STREAM) {
remove_sock = virtio_transport_close(vsk);
}
if (remove_sock) {
sock_set_flag(sk, SOCK_DONE);
virtio_transport_r... | void virtio_transport_release(struct vsock_sock *vsk) {
- struct virtio_vsock_sock *vvs = vsk->trans;
- struct virtio_vsock_pkt *pkt, *tmp;
struct sock *sk = &vsk->sk;
if (sk->sk_type == SOCK_STREAM) {
remove_sock = virtio_transport_close(vsk);
}
- list_for_each_entry_safe(pkt, tmp, &v... |
CVE-2021-47026 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/infiniband/ulp/rtrs/rtrs-clt.c | rtrs_clt_remove_path_from_sysfs | int rtrs_clt_remove_path_from_sysfs(struct rtrs_clt_sess *sess, const struct attribute *sysfs_self) {
enum rtrs_clt_state old_state;
bool changed;
do {
rtrs_clt_close_conns(sess, true);
changed = rtrs_clt_change_state_get_old(sess, RTRS_CLT_DEAD, &old_state);
} while (!changed && old_sta... | int rtrs_clt_remove_path_from_sysfs(struct rtrs_clt_sess *sess, const struct attribute *sysfs_self) {
enum rtrs_clt_state old_state;
bool changed;
do {
rtrs_clt_close_conns(sess, true);
changed = rtrs_clt_change_state_get_old(sess, RTRS_CLT_DEAD, &old_state);
} while (!changed && old_sta... | int rtrs_clt_remove_path_from_sysfs(struct rtrs_clt_sess *sess, const struct attribute *sysfs_self) {
enum rtrs_clt_state old_state;
bool changed;
do {
rtrs_clt_close_conns(sess, true);
changed = rtrs_clt_change_state_get_old(sess, RTRS_CLT_DEAD, &old_state);
} while (!changed && old_sta... | int rtrs_clt_remove_path_from_sysfs(struct rtrs_clt_sess *sess, const struct attribute *sysfs_self) {
enum rtrs_clt_state old_state;
bool changed;
do {
rtrs_clt_close_conns(sess, true);
changed = rtrs_clt_change_state_get_old(sess, RTRS_CLT_DEAD, &old_state);
} while (!changed && old_sta... | int rtrs_clt_remove_path_from_sysfs(struct rtrs_clt_sess *sess, const struct attribute *sysfs_self) {
do {
rtrs_clt_close_conns(sess, true);
changed = rtrs_clt_change_state_get_old(sess, RTRS_CLT_DEAD, &old_state);
} while (!changed && old_state != RTRS_CLT_DEAD);
if (likely(changed)) {
... | int rtrs_clt_remove_path_from_sysfs(struct rtrs_clt_sess *sess, const struct attribute *sysfs_self) {
do {
rtrs_clt_close_conns(sess, true);
changed = rtrs_clt_change_state_get_old(sess, RTRS_CLT_DEAD, &old_state);
} while (!changed && old_state != RTRS_CLT_DEAD);
if (likely(changed)) {
... | int rtrs_clt_remove_path_from_sysfs(struct rtrs_clt_sess *sess, const struct attribute *sysfs_self) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
do {
rtrs_clt_close_conns(sess, true);
changed = rtrs_clt_change_state_get_old(sess, RTRS_CLT_DEAD, &old_state);
} while (!changed && old_state ... | int rtrs_clt_remove_path_from_sysfs(struct rtrs_clt_sess *sess, const struct attribute *sysfs_self) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
do {
rtrs_clt_close_conns(sess, true);
changed = rtrs_clt_change_state_get_old(sess, RTRS_CLT_DEAD, &old_state);
} while (!changed && old_state ... | int rtrs_clt_remove_path_from_sysfs(struct rtrs_clt_sess *sess, const struct attribute *sysfs_self) {
do {
rtrs_clt_close_conns(sess, true);
changed = rtrs_clt_change_state_get_old(sess, RTRS_CLT_DEAD, &old_state);
} while (!changed && old_state != RTRS_CLT_DEAD);
if (likely(changed)) ... |
CVE-2021-47028 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/net/wireless/mediatek/mt76/mt7915/mcu.c | mt7915_mcu_tx_rate_parse | static void mt7915_mcu_tx_rate_parse(struct mt76_phy *mphy, struct mt7915_mcu_ra_info *ra, struct rate_info *rate, u16 r) {
struct ieee80211_supported_band *sband;
u16 ru_idx = le16_to_cpu(ra->ru_idx);
u16 flags = 0;
rate->mcs = FIELD_GET(MT_RA_RATE_MCS, r);
rate->nss = FIELD_GET(MT_RA_RATE_NSS, r) ... | static int mt7915_mcu_tx_rate_parse(struct mt76_phy *mphy, struct mt7915_mcu_ra_info *ra, struct rate_info *rate, u16 r) {
struct ieee80211_supported_band *sband;
u16 ru_idx = le16_to_cpu(ra->ru_idx);
bool cck = false;
rate->mcs = FIELD_GET(MT_RA_RATE_MCS, r);
rate->nss = FIELD_GET(MT_RA_RATE_NSS, r... | static void mt7915_mcu_tx_rate_parse(struct mt76_phy *mphy, struct mt7915_mcu_ra_info *ra, struct rate_info *rate, u16 r) {
struct ieee80211_supported_band *sband;
u16 ru_idx = le16_to_cpu(ra->ru_idx);
u16 flags = 0;
rate->mcs = FIELD_GET(MT_RA_RATE_MCS, r);
rate->nss = FIELD_GET(MT_RA_RATE_NSS, r) ... | static int mt7915_mcu_tx_rate_parse(struct mt76_phy *mphy, struct mt7915_mcu_ra_info *ra, struct rate_info *rate, u16 r) {
struct ieee80211_supported_band *sband;
u16 ru_idx = le16_to_cpu(ra->ru_idx);
bool cck = false;
rate->mcs = FIELD_GET(MT_RA_RATE_MCS, r);
rate->nss = FIELD_GET(MT_RA_RATE_NSS, r... | static void mt7915_mcu_tx_rate_parse(struct mt76_phy *mphy, struct mt7915_mcu_ra_info *ra, struct rate_info *rate, u16 r) {
u16 ru_idx = le16_to_cpu(ra->ru_idx);
u16 flags = 0;
rate->mcs = FIELD_GET(MT_RA_RATE_MCS, r);
rate->nss = FIELD_GET(MT_RA_RATE_NSS, r) + 1;
switch (FIELD_GET(MT_RA_RATE_TX_MOD... | static int mt7915_mcu_tx_rate_parse(struct mt76_phy *mphy, struct mt7915_mcu_ra_info *ra, struct rate_info *rate, u16 r) {
u16 ru_idx = le16_to_cpu(ra->ru_idx);
bool cck = false;
rate->mcs = FIELD_GET(MT_RA_RATE_MCS, r);
rate->nss = FIELD_GET(MT_RA_RATE_NSS, r) + 1;
switch (FIELD_GET(MT_RA_RATE_TX_M... | static void mt7915_mcu_tx_rate_parse(struct mt76_phy *mphy, struct mt7915_mcu_ra_info *ra, struct rate_info *rate, u16 r) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
u16 ru_idx = le16_to_cpu(ra->ru_idx);
u16 flags = 0;
rate->mcs = FIELD_GET(MT_RA_RATE_MCS, r);
rate->nss = FIELD_GET(MT_RA_RATE_NS... | static int mt7915_mcu_tx_rate_parse(struct mt76_phy *mphy, struct mt7915_mcu_ra_info *ra, struct rate_info *rate, u16 r) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
u16 ru_idx = le16_to_cpu(ra->ru_idx);
bool cck = false;
rate->mcs = FIELD_GET(MT_RA_RATE_MCS, r);
rate->nss = FIELD_GET(MT_RA_RATE_... | -static void mt7915_mcu_tx_rate_parse(struct mt76_phy *mphy, struct mt7915_mcu_ra_info *ra, struct rate_info *rate, u16 r) {
+static int mt7915_mcu_tx_rate_parse(struct mt76_phy *mphy, struct mt7915_mcu_ra_info *ra, struct rate_info *rate, u16 r) {
u16 ru_idx = le16_to_cpu(ra->ru_idx);
- u16 flags = 0;
+ boo... |
CVE-2021-47028 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/net/wireless/mediatek/mt76/mt7915/mcu.c | mt7915_mcu_tx_rate_report | static void mt7915_mcu_tx_rate_report(struct mt7915_dev *dev, struct sk_buff *skb) {
struct mt7915_mcu_ra_info *ra = (struct mt7915_mcu_ra_info *)skb->data;
struct rate_info rate = {}, prob_rate = {};
u16 probe = le16_to_cpu(ra->prob_up_rate);
u16 attempts = le16_to_cpu(ra->attempts);
u16 curr = le1... | static void mt7915_mcu_tx_rate_report(struct mt7915_dev *dev, struct sk_buff *skb) {
struct mt7915_mcu_ra_info *ra = (struct mt7915_mcu_ra_info *)skb->data;
struct rate_info rate = {}, prob_rate = {};
u16 probe = le16_to_cpu(ra->prob_up_rate);
u16 attempts = le16_to_cpu(ra->attempts);
u16 curr = le1... | static void mt7915_mcu_tx_rate_report(struct mt7915_dev *dev, struct sk_buff *skb) {
struct mt7915_mcu_ra_info *ra = (struct mt7915_mcu_ra_info *)skb->data;
struct rate_info rate = {}, prob_rate = {};
u16 probe = le16_to_cpu(ra->prob_up_rate);
u16 attempts = le16_to_cpu(ra->attempts);
u16 curr = le1... | static void mt7915_mcu_tx_rate_report(struct mt7915_dev *dev, struct sk_buff *skb) {
struct mt7915_mcu_ra_info *ra = (struct mt7915_mcu_ra_info *)skb->data;
struct rate_info rate = {}, prob_rate = {};
u16 probe = le16_to_cpu(ra->prob_up_rate);
u16 attempts = le16_to_cpu(ra->attempts);
u16 curr = le1... | static void mt7915_mcu_tx_rate_report(struct mt7915_dev *dev, struct sk_buff *skb) {
struct mt7915_mcu_ra_info *ra = (struct mt7915_mcu_ra_info *)skb->data;
struct rate_info rate = {}, prob_rate = {};
u16 probe = le16_to_cpu(ra->prob_up_rate);
u16 curr = le16_to_cpu(ra->curr_rate);
struct mt76_phy *... | static void mt7915_mcu_tx_rate_report(struct mt7915_dev *dev, struct sk_buff *skb) {
struct mt7915_mcu_ra_info *ra = (struct mt7915_mcu_ra_info *)skb->data;
struct rate_info rate = {}, prob_rate = {};
u16 probe = le16_to_cpu(ra->prob_up_rate);
u16 curr = le16_to_cpu(ra->curr_rate);
struct mt76_phy *... | static void mt7915_mcu_tx_rate_report(struct mt7915_dev *dev, struct sk_buff *skb) {
struct mt7915_mcu_ra_info *ra = (struct mt7915_mcu_ra_info *)skb->data;
struct rate_info rate = {}, prob_rate = {};
u16 probe = le16_to_cpu(ra->prob_up_rate);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
u16 curr =... | static void mt7915_mcu_tx_rate_report(struct mt7915_dev *dev, struct sk_buff *skb) {
struct mt7915_mcu_ra_info *ra = (struct mt7915_mcu_ra_info *)skb->data;
struct rate_info rate = {}, prob_rate = {};
u16 probe = le16_to_cpu(ra->prob_up_rate);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
u16 curr =... | static void mt7915_mcu_tx_rate_report(struct mt7915_dev *dev, struct sk_buff *skb) {
struct mt7915_mcu_ra_info *ra = (struct mt7915_mcu_ra_info *)skb->data;
struct rate_info rate = {}, prob_rate = {};
u16 probe = le16_to_cpu(ra->prob_up_rate);
u16 curr = le16_to_cpu(ra->curr_rate);
struct mt76... |
CVE-2021-47032 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/net/wireless/mediatek/mt76/mt7915/mac.c | mt7915_txp_skb_unmap | void mt7915_txp_skb_unmap(struct mt76_dev *dev, struct mt76_txwi_cache *t) {
struct mt7915_txp *txp;
int i;
txp = mt7915_txwi_to_txp(dev, t);
for (i = 1; i < txp->nbuf; i++)
dma_unmap_single(dev->dev, le32_to_cpu(txp->buf[i]), le16_to_cpu(txp->len[i]), DMA_TO_DEVICE);
} | void mt7915_txp_skb_unmap(struct mt76_dev *dev, struct mt76_txwi_cache *t) {
struct mt7915_txp *txp;
int i;
txp = mt7915_txwi_to_txp(dev, t);
for (i = 0; i < txp->nbuf; i++)
dma_unmap_single(dev->dev, le32_to_cpu(txp->buf[i]), le16_to_cpu(txp->len[i]), DMA_TO_DEVICE);
} | void mt7915_txp_skb_unmap(struct mt76_dev *dev, struct mt76_txwi_cache *t) {
struct mt7915_txp *txp;
int i;
txp = mt7915_txwi_to_txp(dev, t);
for (i = 1; i < txp->nbuf; i++)
dma_unmap_single(dev->dev, le32_to_cpu(txp->buf[i]), le16_to_cpu(txp->len[i]), DMA_TO_DEVICE);
} | void mt7915_txp_skb_unmap(struct mt76_dev *dev, struct mt76_txwi_cache *t) {
struct mt7915_txp *txp;
int i;
txp = mt7915_txwi_to_txp(dev, t);
for (i = 0; i < txp->nbuf; i++)
dma_unmap_single(dev->dev, le32_to_cpu(txp->buf[i]), le16_to_cpu(txp->len[i]), DMA_TO_DEVICE);
} | void mt7915_txp_skb_unmap(struct mt76_dev *dev, struct mt76_txwi_cache *t) {
struct mt7915_txp *txp;
int i;
txp = mt7915_txwi_to_txp(dev, t);
for (i = 1; i < txp->nbuf; i++)
dma_unmap_single(dev->dev, le32_to_cpu(txp->buf[i]), le16_to_cpu(txp->len[i]), DMA_TO_DEVICE);
}
| void mt7915_txp_skb_unmap(struct mt76_dev *dev, struct mt76_txwi_cache *t) {
struct mt7915_txp *txp;
int i;
txp = mt7915_txwi_to_txp(dev, t);
for (i = 0; i < txp->nbuf; i++)
dma_unmap_single(dev->dev, le32_to_cpu(txp->buf[i]), le16_to_cpu(txp->len[i]), DMA_TO_DEVICE);
}
| void mt7915_txp_skb_unmap(struct mt76_dev *dev, struct mt76_txwi_cache *t) {
struct mt7915_txp *txp;
int i;
txp = mt7915_txwi_to_txp(dev, t);
for (i = 1; i < txp->nbuf; i++)
dma_unmap_single(dev->dev, le32_to_cpu(txp->buf[i]), le16_to_cpu(txp->len[i]), DMA_TO_DEVICE);
}
| void mt7915_txp_skb_unmap(struct mt76_dev *dev, struct mt76_txwi_cache *t) {
struct mt7915_txp *txp;
int i;
txp = mt7915_txwi_to_txp(dev, t);
for (i = 0; i < txp->nbuf; i++)
dma_unmap_single(dev->dev, le32_to_cpu(txp->buf[i]), le16_to_cpu(txp->len[i]), DMA_TO_DEVICE);
} | void mt7915_txp_skb_unmap(struct mt76_dev *dev, struct mt76_txwi_cache *t) {
struct mt7915_txp *txp;
int i;
txp = mt7915_txwi_to_txp(dev, t);
- for (i = 1; i < txp->nbuf; i++)
+ for (i = 0; i < txp->nbuf; i++)
dma_unmap_single(dev->dev, le32_to_cpu(txp->buf[i]), le16_to_cpu(txp->len[i]), ... |
CVE-2021-47033 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/net/wireless/mediatek/mt76/mt7615/mac.c | mt7615_txp_skb_unmap_fw | static void mt7615_txp_skb_unmap_fw(struct mt76_dev *dev, struct mt7615_fw_txp *txp) {
int i;
for (i = 1; i < txp->nbuf; i++)
dma_unmap_single(dev->dev, le32_to_cpu(txp->buf[i]), le16_to_cpu(txp->len[i]), DMA_TO_DEVICE);
} | static void mt7615_txp_skb_unmap_fw(struct mt76_dev *dev, struct mt7615_fw_txp *txp) {
int i;
for (i = 0; i < txp->nbuf; i++)
dma_unmap_single(dev->dev, le32_to_cpu(txp->buf[i]), le16_to_cpu(txp->len[i]), DMA_TO_DEVICE);
} | static void mt7615_txp_skb_unmap_fw(struct mt76_dev *dev, struct mt7615_fw_txp *txp) {
int i;
for (i = 1; i < txp->nbuf; i++)
dma_unmap_single(dev->dev, le32_to_cpu(txp->buf[i]), le16_to_cpu(txp->len[i]), DMA_TO_DEVICE);
} | static void mt7615_txp_skb_unmap_fw(struct mt76_dev *dev, struct mt7615_fw_txp *txp) {
int i;
for (i = 0; i < txp->nbuf; i++)
dma_unmap_single(dev->dev, le32_to_cpu(txp->buf[i]), le16_to_cpu(txp->len[i]), DMA_TO_DEVICE);
} | static void mt7615_txp_skb_unmap_fw(struct mt76_dev *dev, struct mt7615_fw_txp *txp) {
int i;
for (i = 1; i < txp->nbuf; i++)
dma_unmap_single(dev->dev, le32_to_cpu(txp->buf[i]), le16_to_cpu(txp->len[i]), DMA_TO_DEVICE);
}
| static void mt7615_txp_skb_unmap_fw(struct mt76_dev *dev, struct mt7615_fw_txp *txp) {
int i;
for (i = 0; i < txp->nbuf; i++)
dma_unmap_single(dev->dev, le32_to_cpu(txp->buf[i]), le16_to_cpu(txp->len[i]), DMA_TO_DEVICE);
}
| static void mt7615_txp_skb_unmap_fw(struct mt76_dev *dev, struct mt7615_fw_txp *txp) {
int i;
for (i = 1; i < txp->nbuf; i++)
dma_unmap_single(dev->dev, le32_to_cpu(txp->buf[i]), le16_to_cpu(txp->len[i]), DMA_TO_DEVICE);
}
| static void mt7615_txp_skb_unmap_fw(struct mt76_dev *dev, struct mt7615_fw_txp *txp) {
int i;
for (i = 0; i < txp->nbuf; i++)
dma_unmap_single(dev->dev, le32_to_cpu(txp->buf[i]), le16_to_cpu(txp->len[i]), DMA_TO_DEVICE);
} | static void mt7615_txp_skb_unmap_fw(struct mt76_dev *dev, struct mt7615_fw_txp *txp) {
int i;
- for (i = 1; i < txp->nbuf; i++)
+ for (i = 0; i < txp->nbuf; i++)
dma_unmap_single(dev->dev, le32_to_cpu(txp->buf[i]), le16_to_cpu(txp->len[i]), DMA_TO_DEVICE);
} |
CVE-2021-47035 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/iommu/intel/iommu.c | __domain_mapping | static int __domain_mapping(struct dmar_domain *domain, unsigned long iov_pfn, unsigned long phys_pfn, unsigned long nr_pages, int prot) {
struct dma_pte *first_pte = NULL, *pte = NULL;
unsigned int largepage_lvl = 0;
unsigned long lvl_pages = 0;
phys_addr_t pteval;
u64 attr;
BUG_ON(!domain_pfn_... | static int __domain_mapping(struct dmar_domain *domain, unsigned long iov_pfn, unsigned long phys_pfn, unsigned long nr_pages, int prot) {
struct dma_pte *first_pte = NULL, *pte = NULL;
unsigned int largepage_lvl = 0;
unsigned long lvl_pages = 0;
phys_addr_t pteval;
u64 attr;
BUG_ON(!domain_pfn_... | static int __domain_mapping(struct dmar_domain *domain, unsigned long iov_pfn, struct scatterlist *sg, unsigned long phys_pfn, unsigned long nr_pages, int prot) {
struct dma_pte *first_pte = NULL, *pte = NULL;
phys_addr_t pteval;
unsigned long sg_res = 0;
unsigned int largepage_lvl = 0;
unsigned lon... | static int __domain_mapping(struct dmar_domain *domain, unsigned long iov_pfn, struct scatterlist *sg, unsigned long phys_pfn, unsigned long nr_pages, int prot) {
struct dma_pte *first_pte = NULL, *pte = NULL;
phys_addr_t pteval;
unsigned long sg_res = 0;
unsigned int largepage_lvl = 0;
unsigned lon... | static int __domain_mapping(struct dmar_domain *domain, unsigned long iov_pfn, unsigned long phys_pfn, unsigned long nr_pages, int prot) {
if ((prot & (DMA_PTE_READ|DMA_PTE_WRITE)) == 0) {
return -EVAL;
}
attr = prot & (DMA_PTE_READ | DMA_PTE_WRITE | DMA_PTE_SNP);
if (domain_use_first_level(doma... | static int __domain_mapping(struct dmar_domain *domain, unsigned long iov_pfn, unsigned long phys_pfn, unsigned long nr_pages, int prot) {
if ((prot & (DMA_PTE_READ|DMA_PTE_WRITE)) == 0) {
return -EVAL;
}
attr = prot & (DMA_PTE_READ | DMA_PTE_WRITE | DMA_PTE_SNP);
attr |= DMA_FL_PTE_PRESENT;
... | static int __domain_mapping(struct dmar_domain *domain, unsigned long iov_pfn, struct scatterlist *sg, unsigned long phys_pfn, unsigned long nr_pages, int prot) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if ((prot & (DMA_PTE_READ|DMA_PTE_WRITE)) == 0) {
return -EVAL;
}
attr = prot & (DMA_PT... | static int __domain_mapping(struct dmar_domain *domain, unsigned long iov_pfn, struct scatterlist *sg, unsigned long phys_pfn, unsigned long nr_pages, int prot) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if ((prot & (DMA_PTE_READ|DMA_PTE_WRITE)) == 0) {
return -EVAL;
}
attr = prot & (DMA_PT... | static int __domain_mapping(struct dmar_domain *domain, unsigned long iov_pfn, unsigned long phys_pfn, unsigned long nr_pages, int prot) {
if ((prot & (DMA_PTE_READ|DMA_PTE_WRITE)) == 0) {
return -EVAL;
}
attr = prot & (DMA_PTE_READ | DMA_PTE_WRITE | DMA_PTE_SNP);
+ attr |= DMA_FL_PTE_PRESEN... |
CVE-2021-47037 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | sound/soc/qcom/qdsp6/q6afe-clocks.c | clk_vote_q6afe_block | static int clk_vote_q6afe_block(struct clk_hw *hw) {
struct q6afe_clk *clk = to_q6afe_clk(hw);
return q6afe_vote_lpass_core_hw(clk->dev, clk->afe_clk_id, clk->name, &clk->handle);
} | static int clk_vote_q6afe_block(struct clk_hw *hw) {
struct q6afe_clk *clk = to_q6afe_clk(hw);
return q6afe_vote_lpass_core_hw(clk->dev, clk->afe_clk_id, clk_hw_get_name(&clk->hw), &clk->handle);
} | static int clk_vote_q6afe_block(struct clk_hw *hw) {
struct q6afe_clk *clk = to_q6afe_clk(hw);
return q6afe_vote_lpass_core_hw(clk->dev, clk->afe_clk_id, clk->name, &clk->handle);
} | static int clk_vote_q6afe_block(struct clk_hw *hw) {
struct q6afe_clk *clk = to_q6afe_clk(hw);
return q6afe_vote_lpass_core_hw(clk->dev, clk->afe_clk_id, clk_hw_get_name(&clk->hw), &clk->handle);
} | static int clk_vote_q6afe_block(struct clk_hw *hw) {
struct q6afe_clk *clk = to_q6afe_clk(hw);
return q6afe_vote_lpass_core_hw(clk->dev, clk->afe_clk_id, clk->name, &clk->handle);
}
| static int clk_vote_q6afe_block(struct clk_hw *hw) {
struct q6afe_clk *clk = to_q6afe_clk(hw);
return q6afe_vote_lpass_core_hw(clk->dev, clk->afe_clk_id, clk_hw_get_name(&clk->hw), &clk->handle);
}
| static int clk_vote_q6afe_block(struct clk_hw *hw) {
struct q6afe_clk *clk = to_q6afe_clk(hw);
return q6afe_vote_lpass_core_hw(clk->dev, clk->afe_clk_id, clk->name, &clk->handle);
}
| static int clk_vote_q6afe_block(struct clk_hw *hw) {
struct q6afe_clk *clk = to_q6afe_clk(hw);
return q6afe_vote_lpass_core_hw(clk->dev, clk->afe_clk_id, clk_hw_get_name(&clk->hw), &clk->handle);
} | static int clk_vote_q6afe_block(struct clk_hw *hw) {
struct q6afe_clk *clk = to_q6afe_clk(hw);
- return q6afe_vote_lpass_core_hw(clk->dev, clk->afe_clk_id, clk->name, &clk->handle);
+ return q6afe_vote_lpass_core_hw(clk->dev, clk->afe_clk_id, clk_hw_get_name(&clk->hw), &clk->handle);
} |
CVE-2021-47037 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | sound/soc/qcom/qdsp6/q6afe-clocks.c | q6afe_clock_dev_probe | static int q6afe_clock_dev_probe(struct platform_device *pdev) {
struct q6afe_cc *cc;
struct device *dev = &pdev->dev;
int i, ret;
cc = devm_kzalloc(dev, sizeof(*cc), GFP_KERNEL);
if (!cc) {
return -ENOMEM;
}
cc->clks = &q6afe_clks[0];
cc->num_clks = ARRAY_SIZE(q6afe_clks);
f... | static int q6afe_clock_dev_probe(struct platform_device *pdev) {
struct q6afe_cc *cc;
struct device *dev = &pdev->dev;
int i, ret;
cc = devm_kzalloc(dev, sizeof(*cc), GFP_KERNEL);
if (!cc) {
return -ENOMEM;
}
cc->dev = dev;
for (i = 0; i < ARRAY_SIZE(q6afe_clks); i++) {
u... | static int q6afe_clock_dev_probe(struct platform_device *pdev) {
struct q6afe_cc *cc;
struct device *dev = &pdev->dev;
int i, ret;
cc = devm_kzalloc(dev, sizeof(*cc), GFP_KERNEL);
if (!cc) {
return -ENOMEM;
}
cc->clks = &q6afe_clks[0];
cc->num_clks = ARRAY_SIZE(q6afe_clks);
f... | static int q6afe_clock_dev_probe(struct platform_device *pdev) {
struct q6afe_cc *cc;
struct device *dev = &pdev->dev;
int i, ret;
cc = devm_kzalloc(dev, sizeof(*cc), GFP_KERNEL);
if (!cc) {
return -ENOMEM;
}
cc->dev = dev;
for (i = 0; i < ARRAY_SIZE(q6afe_clks); i++) {
u... | static int q6afe_clock_dev_probe(struct platform_device *pdev) {
struct device *dev = &pdev->dev;
cc = devm_kzalloc(dev, sizeof(*cc), GFP_KERNEL);
if (!cc) {
return -ENOMEM;
}
cc->clks = &q6afe_clks[0];
cc->num_clks = ARRAY_SIZE(q6afe_clks);
for (i = 0; i < ARRAY_SIZE(q6afe_clks); i+... | static int q6afe_clock_dev_probe(struct platform_device *pdev) {
struct device *dev = &pdev->dev;
cc = devm_kzalloc(dev, sizeof(*cc), GFP_KERNEL);
if (!cc) {
return -ENOMEM;
}
cc->dev = dev;
for (i = 0; i < ARRAY_SIZE(q6afe_clks); i++) {
unsigned int id = q6afe_clks[i].clk_id;
... | static int q6afe_clock_dev_probe(struct platform_device *pdev) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
struct device *dev = &pdev->dev;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
cc = devm_kzalloc(dev, sizeof(*cc), GFP_KERNEL);
if (!cc) {
return -ENOMEM;
}
cc->clks = &q6af... | static int q6afe_clock_dev_probe(struct platform_device *pdev) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
struct device *dev = &pdev->dev;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
cc = devm_kzalloc(dev, sizeof(*cc), GFP_KERNEL);
if (!cc) {
return -ENOMEM;
}
cc->dev = dev;
... | static int q6afe_clock_dev_probe(struct platform_device *pdev) {
struct device *dev = &pdev->dev;
cc = devm_kzalloc(dev, sizeof(*cc), GFP_KERNEL);
if (!cc) {
return -ENOMEM;
}
- cc->clks = &q6afe_clks[0];
- cc->num_clks = ARRAY_SIZE(q6afe_clks);
+ cc->dev = dev;
for (i = 0; i... |
CVE-2021-47037 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | sound/soc/qcom/qdsp6/q6afe-clocks.c | q6afe_of_clk_hw_get | static struct clk_hw *q6afe_of_clk_hw_get(struct of_phandle_args *clkspec, void *data) {
struct q6afe_cc *cc = data;
unsigned int idx = clkspec->args[0];
unsigned int attr = clkspec->args[1];
if (idx >= cc->num_clks || attr > LPASS_CLK_ATTRIBUTE_COUPLE_DIVISOR) {
dev_err(cc->dev, "Invalid clk sp... | static struct clk_hw *q6afe_of_clk_hw_get(struct of_phandle_args *clkspec, void *data) {
struct q6afe_cc *cc = data;
unsigned int idx = clkspec->args[0];
unsigned int attr = clkspec->args[1];
if (idx >= Q6AFE_MAX_CLK_ID || attr > LPASS_CLK_ATTRIBUTE_COUPLE_DIVISOR) {
dev_err(cc->dev, "Invalid cl... | static struct clk_hw *q6afe_of_clk_hw_get(struct of_phandle_args *clkspec, void *data) {
struct q6afe_cc *cc = data;
unsigned int idx = clkspec->args[0];
unsigned int attr = clkspec->args[1];
if (idx >= cc->num_clks || attr > LPASS_CLK_ATTRIBUTE_COUPLE_DIVISOR) {
dev_err(cc->dev, "Invalid clk sp... | static struct clk_hw *q6afe_of_clk_hw_get(struct of_phandle_args *clkspec, void *data) {
struct q6afe_cc *cc = data;
unsigned int idx = clkspec->args[0];
unsigned int attr = clkspec->args[1];
if (idx >= Q6AFE_MAX_CLK_ID || attr > LPASS_CLK_ATTRIBUTE_COUPLE_DIVISOR) {
dev_err(cc->dev, "Invalid cl... | static struct clk_hw *q6afe_of_clk_hw_get(struct of_phandle_args *clkspec, void *data) {
struct q6afe_cc *cc = data;
unsigned int idx = clkspec->args[0];
unsigned int attr = clkspec->args[1];
if (idx >= cc->num_clks || attr > LPASS_CLK_ATTRIBUTE_COUPLE_DIVISOR) {
dev_err(cc->dev, "Invalid clk sp... | static struct clk_hw *q6afe_of_clk_hw_get(struct of_phandle_args *clkspec, void *data) {
struct q6afe_cc *cc = data;
unsigned int idx = clkspec->args[0];
unsigned int attr = clkspec->args[1];
if (idx >= Q6AFE_MAX_CLK_ID || attr > LPASS_CLK_ATTRIBUTE_COUPLE_DIVISOR) {
dev_err(cc->dev, "Invalid cl... | static struct clk_hw *q6afe_of_clk_hw_get(struct of_phandle_args *clkspec, void *data) {
struct q6afe_cc *cc = data;
unsigned int idx = clkspec->args[0];
unsigned int attr = clkspec->args[1];
if (idx >= cc->num_clks || attr > LPASS_CLK_ATTRIBUTE_COUPLE_DIVISOR) {
dev_err(cc->dev, "Invalid clk sp... | static struct clk_hw *q6afe_of_clk_hw_get(struct of_phandle_args *clkspec, void *data) {
struct q6afe_cc *cc = data;
unsigned int idx = clkspec->args[0];
unsigned int attr = clkspec->args[1];
if (idx >= Q6AFE_MAX_CLK_ID || attr > LPASS_CLK_ATTRIBUTE_COUPLE_DIVISOR) {
dev_err(cc->dev, "Invalid cl... | static struct clk_hw *q6afe_of_clk_hw_get(struct of_phandle_args *clkspec, void *data) {
struct q6afe_cc *cc = data;
unsigned int idx = clkspec->args[0];
unsigned int attr = clkspec->args[1];
- if (idx >= cc->num_clks || attr > LPASS_CLK_ATTRIBUTE_COUPLE_DIVISOR) {
+ if (idx >= Q6AFE_MAX_CLK_ID ||... |
CVE-2021-47037 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | sound/soc/qcom/qdsp6/q6afe.c | q6afe_vote_lpass_core_hw | int q6afe_vote_lpass_core_hw(struct device *dev, uint32_t hw_block_id, char *client_name, uint32_t *client_handle) {
struct q6afe *afe = dev_get_drvdata(dev->parent);
struct afe_cmd_remote_lpass_core_hw_vote_request *vote_cfg;
struct apr_pkt *pkt;
int ret = 0;
int pkt_size;
void *p;
pkt_size... | int q6afe_vote_lpass_core_hw(struct device *dev, uint32_t hw_block_id, const char *client_name, uint32_t *client_handle) {
struct q6afe *afe = dev_get_drvdata(dev->parent);
struct afe_cmd_remote_lpass_core_hw_vote_request *vote_cfg;
struct apr_pkt *pkt;
int ret = 0;
int pkt_size;
void *p;
pk... | int q6afe_vote_lpass_core_hw(struct device *dev, uint32_t hw_block_id, char *client_name, uint32_t *client_handle) {
struct q6afe *afe = dev_get_drvdata(dev->parent);
struct afe_cmd_remote_lpass_core_hw_vote_request *vote_cfg;
struct apr_pkt *pkt;
int ret = 0;
int pkt_size;
void *p;
pkt_size... | int q6afe_vote_lpass_core_hw(struct device *dev, uint32_t hw_block_id, const char *client_name, uint32_t *client_handle) {
struct q6afe *afe = dev_get_drvdata(dev->parent);
struct afe_cmd_remote_lpass_core_hw_vote_request *vote_cfg;
struct apr_pkt *pkt;
int ret = 0;
int pkt_size;
void *p;
pk... | int q6afe_vote_lpass_core_hw(struct device *dev, uint32_t hw_block_id, char *client_name, uint32_t *client_handle) {
}
| int q6afe_vote_lpass_core_hw(struct device *dev, uint32_t hw_block_id, const char *client_name, uint32_t *client_handle) {
}
| int q6afe_vote_lpass_core_hw(struct device *dev, uint32_t hw_block_id, char *client_name, uint32_t *client_handle) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
}
| int q6afe_vote_lpass_core_hw(struct device *dev, uint32_t hw_block_id, const char *client_name, uint32_t *client_handle) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
} | -int q6afe_vote_lpass_core_hw(struct device *dev, uint32_t hw_block_id, char *client_name, uint32_t *client_handle) {
+int q6afe_vote_lpass_core_hw(struct device *dev, uint32_t hw_block_id, const char *client_name, uint32_t *client_handle) {
} |
CVE-2021-47038 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | net/bluetooth/hci_conn.c | hci_conn_get_phy | u32 hci_conn_get_phy(struct hci_conn *conn) {
u32 phys = 0;
hci_dev_lock(conn->hdev);
switch (conn->type) {
case SCO_LK:
phys |= BT_PHY_BR_1M_1SLOT;
break;
case ACL_LK:
phys |= BT_PHY_BR_1M_1SLOT;
if (conn->pkt_type & (HCI_DM3 | HCI_DH3)) {
phys |= BT_PHY_... | u32 hci_conn_get_phy(struct hci_conn *conn) {
u32 phys = 0;
switch (conn->type) {
case SCO_LK:
phys |= BT_PHY_BR_1M_1SLOT;
break;
case ACL_LK:
phys |= BT_PHY_BR_1M_1SLOT;
if (conn->pkt_type & (HCI_DM3 | HCI_DH3)) {
phys |= BT_PHY_BR_1M_3SLOT;
}
... | u32 hci_conn_get_phy(struct hci_conn *conn) {
u32 phys = 0;
hci_dev_lock(conn->hdev);
switch (conn->type) {
case SCO_LK:
phys |= BT_PHY_BR_1M_1SLOT;
break;
case ACL_LK:
phys |= BT_PHY_BR_1M_1SLOT;
if (conn->pkt_type & (HCI_DM3 | HCI_DH3)) {
phys |= BT_PHY_... | u32 hci_conn_get_phy(struct hci_conn *conn) {
u32 phys = 0;
switch (conn->type) {
case SCO_LK:
phys |= BT_PHY_BR_1M_1SLOT;
break;
case ACL_LK:
phys |= BT_PHY_BR_1M_1SLOT;
if (conn->pkt_type & (HCI_DM3 | HCI_DH3)) {
phys |= BT_PHY_BR_1M_3SLOT;
}
... | u32 hci_conn_get_phy(struct hci_conn *conn) {
u32 phys = 0;
hci_dev_lock(conn->hdev);
switch (conn->type) {
case SCO_LK:
phys |= BT_PHY_BR_1M_1SLOT;
break;
case ACL_LK:
if (!(conn->pkt_type & HCI_3DH5)) {
phys |= BT_PHY_EDR_3M_5SLOT;
}
break;
c... | u32 hci_conn_get_phy(struct hci_conn *conn) {
u32 phys = 0;
switch (conn->type) {
case SCO_LK:
phys |= BT_PHY_BR_1M_1SLOT;
break;
case ACL_LK:
if (!(conn->pkt_type & HCI_3DH5)) {
phys |= BT_PHY_EDR_3M_5SLOT;
}
break;
case ESCO_LK:
if (!(con... | u32 hci_conn_get_phy(struct hci_conn *conn) {
u32 phys = 0;
hci_dev_lock(conn->hdev);
switch (conn->type) {
case SCO_LK:
phys |= BT_PHY_BR_1M_1SLOT;
break;
case ACL_LK:
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (!(conn->pkt_type & HCI_3DH5)) {
phys |= B... | u32 hci_conn_get_phy(struct hci_conn *conn) {
u32 phys = 0;
switch (conn->type) {
case SCO_LK:
phys |= BT_PHY_BR_1M_1SLOT;
break;
case ACL_LK:
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (!(conn->pkt_type & HCI_3DH5)) {
phys |= BT_PHY_EDR_3M_5SLOT;
}
... | u32 hci_conn_get_phy(struct hci_conn *conn) {
u32 phys = 0;
- hci_dev_lock(conn->hdev);
switch (conn->type) {
case SCO_LK:
phys |= BT_PHY_BR_1M_1SLOT;
break;
case ACL_LK:
if (!(conn->pkt_type & HCI_3DH5)) {
phys |= BT_PHY_EDR_3M_5SLOT;
}
... |
CVE-2021-47039 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/block/ataflop.c | do_format | static int do_format(int drive, int type, struct atari_format_descr *desc) {
struct request_queue *q;
unsigned char *p;
int sect, nsect;
unsigned long flags;
int ret;
if (type) {
type--;
}
q = unit[drive].disk[type]->queue;
blk_mq_freeze_queue(q);
blk_mq_quiesce_queue(q);... | static int do_format(int drive, int type, struct atari_format_descr *desc) {
struct request_queue *q;
unsigned char *p;
int sect, nsect;
unsigned long flags;
int ret;
if (type) {
type--;
if (type >= NUM_DISK_MORS || minor2disktype[type].drive_types > DriveType) {
retu... | static int do_format(int drive, int type, struct atari_format_descr *desc) {
struct request_queue *q;
unsigned char *p;
int sect, nsect;
unsigned long flags;
int ret;
if (type) {
type--;
}
q = unit[drive].disk[type]->queue;
blk_mq_freeze_queue(q);
blk_mq_quiesce_queue(q);... | static int do_format(int drive, int type, struct atari_format_descr *desc) {
struct request_queue *q;
unsigned char *p;
int sect, nsect;
unsigned long flags;
int ret;
if (type) {
type--;
if (type >= NUM_DISK_MORS || minor2disktype[type].drive_types > DriveType) {
retu... | static int do_format(int drive, int type, struct atari_format_descr *desc) {
if (type) {
type--;
}
q = unit[drive].disk[type]->queue;
if (type) {
if (type >= NUM_DISK_MORS || minor2disktype[type].drive_types > DriveType) {
ret = -EVAL;
goto out;
}
... | static int do_format(int drive, int type, struct atari_format_descr *desc) {
if (type) {
type--;
if (type >= NUM_DISK_MORS || minor2disktype[type].drive_types > DriveType) {
return -EVAL;
}
}
q = unit[drive].disk[type]->queue;
if (type) {
type = minor2disktype... | static int do_format(int drive, int type, struct atari_format_descr *desc) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (type) {
type--;
}
q = unit[drive].disk[type]->queue;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (type) {
if (type >= NUM_DISK_MORS || minor2disktyp... | static int do_format(int drive, int type, struct atari_format_descr *desc) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (type) {
type--;
if (type >= NUM_DISK_MORS || minor2disktype[type].drive_types > DriveType) {
return -EVAL;
}
}
q = unit[drive].disk[type]->qu... | static int do_format(int drive, int type, struct atari_format_descr *desc) {
if (type) {
type--;
+ if (type >= NUM_DISK_MORS || minor2disktype[type].drive_types > DriveType) {
+ return -EVAL;
+ }
}
q = unit[drive].disk[type]->queue;
if (type) {
- if (type >=... |
CVE-2021-47040 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | fs/io_uring.c | io_provide_buffers_prep | static int io_provide_buffers_prep(struct io_kiocb *req, const struct io_uring_sqe *sqe) {
unsigned long size;
struct io_provide_buf *p = &req->pbuf;
u64 tmp;
if (sqe->ioprio || sqe->rw_flags) {
return -EVAL;
}
tmp = READ_ONCE(sqe->fd);
if (!tmp || tmp > USHRT_MAX) {
return -... | static int io_provide_buffers_prep(struct io_kiocb *req, const struct io_uring_sqe *sqe) {
unsigned long size, tmp_check;
struct io_provide_buf *p = &req->pbuf;
u64 tmp;
if (sqe->ioprio || sqe->rw_flags) {
return -EVAL;
}
tmp = READ_ONCE(sqe->fd);
if (!tmp || tmp > USHRT_MAX) {
... | static int io_provide_buffers_prep(struct io_kiocb *req, const struct io_uring_sqe *sqe) {
unsigned long size;
struct io_provide_buf *p = &req->pbuf;
u64 tmp;
if (sqe->ioprio || sqe->rw_flags) {
return -EVAL;
}
tmp = READ_ONCE(sqe->fd);
if (!tmp || tmp > USHRT_MAX) {
return -... | static int io_provide_buffers_prep(struct io_kiocb *req, const struct io_uring_sqe *sqe) {
unsigned long size, tmp_check;
struct io_provide_buf *p = &req->pbuf;
u64 tmp;
if (sqe->ioprio || sqe->rw_flags) {
return -EVAL;
}
tmp = READ_ONCE(sqe->fd);
if (!tmp || tmp > USHRT_MAX) {
... | static int io_provide_buffers_prep(struct io_kiocb *req, const struct io_uring_sqe *sqe) {
unsigned long size;
struct io_provide_buf *p = &req->pbuf;
tmp = READ_ONCE(sqe->fd);
if (!tmp || tmp > USHRT_MAX) {
return -E2BIG;
}
p->nbufs = tmp;
p->addr = READ_ONCE(sqe->addr);
p->len =... | static int io_provide_buffers_prep(struct io_kiocb *req, const struct io_uring_sqe *sqe) {
unsigned long size, tmp_check;
struct io_provide_buf *p = &req->pbuf;
tmp = READ_ONCE(sqe->fd);
if (!tmp || tmp > USHRT_MAX) {
return -E2BIG;
}
p->nbufs = tmp;
p->addr = READ_ONCE(sqe->addr);
... | static int io_provide_buffers_prep(struct io_kiocb *req, const struct io_uring_sqe *sqe) {
unsigned long size;
struct io_provide_buf *p = &req->pbuf;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
tmp = READ_ONCE(sqe->fd);
if (!tmp || tmp > USHRT_MAX) {
return -E2BIG;
}
p->nbufs = tmp... | static int io_provide_buffers_prep(struct io_kiocb *req, const struct io_uring_sqe *sqe) {
unsigned long size, tmp_check;
struct io_provide_buf *p = &req->pbuf;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
tmp = READ_ONCE(sqe->fd);
if (!tmp || tmp > USHRT_MAX) {
return -E2BIG;
}
p->... | static int io_provide_buffers_prep(struct io_kiocb *req, const struct io_uring_sqe *sqe) {
- unsigned long size;
+ unsigned long size, tmp_check;
struct io_provide_buf *p = &req->pbuf;
tmp = READ_ONCE(sqe->fd);
if (!tmp || tmp > USHRT_MAX) {
return -E2BIG;
}
p->nbufs = tmp;
... |
CVE-2021-47041 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/nvme/target/tcp.c | nvmet_tcp_state_change | static void nvmet_tcp_state_change(struct sock *sk) {
struct nvmet_tcp_queue *queue;
write_lock_bh(&sk->sk_callback_lock);
queue = sk->sk_user_data;
if (!queue) {
goto done;
}
switch (sk->sk_state) {
case TCP_F_WAIT1:
case TCP_CLOSE_WAIT:
case TCP_CLOSE:
sk->sk_user_d... | static void nvmet_tcp_state_change(struct sock *sk) {
struct nvmet_tcp_queue *queue;
read_lock_bh(&sk->sk_callback_lock);
queue = sk->sk_user_data;
if (!queue) {
goto done;
}
switch (sk->sk_state) {
case TCP_F_WAIT1:
case TCP_CLOSE_WAIT:
case TCP_CLOSE:
sk->sk_user_da... | static void nvmet_tcp_state_change(struct sock *sk) {
struct nvmet_tcp_queue *queue;
write_lock_bh(&sk->sk_callback_lock);
queue = sk->sk_user_data;
if (!queue) {
goto done;
}
switch (sk->sk_state) {
case TCP_F_WAIT1:
case TCP_CLOSE_WAIT:
case TCP_CLOSE:
sk->sk_user_d... | static void nvmet_tcp_state_change(struct sock *sk) {
struct nvmet_tcp_queue *queue;
read_lock_bh(&sk->sk_callback_lock);
queue = sk->sk_user_data;
if (!queue) {
goto done;
}
switch (sk->sk_state) {
case TCP_F_WAIT1:
case TCP_CLOSE_WAIT:
case TCP_CLOSE:
sk->sk_user_da... | static void nvmet_tcp_state_change(struct sock *sk) {
struct nvmet_tcp_queue *queue;
write_lock_bh(&sk->sk_callback_lock);
queue = sk->sk_user_data;
if (!queue) {
goto done;
}
switch (sk->sk_state) {
case TCP_CLOSE:
nvmet_tcp_schedule_release_queue(queue);
break;
... | static void nvmet_tcp_state_change(struct sock *sk) {
struct nvmet_tcp_queue *queue;
read_lock_bh(&sk->sk_callback_lock);
queue = sk->sk_user_data;
if (!queue) {
goto done;
}
switch (sk->sk_state) {
case TCP_CLOSE:
nvmet_tcp_schedule_release_queue(queue);
break;
d... | static void nvmet_tcp_state_change(struct sock *sk) {
struct nvmet_tcp_queue *queue;
write_lock_bh(&sk->sk_callback_lock);
queue = sk->sk_user_data;
if (!queue) {
goto done;
}
switch (sk->sk_state) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
case TCP_CLOSE:
/* PLACEHOLDER... | static void nvmet_tcp_state_change(struct sock *sk) {
struct nvmet_tcp_queue *queue;
read_lock_bh(&sk->sk_callback_lock);
queue = sk->sk_user_data;
if (!queue) {
goto done;
}
switch (sk->sk_state) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
case TCP_CLOSE:
/* PLACEHOLDER:... | static void nvmet_tcp_state_change(struct sock *sk) {
struct nvmet_tcp_queue *queue;
- write_lock_bh(&sk->sk_callback_lock);
+ read_lock_bh(&sk->sk_callback_lock);
queue = sk->sk_user_data;
if (!queue) {
goto done;
}
switch (sk->sk_state) {
case TCP_CLOSE:
nvmet_tc... |
CVE-2021-47043 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/media/platform/qcom/venus/core.c | venus_probe | static int venus_probe(struct platform_device *pdev) {
struct device *dev = &pdev->dev;
struct venus_core *core;
struct resource *r;
int ret;
core = devm_kzalloc(dev, sizeof(*core), GFP_KERNEL);
if (!core) {
return -ENOMEM;
}
core->dev = dev;
platform_set_drvdata(pdev, core);... | static int venus_probe(struct platform_device *pdev) {
struct device *dev = &pdev->dev;
struct venus_core *core;
struct resource *r;
int ret;
core = devm_kzalloc(dev, sizeof(*core), GFP_KERNEL);
if (!core) {
return -ENOMEM;
}
core->dev = dev;
platform_set_drvdata(pdev, core);... | static int venus_probe(struct platform_device *pdev) {
struct device *dev = &pdev->dev;
struct venus_core *core;
struct resource *r;
int ret;
core = devm_kzalloc(dev, sizeof(*core), GFP_KERNEL);
if (!core) {
return -ENOMEM;
}
core->dev = dev;
r = platform_get_resource(pdev, I... | static int venus_probe(struct platform_device *pdev) {
struct device *dev = &pdev->dev;
struct venus_core *core;
struct resource *r;
int ret;
core = devm_kzalloc(dev, sizeof(*core), GFP_KERNEL);
if (!core) {
return -ENOMEM;
}
core->dev = dev;
r = platform_get_resource(pdev, I... | static int venus_probe(struct platform_device *pdev) {
struct device *dev = &pdev->dev;
core = devm_kzalloc(dev, sizeof(*core), GFP_KERNEL);
if (!core) {
return -ENOMEM;
}
platform_set_drvdata(pdev, core);
r = platform_get_resource(pdev, IORESOURCE_MEM, 0);
core->base = devm_ioremap_... | static int venus_probe(struct platform_device *pdev) {
struct device *dev = &pdev->dev;
core = devm_kzalloc(dev, sizeof(*core), GFP_KERNEL);
if (!core) {
return -ENOMEM;
}
platform_set_drvdata(pdev, core);
r = platform_get_resource(pdev, IORESOURCE_MEM, 0);
core->base = devm_ioremap_... | static int venus_probe(struct platform_device *pdev) {
struct device *dev = &pdev->dev;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
core = devm_kzalloc(dev, sizeof(*core), GFP_KERNEL);
if (!core) {
return -ENOMEM;
}
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
r = platform_get_res... | static int venus_probe(struct platform_device *pdev) {
struct device *dev = &pdev->dev;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
core = devm_kzalloc(dev, sizeof(*core), GFP_KERNEL);
if (!core) {
return -ENOMEM;
}
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
r = platform_get_res... | static int venus_probe(struct platform_device *pdev) {
struct device *dev = &pdev->dev;
core = devm_kzalloc(dev, sizeof(*core), GFP_KERNEL);
if (!core) {
return -ENOMEM;
}
platform_set_drvdata(pdev, core);
r = platform_get_resource(pdev, IORESOURCE_MEM, 0);
core->base = devm... |
CVE-2021-47043 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/media/platform/qcom/venus/core.c | venus_remove | static int venus_remove(struct platform_device *pdev) {
struct venus_core *core = platform_get_drvdata(pdev);
const struct venus_pm_ops *pm_ops = core->pm_ops;
struct device *dev = core->dev;
int ret;
ret = pm_runtime_get_sync(dev);
WARN_ON(ret < 0);
ret = hfi_core_deinit(core, true);
WA... | static int venus_remove(struct platform_device *pdev) {
struct venus_core *core = platform_get_drvdata(pdev);
const struct venus_pm_ops *pm_ops = core->pm_ops;
struct device *dev = core->dev;
int ret;
ret = pm_runtime_get_sync(dev);
WARN_ON(ret < 0);
ret = hfi_core_deinit(core, true);
WA... | static int venus_remove(struct platform_device *pdev) {
struct venus_core *core = platform_get_drvdata(pdev);
const struct venus_pm_ops *pm_ops = core->pm_ops;
struct device *dev = core->dev;
int ret;
ret = pm_runtime_get_sync(dev);
WARN_ON(ret < 0);
ret = hfi_core_deinit(core, true);
WA... | static int venus_remove(struct platform_device *pdev) {
struct venus_core *core = platform_get_drvdata(pdev);
const struct venus_pm_ops *pm_ops = core->pm_ops;
struct device *dev = core->dev;
int ret;
ret = pm_runtime_get_sync(dev);
WARN_ON(ret < 0);
ret = hfi_core_deinit(core, true);
WA... | static int venus_remove(struct platform_device *pdev) {
struct venus_core *core = platform_get_drvdata(pdev);
ret = hfi_core_deinit(core, true);
venus_shutdown(core);
venus_firmware_deinit(core);
hfi_destroy(core);
icc_put(core->video_path);
icc_put(core->cpucfg_path);
v4l2_device_unregi... | static int venus_remove(struct platform_device *pdev) {
struct venus_core *core = platform_get_drvdata(pdev);
ret = hfi_core_deinit(core, true);
venus_shutdown(core);
venus_firmware_deinit(core);
hfi_destroy(core);
v4l2_device_unregister(&core->v4l2_dev);
venus_dbgfs_deinit(core);
}
| static int venus_remove(struct platform_device *pdev) {
struct venus_core *core = platform_get_drvdata(pdev);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
ret = hfi_core_deinit(core, true);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
venus_shutdown(core);
/* PLACEHOLDER: DO NOT DELETE THIS CO... | static int venus_remove(struct platform_device *pdev) {
struct venus_core *core = platform_get_drvdata(pdev);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
ret = hfi_core_deinit(core, true);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
venus_shutdown(core);
/* PLACEHOLDER: DO NOT DELETE THIS CO... | static int venus_remove(struct platform_device *pdev) {
struct venus_core *core = platform_get_drvdata(pdev);
ret = hfi_core_deinit(core, true);
venus_shutdown(core);
venus_firmware_deinit(core);
hfi_destroy(core);
- icc_put(core->video_path);
- icc_put(core->cpucfg_path);
v4l2_devi... |
CVE-2021-47044 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | kernel/sched/fair.c | detach_tasks | static int detach_tasks(struct lb_env *env) {
struct list_head *tasks = &env->src_rq->cfs_tasks;
unsigned long util, load;
struct task_struct *p;
int detached = 0;
lockdep_assert_held(&env->src_rq->lock);
if (env->imbalance <= 0) {
return 0;
}
while (!list_empty(tasks)) {
... | static int detach_tasks(struct lb_env *env) {
struct list_head *tasks = &env->src_rq->cfs_tasks;
unsigned long util, load;
struct task_struct *p;
int detached = 0;
lockdep_assert_held(&env->src_rq->lock);
if (env->imbalance <= 0) {
return 0;
}
while (!list_empty(tasks)) {
... | static int detach_tasks(struct lb_env *env) {
struct list_head *tasks = &env->src_rq->cfs_tasks;
unsigned long util, load;
struct task_struct *p;
int detached = 0;
lockdep_assert_held(&env->src_rq->lock);
if (env->imbalance <= 0) {
return 0;
}
while (!list_empty(tasks)) {
... | static int detach_tasks(struct lb_env *env) {
struct list_head *tasks = &env->src_rq->cfs_tasks;
unsigned long util, load;
struct task_struct *p;
int detached = 0;
lockdep_assert_held(&env->src_rq->lock);
if (env->imbalance <= 0) {
return 0;
}
while (!list_empty(tasks)) {
... | static int detach_tasks(struct lb_env *env) {
if (env->imbalance <= 0) {
return 0;
}
while (!list_empty(tasks)) {
if (env->idle != CPU_NOT_IDLE && env->src_rq->nr_running <= 1) {
break;
}
p = list_last_entry(tasks, struct task_struct, se.group_node);
env->... | static int detach_tasks(struct lb_env *env) {
if (env->imbalance <= 0) {
return 0;
}
while (!list_empty(tasks)) {
if (env->idle != CPU_NOT_IDLE && env->src_rq->nr_running <= 1) {
break;
}
p = list_last_entry(tasks, struct task_struct, se.group_node);
env->... | static int detach_tasks(struct lb_env *env) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (env->imbalance <= 0) {
return 0;
}
while (!list_empty(tasks)) {
if (env->idle != CPU_NOT_IDLE && env->src_rq->nr_running <= 1) {
break;
}
p = list_last_entry(tasks,... | static int detach_tasks(struct lb_env *env) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (env->imbalance <= 0) {
return 0;
}
while (!list_empty(tasks)) {
if (env->idle != CPU_NOT_IDLE && env->src_rq->nr_running <= 1) {
break;
}
p = list_last_entry(tasks,... | static int detach_tasks(struct lb_env *env) {
if (env->imbalance <= 0) {
return 0;
}
while (!list_empty(tasks)) {
if (env->idle != CPU_NOT_IDLE && env->src_rq->nr_running <= 1) {
break;
}
p = list_last_entry(tasks, struct task_struct, se.group_node);
... |
CVE-2021-47045 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/scsi/lpfc/lpfc_els.c | lpfc_issue_els_plogi | int lpfc_issue_els_plogi(struct lpfc_vport *vport, uint32_t did, uint8_t retry) {
struct lpfc_hba *phba = vport->phba;
struct serv_parm *sp;
struct lpfc_nodelist *ndlp;
struct lpfc_iocbq *elsiocb;
uint8_t *pcmd;
uint16_t cmdsize;
int ret;
ndlp = lpfc_findnode_did(vport, did);
if (ndl... | int lpfc_issue_els_plogi(struct lpfc_vport *vport, uint32_t did, uint8_t retry) {
struct lpfc_hba *phba = vport->phba;
struct serv_parm *sp;
struct lpfc_nodelist *ndlp;
struct lpfc_iocbq *elsiocb;
uint8_t *pcmd;
uint16_t cmdsize;
int ret;
ndlp = lpfc_findnode_did(vport, did);
if (!nd... | int lpfc_issue_els_plogi(struct lpfc_vport *vport, uint32_t did, uint8_t retry) {
struct lpfc_hba *phba = vport->phba;
struct serv_parm *sp;
struct lpfc_nodelist *ndlp;
struct lpfc_iocbq *elsiocb;
uint8_t *pcmd;
uint16_t cmdsize;
int ret;
ndlp = lpfc_findnode_did(vport, did);
if (ndl... | int lpfc_issue_els_plogi(struct lpfc_vport *vport, uint32_t did, uint8_t retry) {
struct lpfc_hba *phba = vport->phba;
struct serv_parm *sp;
struct lpfc_nodelist *ndlp;
struct lpfc_iocbq *elsiocb;
uint8_t *pcmd;
uint16_t cmdsize;
int ret;
ndlp = lpfc_findnode_did(vport, did);
if (!nd... | int lpfc_issue_els_plogi(struct lpfc_vport *vport, uint32_t did, uint8_t retry) {
ndlp = lpfc_findnode_did(vport, did);
if (ndlp) {
if ((ndlp->nlp_flag & NLP_UNREG_P) && ((ndlp->nlp_DID & Fabric_DID_MASK) != Fabric_DID_MASK) && !(vport->fc_flag & FC_OFFLE_MODE)) {
lpfc_printf_vlog(vport, KER... | int lpfc_issue_els_plogi(struct lpfc_vport *vport, uint32_t did, uint8_t retry) {
ndlp = lpfc_findnode_did(vport, did);
if (!ndlp) {
return 1;
}
if ((ndlp->nlp_flag & NLP_UNREG_P) && ((ndlp->nlp_DID & Fabric_DID_MASK) != Fabric_DID_MASK) && !(vport->fc_flag & FC_OFFLE_MODE)) {
lpfc_print... | int lpfc_issue_els_plogi(struct lpfc_vport *vport, uint32_t did, uint8_t retry) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
ndlp = lpfc_findnode_did(vport, did);
if (ndlp) {
if ((ndlp->nlp_flag & NLP_UNREG_P) && ((ndlp->nlp_DID & Fabric_DID_MASK) != Fabric_DID_MASK) && !(vport->fc_flag & FC_OFFL... | int lpfc_issue_els_plogi(struct lpfc_vport *vport, uint32_t did, uint8_t retry) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
ndlp = lpfc_findnode_did(vport, did);
if (!ndlp) {
return 1;
}
if ((ndlp->nlp_flag & NLP_UNREG_P) && ((ndlp->nlp_DID & Fabric_DID_MASK) != Fabric_DID_MASK) && !(vpo... | int lpfc_issue_els_plogi(struct lpfc_vport *vport, uint32_t did, uint8_t retry) {
ndlp = lpfc_findnode_did(vport, did);
- if (ndlp) {
- if ((ndlp->nlp_flag & NLP_UNREG_P) && ((ndlp->nlp_DID & Fabric_DID_MASK) != Fabric_DID_MASK) && !(vport->fc_flag & FC_OFFLE_MODE)) {
- lpfc_printf_vlog(vport... |
CVE-2021-47047 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/spi/spi-zynqmp-gqspi.c | zynqmp_qspi_exec_op | static int zynqmp_qspi_exec_op(struct spi_mem *mem, const struct spi_mem_op *op) {
struct zynqmp_qspi *xqspi = spi_controller_get_devdata (mem->spi->master);
int err = 0, i;
u32 genfifoentry = 0;
u16 opcode = op->cmd.opcode;
u64 opaddr;
dev_dbg(xqspi->dev, "cmd:%#x mode:%d.%d.%d.%d\n", op->cmd.o... | static int zynqmp_qspi_exec_op(struct spi_mem *mem, const struct spi_mem_op *op) {
struct zynqmp_qspi *xqspi = spi_controller_get_devdata (mem->spi->master);
int err = 0, i;
u32 genfifoentry = 0;
u16 opcode = op->cmd.opcode;
u64 opaddr;
dev_dbg(xqspi->dev, "cmd:%#x mode:%d.%d.%d.%d\n", op->cmd.o... | static int zynqmp_qspi_exec_op(struct spi_mem *mem, const struct spi_mem_op *op) {
struct zynqmp_qspi *xqspi = spi_controller_get_devdata (mem->spi->master);
int err = 0, i;
u32 genfifoentry = 0;
u16 opcode = op->cmd.opcode;
u64 opaddr;
dev_dbg(xqspi->dev, "cmd:%#x mode:%d.%d.%d.%d\n", op->cmd.o... | static int zynqmp_qspi_exec_op(struct spi_mem *mem, const struct spi_mem_op *op) {
struct zynqmp_qspi *xqspi = spi_controller_get_devdata (mem->spi->master);
int err = 0, i;
u32 genfifoentry = 0;
u16 opcode = op->cmd.opcode;
u64 opaddr;
dev_dbg(xqspi->dev, "cmd:%#x mode:%d.%d.%d.%d\n", op->cmd.o... | static int zynqmp_qspi_exec_op(struct spi_mem *mem, const struct spi_mem_op *op) {
struct zynqmp_qspi *xqspi = spi_controller_get_devdata (mem->spi->master);
u32 genfifoentry = 0;
dev_dbg(xqspi->dev, "cmd:%#x mode:%d.%d.%d.%d\n", op->cmd.opcode, op->cmd.buswidth, op->addr.buswidth, op->dummy.buswidth, op->d... | static int zynqmp_qspi_exec_op(struct spi_mem *mem, const struct spi_mem_op *op) {
struct zynqmp_qspi *xqspi = spi_controller_get_devdata (mem->spi->master);
u32 genfifoentry = 0;
dev_dbg(xqspi->dev, "cmd:%#x mode:%d.%d.%d.%d\n", op->cmd.opcode, op->cmd.buswidth, op->addr.buswidth, op->dummy.buswidth, op->d... | static int zynqmp_qspi_exec_op(struct spi_mem *mem, const struct spi_mem_op *op) {
struct zynqmp_qspi *xqspi = spi_controller_get_devdata (mem->spi->master);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
u32 genfifoentry = 0;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
dev_dbg(xqspi->dev, "cmd:%#x... | static int zynqmp_qspi_exec_op(struct spi_mem *mem, const struct spi_mem_op *op) {
struct zynqmp_qspi *xqspi = spi_controller_get_devdata (mem->spi->master);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
u32 genfifoentry = 0;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
dev_dbg(xqspi->dev, "cmd:%#x... | static int zynqmp_qspi_exec_op(struct spi_mem *mem, const struct spi_mem_op *op) {
struct zynqmp_qspi *xqspi = spi_controller_get_devdata (mem->spi->master);
u32 genfifoentry = 0;
dev_dbg(xqspi->dev, "cmd:%#x mode:%d.%d.%d.%d\n", op->cmd.opcode, op->cmd.buswidth, op->addr.buswidth, op->dummy.buswidth, o... |
CVE-2021-47047 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/spi/spi-zynqmp-gqspi.c | zynqmp_qspi_probe | static int zynqmp_qspi_probe(struct platform_device *pdev) {
int ret = 0;
struct spi_controller *ctlr;
struct zynqmp_qspi *xqspi;
struct device *dev = &pdev->dev;
struct device_node *np = dev->of_node;
ctlr = spi_alloc_master(&pdev->dev, sizeof(*xqspi));
if (!ctlr) {
return -ENOMEM;
... | static int zynqmp_qspi_probe(struct platform_device *pdev) {
int ret = 0;
struct spi_controller *ctlr;
struct zynqmp_qspi *xqspi;
struct device *dev = &pdev->dev;
struct device_node *np = dev->of_node;
ctlr = spi_alloc_master(&pdev->dev, sizeof(*xqspi));
if (!ctlr) {
return -ENOMEM;
... | static int zynqmp_qspi_probe(struct platform_device *pdev) {
int ret = 0;
struct spi_controller *ctlr;
struct zynqmp_qspi *xqspi;
struct device *dev = &pdev->dev;
struct device_node *np = dev->of_node;
ctlr = spi_alloc_master(&pdev->dev, sizeof(*xqspi));
if (!ctlr) {
return -ENOMEM;
... | static int zynqmp_qspi_probe(struct platform_device *pdev) {
int ret = 0;
struct spi_controller *ctlr;
struct zynqmp_qspi *xqspi;
struct device *dev = &pdev->dev;
struct device_node *np = dev->of_node;
ctlr = spi_alloc_master(&pdev->dev, sizeof(*xqspi));
if (!ctlr) {
return -ENOMEM;
... | static int zynqmp_qspi_probe(struct platform_device *pdev) {
ctlr = spi_alloc_master(&pdev->dev, sizeof(*xqspi));
if (!ctlr) {
return -ENOMEM;
}
xqspi = spi_controller_get_devdata(ctlr);
platform_set_drvdata(pdev, xqspi);
xqspi->regs = devm_platform_ioremap_resource(pdev, 0);
xqspi->... | static int zynqmp_qspi_probe(struct platform_device *pdev) {
ctlr = spi_alloc_master(&pdev->dev, sizeof(*xqspi));
if (!ctlr) {
return -ENOMEM;
}
xqspi = spi_controller_get_devdata(ctlr);
platform_set_drvdata(pdev, xqspi);
xqspi->regs = devm_platform_ioremap_resource(pdev, 0);
xqspi->... | static int zynqmp_qspi_probe(struct platform_device *pdev) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
ctlr = spi_alloc_master(&pdev->dev, sizeof(*xqspi));
if (!ctlr) {
return -ENOMEM;
}
xqspi = spi_controller_get_devdata(ctlr);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
platf... | static int zynqmp_qspi_probe(struct platform_device *pdev) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
ctlr = spi_alloc_master(&pdev->dev, sizeof(*xqspi));
if (!ctlr) {
return -ENOMEM;
}
xqspi = spi_controller_get_devdata(ctlr);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
platf... | static int zynqmp_qspi_probe(struct platform_device *pdev) {
ctlr = spi_alloc_master(&pdev->dev, sizeof(*xqspi));
if (!ctlr) {
return -ENOMEM;
}
xqspi = spi_controller_get_devdata(ctlr);
platform_set_drvdata(pdev, xqspi);
xqspi->regs = devm_platform_ioremap_resource(pdev, 0);
... |
CVE-2021-47047 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/spi/spi-zynqmp-gqspi.c | zynqmp_qspi_read_op | static void zynqmp_qspi_read_op(struct zynqmp_qspi *xqspi, u8 rx_nbits, u32 genfifoentry) {
zynqmp_qspi_setuprxdma(xqspi);
zynqmp_qspi_fillgenfifo(xqspi, rx_nbits, genfifoentry);
} | static int zynqmp_qspi_read_op(struct zynqmp_qspi *xqspi, u8 rx_nbits, u32 genfifoentry) {
int ret;
ret = zynqmp_qspi_setuprxdma(xqspi);
if (ret) {
return ret;
}
zynqmp_qspi_fillgenfifo(xqspi, rx_nbits, genfifoentry);
return 0;
} | static void zynqmp_qspi_read_op(struct zynqmp_qspi *xqspi, u8 rx_nbits, u32 genfifoentry) {
zynqmp_qspi_setuprxdma(xqspi);
zynqmp_qspi_fillgenfifo(xqspi, rx_nbits, genfifoentry);
} | static int zynqmp_qspi_read_op(struct zynqmp_qspi *xqspi, u8 rx_nbits, u32 genfifoentry) {
int ret;
ret = zynqmp_qspi_setuprxdma(xqspi);
if (ret) {
return ret;
}
zynqmp_qspi_fillgenfifo(xqspi, rx_nbits, genfifoentry);
return 0;
} | static void zynqmp_qspi_read_op(struct zynqmp_qspi *xqspi, u8 rx_nbits, u32 genfifoentry) {
zynqmp_qspi_setuprxdma(xqspi);
zynqmp_qspi_fillgenfifo(xqspi, rx_nbits, genfifoentry);
}
| static int zynqmp_qspi_read_op(struct zynqmp_qspi *xqspi, u8 rx_nbits, u32 genfifoentry) {
int ret;
ret = zynqmp_qspi_setuprxdma(xqspi);
if (ret) {
return ret;
}
zynqmp_qspi_fillgenfifo(xqspi, rx_nbits, genfifoentry);
return 0;
}
| static void zynqmp_qspi_read_op(struct zynqmp_qspi *xqspi, u8 rx_nbits, u32 genfifoentry) {
zynqmp_qspi_setuprxdma(xqspi);
zynqmp_qspi_fillgenfifo(xqspi, rx_nbits, genfifoentry);
}
| static int zynqmp_qspi_read_op(struct zynqmp_qspi *xqspi, u8 rx_nbits, u32 genfifoentry) {
int ret;
ret = zynqmp_qspi_setuprxdma(xqspi);
if (ret) {
return ret;
}
zynqmp_qspi_fillgenfifo(xqspi, rx_nbits, genfifoentry);
return 0;
} | -static void zynqmp_qspi_read_op(struct zynqmp_qspi *xqspi, u8 rx_nbits, u32 genfifoentry) {
- zynqmp_qspi_setuprxdma(xqspi);
+static int zynqmp_qspi_read_op(struct zynqmp_qspi *xqspi, u8 rx_nbits, u32 genfifoentry) {
+ int ret;
+ ret = zynqmp_qspi_setuprxdma(xqspi);
+ if (ret) {
+ return ret;
+ }... |
CVE-2021-47047 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/spi/spi-zynqmp-gqspi.c | zynqmp_qspi_setuprxdma | static void zynqmp_qspi_setuprxdma(struct zynqmp_qspi *xqspi) {
u32 rx_bytes, rx_rem, config_reg;
dma_addr_t addr;
u64 dma_align = (u64)(uintptr_t)xqspi->rxbuf;
if (xqspi->bytes_to_receive < 8 || ((dma_align & GQSPI_DMA_UNALIGN) != 0x0)) {
config_reg = zynqmp_gqspi_read(xqspi, GQSPI_CONFIG_OFST)... | static int zynqmp_qspi_setuprxdma(struct zynqmp_qspi *xqspi) {
u32 rx_bytes, rx_rem, config_reg;
dma_addr_t addr;
u64 dma_align = (u64)(uintptr_t)xqspi->rxbuf;
if (xqspi->bytes_to_receive < 8 || ((dma_align & GQSPI_DMA_UNALIGN) != 0x0)) {
config_reg = zynqmp_gqspi_read(xqspi, GQSPI_CONFIG_OFST);... | static void zynqmp_qspi_setuprxdma(struct zynqmp_qspi *xqspi) {
u32 rx_bytes, rx_rem, config_reg;
dma_addr_t addr;
u64 dma_align = (u64)(uintptr_t)xqspi->rxbuf;
if (xqspi->bytes_to_receive < 8 || ((dma_align & GQSPI_DMA_UNALIGN) != 0x0)) {
config_reg = zynqmp_gqspi_read(xqspi, GQSPI_CONFIG_OFST)... | static int zynqmp_qspi_setuprxdma(struct zynqmp_qspi *xqspi) {
u32 rx_bytes, rx_rem, config_reg;
dma_addr_t addr;
u64 dma_align = (u64)(uintptr_t)xqspi->rxbuf;
if (xqspi->bytes_to_receive < 8 || ((dma_align & GQSPI_DMA_UNALIGN) != 0x0)) {
config_reg = zynqmp_gqspi_read(xqspi, GQSPI_CONFIG_OFST);... | static void zynqmp_qspi_setuprxdma(struct zynqmp_qspi *xqspi) {
if (xqspi->bytes_to_receive < 8 || ((dma_align & GQSPI_DMA_UNALIGN) != 0x0)) {
xqspi->dma_rx_bytes = 0;
return;
}
if (dma_mapping_error(xqspi->dev, addr)) {
dev_err(xqspi->dev, "ERR:rxdma:memory not mapped\n");
}
... | static int zynqmp_qspi_setuprxdma(struct zynqmp_qspi *xqspi) {
if (xqspi->bytes_to_receive < 8 || ((dma_align & GQSPI_DMA_UNALIGN) != 0x0)) {
xqspi->dma_rx_bytes = 0;
return 0;
}
if (dma_mapping_error(xqspi->dev, addr)) {
dev_err(xqspi->dev, "ERR:rxdma:memory not mapped\n");
... | static void zynqmp_qspi_setuprxdma(struct zynqmp_qspi *xqspi) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (xqspi->bytes_to_receive < 8 || ((dma_align & GQSPI_DMA_UNALIGN) != 0x0)) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
xqspi->dma_rx_bytes = 0;
return;
}
/* PLACEHOLDER... | static int zynqmp_qspi_setuprxdma(struct zynqmp_qspi *xqspi) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (xqspi->bytes_to_receive < 8 || ((dma_align & GQSPI_DMA_UNALIGN) != 0x0)) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
xqspi->dma_rx_bytes = 0;
return 0;
}
/* PLACEHOLDE... | -static void zynqmp_qspi_setuprxdma(struct zynqmp_qspi *xqspi) {
+static int zynqmp_qspi_setuprxdma(struct zynqmp_qspi *xqspi) {
if (xqspi->bytes_to_receive < 8 || ((dma_align & GQSPI_DMA_UNALIGN) != 0x0)) {
xqspi->dma_rx_bytes = 0;
- return;
+ return 0;
}
if (dma_mapping_error(xqs... |
CVE-2021-47048 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/spi/spi-zynqmp-gqspi.c | zynqmp_qspi_exec_op | static int zynqmp_qspi_exec_op(struct spi_mem *mem, const struct spi_mem_op *op) {
struct zynqmp_qspi *xqspi = spi_controller_get_devdata (mem->spi->master);
int err = 0, i;
u8 *tmpbuf;
u32 genfifoentry = 0;
dev_dbg(xqspi->dev, "cmd:%#x mode:%d.%d.%d.%d\n", op->cmd.opcode, op->cmd.buswidth, op->addr... | static int zynqmp_qspi_exec_op(struct spi_mem *mem, const struct spi_mem_op *op) {
struct zynqmp_qspi *xqspi = spi_controller_get_devdata (mem->spi->master);
int err = 0, i;
u32 genfifoentry = 0;
u16 opcode = op->cmd.opcode;
u64 opaddr;
dev_dbg(xqspi->dev, "cmd:%#x mode:%d.%d.%d.%d\n", op->cmd.o... | static int zynqmp_qspi_exec_op(struct spi_mem *mem, const struct spi_mem_op *op) {
struct zynqmp_qspi *xqspi = spi_controller_get_devdata (mem->spi->master);
int err = 0, i;
u8 *tmpbuf;
u32 genfifoentry = 0;
dev_dbg(xqspi->dev, "cmd:%#x mode:%d.%d.%d.%d\n", op->cmd.opcode, op->cmd.buswidth, op->addr... | static int zynqmp_qspi_exec_op(struct spi_mem *mem, const struct spi_mem_op *op) {
struct zynqmp_qspi *xqspi = spi_controller_get_devdata (mem->spi->master);
int err = 0, i;
u32 genfifoentry = 0;
u16 opcode = op->cmd.opcode;
u64 opaddr;
dev_dbg(xqspi->dev, "cmd:%#x mode:%d.%d.%d.%d\n", op->cmd.o... | static int zynqmp_qspi_exec_op(struct spi_mem *mem, const struct spi_mem_op *op) {
struct zynqmp_qspi *xqspi = spi_controller_get_devdata (mem->spi->master);
int err = 0, i;
u8 *tmpbuf;
u32 genfifoentry = 0;
dev_dbg(xqspi->dev, "cmd:%#x mode:%d.%d.%d.%d\n", op->cmd.opcode, op->cmd.buswidth, op->addr... | static int zynqmp_qspi_exec_op(struct spi_mem *mem, const struct spi_mem_op *op) {
struct zynqmp_qspi *xqspi = spi_controller_get_devdata (mem->spi->master);
int err = 0, i;
u32 genfifoentry = 0;
u16 opcode = op->cmd.opcode;
u64 opaddr;
dev_dbg(xqspi->dev, "cmd:%#x mode:%d.%d.%d.%d\n", op->cmd.o... | static int zynqmp_qspi_exec_op(struct spi_mem *mem, const struct spi_mem_op *op) {
struct zynqmp_qspi *xqspi = spi_controller_get_devdata (mem->spi->master);
int err = 0, i;
u8 *tmpbuf;
u32 genfifoentry = 0;
dev_dbg(xqspi->dev, "cmd:%#x mode:%d.%d.%d.%d\n", op->cmd.opcode, op->cmd.buswidth, op->addr... | static int zynqmp_qspi_exec_op(struct spi_mem *mem, const struct spi_mem_op *op) {
struct zynqmp_qspi *xqspi = spi_controller_get_devdata (mem->spi->master);
int err = 0, i;
u32 genfifoentry = 0;
u16 opcode = op->cmd.opcode;
u64 opaddr;
dev_dbg(xqspi->dev, "cmd:%#x mode:%d.%d.%d.%d\n", op->cmd.o... | static int zynqmp_qspi_exec_op(struct spi_mem *mem, const struct spi_mem_op *op) {
struct zynqmp_qspi *xqspi = spi_controller_get_devdata (mem->spi->master);
int err = 0, i;
- u8 *tmpbuf;
u32 genfifoentry = 0;
+ u16 opcode = op->cmd.opcode;
+ u64 opaddr;
dev_dbg(xqspi->dev, "cmd:%#x mode:%... |
CVE-2021-47049 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/hv/channel.c | __vmbus_open | static int __vmbus_open(struct vmbus_channel *newchannel, void *userdata, u32 userdatalen, void (*onchannelcallback)(void *context), void *context) {
struct vmbus_channel_open_channel *open_msg;
struct vmbus_channel_msginfo *open_info = NULL;
struct page *page = newchannel->ringbuffer_page;
u32 send_pag... | static int __vmbus_open(struct vmbus_channel *newchannel, void *userdata, u32 userdatalen, void (*onchannelcallback)(void *context), void *context) {
struct vmbus_channel_open_channel *open_msg;
struct vmbus_channel_msginfo *open_info = NULL;
struct page *page = newchannel->ringbuffer_page;
u32 send_pag... | static int __vmbus_open(struct vmbus_channel *newchannel, void *userdata, u32 userdatalen, void (*onchannelcallback)(void *context), void *context) {
struct vmbus_channel_open_channel *open_msg;
struct vmbus_channel_msginfo *open_info = NULL;
struct page *page = newchannel->ringbuffer_page;
u32 send_pag... | static int __vmbus_open(struct vmbus_channel *newchannel, void *userdata, u32 userdatalen, void (*onchannelcallback)(void *context), void *context) {
struct vmbus_channel_open_channel *open_msg;
struct vmbus_channel_msginfo *open_info = NULL;
struct page *page = newchannel->ringbuffer_page;
u32 send_pag... | static int __vmbus_open(struct vmbus_channel *newchannel, void *userdata, u32 userdatalen, void (*onchannelcallback)(void *context), void *context) {
if (newchannel->rescind) {
err = -ENODEV;
goto error_free_info;
}
error_clean_msglist:
spin_lock_irqsave(&vmbus_connection.channelmsg_lock, fl... | static int __vmbus_open(struct vmbus_channel *newchannel, void *userdata, u32 userdatalen, void (*onchannelcallback)(void *context), void *context) {
if (newchannel->rescind) {
err = -ENODEV;
goto error_clean_msglist;
}
error_clean_msglist:
spin_lock_irqsave(&vmbus_connection.channelmsg_lock... | static int __vmbus_open(struct vmbus_channel *newchannel, void *userdata, u32 userdatalen, void (*onchannelcallback)(void *context), void *context) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (newchannel->rescind) {
err = -ENODEV;
goto error_free_info;
}
/* PLACEHOLDER: DO NOT DEL... | static int __vmbus_open(struct vmbus_channel *newchannel, void *userdata, u32 userdatalen, void (*onchannelcallback)(void *context), void *context) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (newchannel->rescind) {
err = -ENODEV;
goto error_clean_msglist;
}
/* PLACEHOLDER: DO NOT... | static int __vmbus_open(struct vmbus_channel *newchannel, void *userdata, u32 userdatalen, void (*onchannelcallback)(void *context), void *context) {
if (newchannel->rescind) {
err = -ENODEV;
- goto error_free_info;
+ goto error_clean_msglist;
}
error_clean_msglist:
spin_lock_irq... |
CVE-2021-47050 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/memory/renesas-rpc-if.c | rpcif_sw_init | int rpcif_sw_init(struct rpcif *rpc, struct device *dev) {
struct platform_device *pdev = to_platform_device(dev);
struct resource *res;
void __iomem *base;
rpc->dev = dev;
res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "regs");
base = devm_ioremap_resource(&pdev->dev, res);
if (IS... | int rpcif_sw_init(struct rpcif *rpc, struct device *dev) {
struct platform_device *pdev = to_platform_device(dev);
struct resource *res;
void __iomem *base;
rpc->dev = dev;
res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "regs");
base = devm_ioremap_resource(&pdev->dev, res);
if (IS... | int rpcif_sw_init(struct rpcif *rpc, struct device *dev) {
struct platform_device *pdev = to_platform_device(dev);
struct resource *res;
void __iomem *base;
rpc->dev = dev;
res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "regs");
base = devm_ioremap_resource(&pdev->dev, res);
if (IS... | int rpcif_sw_init(struct rpcif *rpc, struct device *dev) {
struct platform_device *pdev = to_platform_device(dev);
struct resource *res;
void __iomem *base;
rpc->dev = dev;
res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "regs");
base = devm_ioremap_resource(&pdev->dev, res);
if (IS... | int rpcif_sw_init(struct rpcif *rpc, struct device *dev) {
struct platform_device *pdev = to_platform_device(dev);
res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "regs");
res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "dirmap");
rpc->size = resource_size(res);
rpc->dirmap = devm_... | int rpcif_sw_init(struct rpcif *rpc, struct device *dev) {
struct platform_device *pdev = to_platform_device(dev);
res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "regs");
res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "dirmap");
rpc->dirmap = devm_ioremap_resource(&pdev->dev, res);
... | int rpcif_sw_init(struct rpcif *rpc, struct device *dev) {
struct platform_device *pdev = to_platform_device(dev);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "regs");
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
res = platform_get_resource... | int rpcif_sw_init(struct rpcif *rpc, struct device *dev) {
struct platform_device *pdev = to_platform_device(dev);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "regs");
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
res = platform_get_resource... | int rpcif_sw_init(struct rpcif *rpc, struct device *dev) {
struct platform_device *pdev = to_platform_device(dev);
res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "regs");
res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "dirmap");
- rpc->size = resource_size(res);
rpc->dirmap =... |
CVE-2021-47051 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/spi/spi-fsl-lpspi.c | lpspi_prepare_xfer_hardware | static int lpspi_prepare_xfer_hardware(struct spi_controller *controller) {
struct fsl_lpspi_data *fsl_lpspi = spi_controller_get_devdata(controller);
int ret;
ret = pm_runtime_get_sync(fsl_lpspi->dev);
if (ret < 0) {
dev_err(fsl_lpspi->dev, "failed to enable clock\n");
return ret;
}... | static int lpspi_prepare_xfer_hardware(struct spi_controller *controller) {
struct fsl_lpspi_data *fsl_lpspi = spi_controller_get_devdata(controller);
int ret;
ret = pm_runtime_resume_and_get(fsl_lpspi->dev);
if (ret < 0) {
dev_err(fsl_lpspi->dev, "failed to enable clock\n");
return ret;... | static int lpspi_prepare_xfer_hardware(struct spi_controller *controller) {
struct fsl_lpspi_data *fsl_lpspi = spi_controller_get_devdata(controller);
int ret;
ret = pm_runtime_get_sync(fsl_lpspi->dev);
if (ret < 0) {
dev_err(fsl_lpspi->dev, "failed to enable clock\n");
return ret;
}... | static int lpspi_prepare_xfer_hardware(struct spi_controller *controller) {
struct fsl_lpspi_data *fsl_lpspi = spi_controller_get_devdata(controller);
int ret;
ret = pm_runtime_resume_and_get(fsl_lpspi->dev);
if (ret < 0) {
dev_err(fsl_lpspi->dev, "failed to enable clock\n");
return ret;... | static int lpspi_prepare_xfer_hardware(struct spi_controller *controller) {
struct fsl_lpspi_data *fsl_lpspi = spi_controller_get_devdata(controller);
int ret;
ret = pm_runtime_get_sync(fsl_lpspi->dev);
if (ret < 0) {
dev_err(fsl_lpspi->dev, "failed to enable clock\n");
return ret;
}... | static int lpspi_prepare_xfer_hardware(struct spi_controller *controller) {
struct fsl_lpspi_data *fsl_lpspi = spi_controller_get_devdata(controller);
int ret;
ret = pm_runtime_resume_and_get(fsl_lpspi->dev);
if (ret < 0) {
dev_err(fsl_lpspi->dev, "failed to enable clock\n");
return ret;... | static int lpspi_prepare_xfer_hardware(struct spi_controller *controller) {
struct fsl_lpspi_data *fsl_lpspi = spi_controller_get_devdata(controller);
int ret;
ret = pm_runtime_get_sync(fsl_lpspi->dev);
if (ret < 0) {
dev_err(fsl_lpspi->dev, "failed to enable clock\n");
return ret;
}... | static int lpspi_prepare_xfer_hardware(struct spi_controller *controller) {
struct fsl_lpspi_data *fsl_lpspi = spi_controller_get_devdata(controller);
int ret;
ret = pm_runtime_resume_and_get(fsl_lpspi->dev);
if (ret < 0) {
dev_err(fsl_lpspi->dev, "failed to enable clock\n");
return ret;... | static int lpspi_prepare_xfer_hardware(struct spi_controller *controller) {
struct fsl_lpspi_data *fsl_lpspi = spi_controller_get_devdata(controller);
int ret;
- ret = pm_runtime_get_sync(fsl_lpspi->dev);
+ ret = pm_runtime_resume_and_get(fsl_lpspi->dev);
if (ret < 0) {
dev_err(fsl_lpspi-... |
CVE-2021-47052 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/crypto/sa2ul.c | sa_run | static int sa_run(struct sa_req *req) {
struct sa_rx_data *rxd;
gfp_t gfp_flags;
u32 cmdl[SA_MAX_CMDL_WORDS];
struct sa_crypto_data *pdata = dev_get_drvdata(sa_k3_dev);
struct device *ddev;
struct dma_chan *dma_rx;
int sg_nents, src_nents, dst_nents;
struct scatterlist *src, *dst;
si... | static int sa_run(struct sa_req *req) {
struct sa_rx_data *rxd;
gfp_t gfp_flags;
u32 cmdl[SA_MAX_CMDL_WORDS];
struct sa_crypto_data *pdata = dev_get_drvdata(sa_k3_dev);
struct device *ddev;
struct dma_chan *dma_rx;
int sg_nents, src_nents, dst_nents;
struct scatterlist *src, *dst;
si... | static int sa_run(struct sa_req *req) {
struct sa_rx_data *rxd;
gfp_t gfp_flags;
u32 cmdl[SA_MAX_CMDL_WORDS];
struct sa_crypto_data *pdata = dev_get_drvdata(sa_k3_dev);
struct device *ddev;
struct dma_chan *dma_rx;
int sg_nents, src_nents, dst_nents;
struct scatterlist *src, *dst;
si... | static int sa_run(struct sa_req *req) {
struct sa_rx_data *rxd;
gfp_t gfp_flags;
u32 cmdl[SA_MAX_CMDL_WORDS];
struct sa_crypto_data *pdata = dev_get_drvdata(sa_k3_dev);
struct device *ddev;
struct dma_chan *dma_rx;
int sg_nents, src_nents, dst_nents;
struct scatterlist *src, *dst;
si... | static int sa_run(struct sa_req *req) {
gfp_flags = req->base->flags & CRYPTO_TFM_REQ_MAY_SLEEP ? GFP_KERNEL : GFP_ATOMIC;
rxd = kzalloc(sizeof(*rxd), gfp_flags);
if (!rxd) {
return -ENOMEM;
}
if (sg_nents == 1 && split_size <= req->src->length) {
if (ret) {
return ret;
... | static int sa_run(struct sa_req *req) {
gfp_flags = req->base->flags & CRYPTO_TFM_REQ_MAY_SLEEP ? GFP_KERNEL : GFP_ATOMIC;
rxd = kzalloc(sizeof(*rxd), gfp_flags);
if (!rxd) {
return -ENOMEM;
}
if (sg_nents == 1 && split_size <= req->src->length) {
if (ret) {
kfree(rxd);
... | static int sa_run(struct sa_req *req) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
gfp_flags = req->base->flags & CRYPTO_TFM_REQ_MAY_SLEEP ? GFP_KERNEL : GFP_ATOMIC;
rxd = kzalloc(sizeof(*rxd), gfp_flags);
if (!rxd) {
return -ENOMEM;
}
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
... | static int sa_run(struct sa_req *req) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
gfp_flags = req->base->flags & CRYPTO_TFM_REQ_MAY_SLEEP ? GFP_KERNEL : GFP_ATOMIC;
rxd = kzalloc(sizeof(*rxd), gfp_flags);
if (!rxd) {
return -ENOMEM;
}
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
... | static int sa_run(struct sa_req *req) {
gfp_flags = req->base->flags & CRYPTO_TFM_REQ_MAY_SLEEP ? GFP_KERNEL : GFP_ATOMIC;
rxd = kzalloc(sizeof(*rxd), gfp_flags);
if (!rxd) {
return -ENOMEM;
}
if (sg_nents == 1 && split_size <= req->src->length) {
if (ret) {
+ kfre... |
CVE-2021-47053 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/crypto/allwinner/sun8i-ss/sun8i-ss-hash.c | sun8i_ss_hash_run | int sun8i_ss_hash_run(struct crypto_engine *engine, void *breq) {
struct ahash_request *areq = container_of(breq, struct ahash_request, base);
struct crypto_ahash *tfm = crypto_ahash_reqtfm(areq);
struct ahash_alg *alg = __crypto_ahash_alg(tfm->base.__crt_alg);
struct sun8i_ss_hash_reqctx *rctx = ahash_... | int sun8i_ss_hash_run(struct crypto_engine *engine, void *breq) {
struct ahash_request *areq = container_of(breq, struct ahash_request, base);
struct crypto_ahash *tfm = crypto_ahash_reqtfm(areq);
struct ahash_alg *alg = __crypto_ahash_alg(tfm->base.__crt_alg);
struct sun8i_ss_hash_reqctx *rctx = ahash_... | int sun8i_ss_hash_run(struct crypto_engine *engine, void *breq) {
struct ahash_request *areq = container_of(breq, struct ahash_request, base);
struct crypto_ahash *tfm = crypto_ahash_reqtfm(areq);
struct ahash_alg *alg = __crypto_ahash_alg(tfm->base.__crt_alg);
struct sun8i_ss_hash_reqctx *rctx = ahash_... | int sun8i_ss_hash_run(struct crypto_engine *engine, void *breq) {
struct ahash_request *areq = container_of(breq, struct ahash_request, base);
struct crypto_ahash *tfm = crypto_ahash_reqtfm(areq);
struct ahash_alg *alg = __crypto_ahash_alg(tfm->base.__crt_alg);
struct sun8i_ss_hash_reqctx *rctx = ahash_... | int sun8i_ss_hash_run(struct crypto_engine *engine, void *breq) {
struct crypto_ahash *tfm = crypto_ahash_reqtfm(areq);
struct sun8i_ss_hash_reqctx *rctx = ahash_request_ctx(areq);
ss = algt->ss;
digestsize = algt->alg.hash.halg.digestsize;
if (digestsize == SHA224_DIGEST_SIZE) {
digestsize ... | int sun8i_ss_hash_run(struct crypto_engine *engine, void *breq) {
struct crypto_ahash *tfm = crypto_ahash_reqtfm(areq);
struct sun8i_ss_hash_reqctx *rctx = ahash_request_ctx(areq);
ss = algt->ss;
digestsize = algt->alg.hash.halg.digestsize;
if (digestsize == SHA224_DIGEST_SIZE) {
digestsize ... | int sun8i_ss_hash_run(struct crypto_engine *engine, void *breq) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
struct crypto_ahash *tfm = crypto_ahash_reqtfm(areq);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
struct sun8i_ss_hash_reqctx *rctx = ahash_request_ctx(areq);
/* PLACEHOLDER: DO NOT DELE... | int sun8i_ss_hash_run(struct crypto_engine *engine, void *breq) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
struct crypto_ahash *tfm = crypto_ahash_reqtfm(areq);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
struct sun8i_ss_hash_reqctx *rctx = ahash_request_ctx(areq);
/* PLACEHOLDER: DO NOT DELE... | int sun8i_ss_hash_run(struct crypto_engine *engine, void *breq) {
struct crypto_ahash *tfm = crypto_ahash_reqtfm(areq);
struct sun8i_ss_hash_reqctx *rctx = ahash_request_ctx(areq);
ss = algt->ss;
digestsize = algt->alg.hash.halg.digestsize;
if (digestsize == SHA224_DIGEST_SIZE) {
dige... |
CVE-2021-47054 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/bus/qcom-ebi2.c | qcom_ebi2_probe | static int qcom_ebi2_probe(struct platform_device *pdev) {
struct device_node *np = pdev->dev.of_node;
struct device_node *child;
struct device *dev = &pdev->dev;
struct resource *res;
void __iomem *ebi2_base;
void __iomem *ebi2_xmem;
struct clk *ebi2xclk;
struct clk *ebi2clk;
bool h... | static int qcom_ebi2_probe(struct platform_device *pdev) {
struct device_node *np = pdev->dev.of_node;
struct device_node *child;
struct device *dev = &pdev->dev;
struct resource *res;
void __iomem *ebi2_base;
void __iomem *ebi2_xmem;
struct clk *ebi2xclk;
struct clk *ebi2clk;
bool h... | static int qcom_ebi2_probe(struct platform_device *pdev) {
struct device_node *np = pdev->dev.of_node;
struct device_node *child;
struct device *dev = &pdev->dev;
struct resource *res;
void __iomem *ebi2_base;
void __iomem *ebi2_xmem;
struct clk *ebi2xclk;
struct clk *ebi2clk;
bool h... | static int qcom_ebi2_probe(struct platform_device *pdev) {
struct device_node *np = pdev->dev.of_node;
struct device_node *child;
struct device *dev = &pdev->dev;
struct resource *res;
void __iomem *ebi2_base;
void __iomem *ebi2_xmem;
struct clk *ebi2xclk;
struct clk *ebi2clk;
bool h... | static int qcom_ebi2_probe(struct platform_device *pdev) {
struct device_node *np = pdev->dev.of_node;
for_each_available_child_of_node(np, child) {
u32 csindex;
ret = of_property_read_u32(child, "reg", &csindex);
if (ret) {
return ret;
}
if (csindex > 5) {
... | static int qcom_ebi2_probe(struct platform_device *pdev) {
struct device_node *np = pdev->dev.of_node;
for_each_available_child_of_node(np, child) {
u32 csindex;
ret = of_property_read_u32(child, "reg", &csindex);
if (ret) {
of_node_put(child);
return ret;
... | static int qcom_ebi2_probe(struct platform_device *pdev) {
struct device_node *np = pdev->dev.of_node;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
for_each_available_child_of_node(np, child) {
u32 csindex;
ret = of_property_read_u32(child, "reg", &csindex);
if (ret) {
r... | static int qcom_ebi2_probe(struct platform_device *pdev) {
struct device_node *np = pdev->dev.of_node;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
for_each_available_child_of_node(np, child) {
u32 csindex;
ret = of_property_read_u32(child, "reg", &csindex);
if (ret) {
o... | static int qcom_ebi2_probe(struct platform_device *pdev) {
struct device_node *np = pdev->dev.of_node;
for_each_available_child_of_node(np, child) {
u32 csindex;
ret = of_property_read_u32(child, "reg", &csindex);
if (ret) {
+ of_node_put(child);
return ret;... |
CVE-2021-47056 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/crypto/qat/qat_c3xxxvf/adf_drv.c | adf_probe | static int adf_probe(struct pci_dev *pdev, const struct pci_device_id *ent) {
struct adf_accel_dev *accel_dev;
struct adf_accel_dev *pf;
struct adf_accel_pci *accel_pci_dev;
struct adf_hw_device_data *hw_data;
char name[ADF_DEVICE_NAME_LENGTH];
unsigned int i, bar_nr;
unsigned long bar_mask;... | static int adf_probe(struct pci_dev *pdev, const struct pci_device_id *ent) {
struct adf_accel_dev *accel_dev;
struct adf_accel_dev *pf;
struct adf_accel_pci *accel_pci_dev;
struct adf_hw_device_data *hw_data;
char name[ADF_DEVICE_NAME_LENGTH];
unsigned int i, bar_nr;
unsigned long bar_mask;... | static int adf_probe(struct pci_dev *pdev, const struct pci_device_id *ent) {
struct adf_accel_dev *accel_dev;
struct adf_accel_dev *pf;
struct adf_accel_pci *accel_pci_dev;
struct adf_hw_device_data *hw_data;
char name[ADF_DEVICE_NAME_LENGTH];
unsigned int i, bar_nr;
unsigned long bar_mask;... | static int adf_probe(struct pci_dev *pdev, const struct pci_device_id *ent) {
struct adf_accel_dev *accel_dev;
struct adf_accel_dev *pf;
struct adf_accel_pci *accel_pci_dev;
struct adf_hw_device_data *hw_data;
char name[ADF_DEVICE_NAME_LENGTH];
unsigned int i, bar_nr;
unsigned long bar_mask;... | static int adf_probe(struct pci_dev *pdev, const struct pci_device_id *ent) {
accel_dev = kzalloc_node(sizeof(*accel_dev), GFP_KERNEL, dev_to_node(&pdev->dev));
if (!accel_dev) {
return -ENOMEM;
}
pf = adf_devmgr_pci_to_accel_dev(pdev->physfn);
if (adf_devmgr_add_dev(accel_dev, pf)) {
... | static int adf_probe(struct pci_dev *pdev, const struct pci_device_id *ent) {
accel_dev = kzalloc_node(sizeof(*accel_dev), GFP_KERNEL, dev_to_node(&pdev->dev));
if (!accel_dev) {
return -ENOMEM;
}
pf = adf_devmgr_pci_to_accel_dev(pdev->physfn);
if (adf_devmgr_add_dev(accel_dev, pf)) {
... | static int adf_probe(struct pci_dev *pdev, const struct pci_device_id *ent) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
accel_dev = kzalloc_node(sizeof(*accel_dev), GFP_KERNEL, dev_to_node(&pdev->dev));
if (!accel_dev) {
return -ENOMEM;
}
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
... | static int adf_probe(struct pci_dev *pdev, const struct pci_device_id *ent) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
accel_dev = kzalloc_node(sizeof(*accel_dev), GFP_KERNEL, dev_to_node(&pdev->dev));
if (!accel_dev) {
return -ENOMEM;
}
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
... | static int adf_probe(struct pci_dev *pdev, const struct pci_device_id *ent) {
accel_dev = kzalloc_node(sizeof(*accel_dev), GFP_KERNEL, dev_to_node(&pdev->dev));
if (!accel_dev) {
return -ENOMEM;
}
pf = adf_devmgr_pci_to_accel_dev(pdev->physfn);
if (adf_devmgr_add_dev(accel_dev, pf)) {... |
CVE-2021-47057 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/crypto/allwinner/sun8i-ss/sun8i-ss-prng.c | sun8i_ss_prng_generate | int sun8i_ss_prng_generate(struct crypto_rng *tfm, const u8 *src, unsigned int slen, u8 *dst, unsigned int dlen) {
struct sun8i_ss_rng_tfm_ctx *ctx = crypto_rng_ctx(tfm);
struct rng_alg *alg = crypto_rng_alg(tfm);
struct sun8i_ss_alg_template *algt;
struct sun8i_ss_dev *ss;
dma_addr_t dma_iv, dma_ds... | int sun8i_ss_prng_generate(struct crypto_rng *tfm, const u8 *src, unsigned int slen, u8 *dst, unsigned int dlen) {
struct sun8i_ss_rng_tfm_ctx *ctx = crypto_rng_ctx(tfm);
struct rng_alg *alg = crypto_rng_alg(tfm);
struct sun8i_ss_alg_template *algt;
struct sun8i_ss_dev *ss;
dma_addr_t dma_iv, dma_ds... | int sun8i_ss_prng_generate(struct crypto_rng *tfm, const u8 *src, unsigned int slen, u8 *dst, unsigned int dlen) {
struct sun8i_ss_rng_tfm_ctx *ctx = crypto_rng_ctx(tfm);
struct rng_alg *alg = crypto_rng_alg(tfm);
struct sun8i_ss_alg_template *algt;
struct sun8i_ss_dev *ss;
dma_addr_t dma_iv, dma_ds... | int sun8i_ss_prng_generate(struct crypto_rng *tfm, const u8 *src, unsigned int slen, u8 *dst, unsigned int dlen) {
struct sun8i_ss_rng_tfm_ctx *ctx = crypto_rng_ctx(tfm);
struct rng_alg *alg = crypto_rng_alg(tfm);
struct sun8i_ss_alg_template *algt;
struct sun8i_ss_dev *ss;
dma_addr_t dma_iv, dma_ds... | int sun8i_ss_prng_generate(struct crypto_rng *tfm, const u8 *src, unsigned int slen, u8 *dst, unsigned int dlen) {
if (dma_mapping_error(ss->dev, dma_iv)) {
dev_err(ss->dev, "Cannot DMA MAP IV\n");
return -EFAULT;
}
memzero_explicit(d, todo);
kfree(d);
return err;
}
| int sun8i_ss_prng_generate(struct crypto_rng *tfm, const u8 *src, unsigned int slen, u8 *dst, unsigned int dlen) {
if (dma_mapping_error(ss->dev, dma_iv)) {
dev_err(ss->dev, "Cannot DMA MAP IV\n");
err = -EFAULT;
goto err_free;
}
memzero_explicit(d, todo);
err_free:
kfree(d);
... | int sun8i_ss_prng_generate(struct crypto_rng *tfm, const u8 *src, unsigned int slen, u8 *dst, unsigned int dlen) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (dma_mapping_error(ss->dev, dma_iv)) {
dev_err(ss->dev, "Cannot DMA MAP IV\n");
return -EFAULT;
}
/* PLACEHOLDER: DO NOT DEL... | int sun8i_ss_prng_generate(struct crypto_rng *tfm, const u8 *src, unsigned int slen, u8 *dst, unsigned int dlen) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (dma_mapping_error(ss->dev, dma_iv)) {
dev_err(ss->dev, "Cannot DMA MAP IV\n");
err = -EFAULT;
goto err_free;
}
/* P... | int sun8i_ss_prng_generate(struct crypto_rng *tfm, const u8 *src, unsigned int slen, u8 *dst, unsigned int dlen) {
if (dma_mapping_error(ss->dev, dma_iv)) {
dev_err(ss->dev, "Cannot DMA MAP IV\n");
- return -EFAULT;
+ err = -EFAULT;
+ goto err_free;
}
memzero_explicit(d, to... |
CVE-2021-47058 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/base/regmap/regmap-debugfs.c | regmap_debugfs_exit | void regmap_debugfs_exit(struct regmap *map) {
if (map->debugfs) {
debugfs_remove_recursive(map->debugfs);
mutex_lock(&map->cache_lock);
regmap_debugfs_free_dump_cache(map);
mutex_unlock(&map->cache_lock);
kfree(map->debugfs_name);
} else {
struct regmap_debugfs_n... | void regmap_debugfs_exit(struct regmap *map) {
if (map->debugfs) {
debugfs_remove_recursive(map->debugfs);
mutex_lock(&map->cache_lock);
regmap_debugfs_free_dump_cache(map);
mutex_unlock(&map->cache_lock);
kfree(map->debugfs_name);
map->debugfs_name = NULL;
} else... | void regmap_debugfs_exit(struct regmap *map) {
if (map->debugfs) {
debugfs_remove_recursive(map->debugfs);
mutex_lock(&map->cache_lock);
regmap_debugfs_free_dump_cache(map);
mutex_unlock(&map->cache_lock);
kfree(map->debugfs_name);
} else {
struct regmap_debugfs_n... | void regmap_debugfs_exit(struct regmap *map) {
if (map->debugfs) {
debugfs_remove_recursive(map->debugfs);
mutex_lock(&map->cache_lock);
regmap_debugfs_free_dump_cache(map);
mutex_unlock(&map->cache_lock);
kfree(map->debugfs_name);
map->debugfs_name = NULL;
} else... | void regmap_debugfs_exit(struct regmap *map) {
if (map->debugfs) {
kfree(map->debugfs_name);
} else {
}
}
| void regmap_debugfs_exit(struct regmap *map) {
if (map->debugfs) {
kfree(map->debugfs_name);
map->debugfs_name = NULL;
} else {
}
}
| void regmap_debugfs_exit(struct regmap *map) {
if (map->debugfs) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
kfree(map->debugfs_name);
} else {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
}
}
| void regmap_debugfs_exit(struct regmap *map) {
if (map->debugfs) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
kfree(map->debugfs_name);
map->debugfs_name = NULL;
} else {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
}
} | void regmap_debugfs_exit(struct regmap *map) {
if (map->debugfs) {
kfree(map->debugfs_name);
+ map->debugfs_name = NULL;
} else {
}
} |
CVE-2021-47059 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/crypto/allwinner/sun8i-ss/sun8i-ss-hash.c | sun8i_ss_hash_run | int sun8i_ss_hash_run(struct crypto_engine *engine, void *breq) {
struct ahash_request *areq = container_of(breq, struct ahash_request, base);
struct crypto_ahash *tfm = crypto_ahash_reqtfm(areq);
struct ahash_alg *alg = __crypto_ahash_alg(tfm->base.__crt_alg);
struct sun8i_ss_hash_reqctx *rctx = ahash_... | int sun8i_ss_hash_run(struct crypto_engine *engine, void *breq) {
struct ahash_request *areq = container_of(breq, struct ahash_request, base);
struct crypto_ahash *tfm = crypto_ahash_reqtfm(areq);
struct ahash_alg *alg = __crypto_ahash_alg(tfm->base.__crt_alg);
struct sun8i_ss_hash_reqctx *rctx = ahash_... | int sun8i_ss_hash_run(struct crypto_engine *engine, void *breq) {
struct ahash_request *areq = container_of(breq, struct ahash_request, base);
struct crypto_ahash *tfm = crypto_ahash_reqtfm(areq);
struct ahash_alg *alg = __crypto_ahash_alg(tfm->base.__crt_alg);
struct sun8i_ss_hash_reqctx *rctx = ahash_... | int sun8i_ss_hash_run(struct crypto_engine *engine, void *breq) {
struct ahash_request *areq = container_of(breq, struct ahash_request, base);
struct crypto_ahash *tfm = crypto_ahash_reqtfm(areq);
struct ahash_alg *alg = __crypto_ahash_alg(tfm->base.__crt_alg);
struct sun8i_ss_hash_reqctx *rctx = ahash_... | int sun8i_ss_hash_run(struct crypto_engine *engine, void *breq) {
struct crypto_ahash *tfm = crypto_ahash_reqtfm(areq);
struct sun8i_ss_hash_reqctx *rctx = ahash_request_ctx(areq);
ss = algt->ss;
digestsize = algt->alg.hash.halg.digestsize;
if (digestsize == SHA224_DIGEST_SIZE) {
digestsize ... | int sun8i_ss_hash_run(struct crypto_engine *engine, void *breq) {
struct crypto_ahash *tfm = crypto_ahash_reqtfm(areq);
struct sun8i_ss_hash_reqctx *rctx = ahash_request_ctx(areq);
ss = algt->ss;
digestsize = algt->alg.hash.halg.digestsize;
if (digestsize == SHA224_DIGEST_SIZE) {
digestsize ... | int sun8i_ss_hash_run(struct crypto_engine *engine, void *breq) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
struct crypto_ahash *tfm = crypto_ahash_reqtfm(areq);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
struct sun8i_ss_hash_reqctx *rctx = ahash_request_ctx(areq);
/* PLACEHOLDER: DO NOT DELE... | int sun8i_ss_hash_run(struct crypto_engine *engine, void *breq) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
struct crypto_ahash *tfm = crypto_ahash_reqtfm(areq);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
struct sun8i_ss_hash_reqctx *rctx = ahash_request_ctx(areq);
/* PLACEHOLDER: DO NOT DELE... | int sun8i_ss_hash_run(struct crypto_engine *engine, void *breq) {
struct crypto_ahash *tfm = crypto_ahash_reqtfm(areq);
struct sun8i_ss_hash_reqctx *rctx = ahash_request_ctx(areq);
ss = algt->ss;
digestsize = algt->alg.hash.halg.digestsize;
if (digestsize == SHA224_DIGEST_SIZE) {
dige... |
CVE-2021-47060 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | virt/kvm/coalesced_mmio.c | kvm_vm_ioctl_unregister_coalesced_mmio | int kvm_vm_ioctl_unregister_coalesced_mmio(struct kvm *kvm, struct kvm_coalesced_mmio_zone *zone) {
struct kvm_coalesced_mmio_dev *dev, *tmp;
if (zone->pio != 1 && zone->pio != 0) {
return -EVAL;
}
mutex_lock(&kvm->slots_lock);
list_for_each_entry_safe(dev, tmp, &kvm->coalesced_zones, list)
... | int kvm_vm_ioctl_unregister_coalesced_mmio(struct kvm *kvm, struct kvm_coalesced_mmio_zone *zone) {
struct kvm_coalesced_mmio_dev *dev, *tmp;
int r;
if (zone->pio != 1 && zone->pio != 0) {
return -EVAL;
}
mutex_lock(&kvm->slots_lock);
list_for_each_entry_safe(dev, tmp, &kvm->coalesced_zo... | int kvm_vm_ioctl_unregister_coalesced_mmio(struct kvm *kvm, struct kvm_coalesced_mmio_zone *zone) {
struct kvm_coalesced_mmio_dev *dev, *tmp;
if (zone->pio != 1 && zone->pio != 0) {
return -EVAL;
}
mutex_lock(&kvm->slots_lock);
list_for_each_entry_safe(dev, tmp, &kvm->coalesced_zones, list)
... | int kvm_vm_ioctl_unregister_coalesced_mmio(struct kvm *kvm, struct kvm_coalesced_mmio_zone *zone) {
struct kvm_coalesced_mmio_dev *dev, *tmp;
int r;
if (zone->pio != 1 && zone->pio != 0) {
return -EVAL;
}
mutex_lock(&kvm->slots_lock);
list_for_each_entry_safe(dev, tmp, &kvm->coalesced_zo... | int kvm_vm_ioctl_unregister_coalesced_mmio(struct kvm *kvm, struct kvm_coalesced_mmio_zone *zone) {
struct kvm_coalesced_mmio_dev *dev, *tmp;
if (zone->pio != 1 && zone->pio != 0) {
return -EVAL;
}
mutex_lock(&kvm->slots_lock);
list_for_each_entry_safe(dev, tmp, &kvm->coalesced_zones, list)
... | int kvm_vm_ioctl_unregister_coalesced_mmio(struct kvm *kvm, struct kvm_coalesced_mmio_zone *zone) {
struct kvm_coalesced_mmio_dev *dev, *tmp;
int r;
if (zone->pio != 1 && zone->pio != 0) {
return -EVAL;
}
mutex_lock(&kvm->slots_lock);
list_for_each_entry_safe(dev, tmp, &kvm->coalesced_zo... | int kvm_vm_ioctl_unregister_coalesced_mmio(struct kvm *kvm, struct kvm_coalesced_mmio_zone *zone) {
struct kvm_coalesced_mmio_dev *dev, *tmp;
if (zone->pio != 1 && zone->pio != 0) {
return -EVAL;
}
mutex_lock(&kvm->slots_lock);
list_for_each_entry_safe(dev, tmp, &kvm->coalesced_zones, list)
... | int kvm_vm_ioctl_unregister_coalesced_mmio(struct kvm *kvm, struct kvm_coalesced_mmio_zone *zone) {
struct kvm_coalesced_mmio_dev *dev, *tmp;
int r;
if (zone->pio != 1 && zone->pio != 0) {
return -EVAL;
}
mutex_lock(&kvm->slots_lock);
list_for_each_entry_safe(dev, tmp, &kvm->coalesced_zo... | int kvm_vm_ioctl_unregister_coalesced_mmio(struct kvm *kvm, struct kvm_coalesced_mmio_zone *zone) {
struct kvm_coalesced_mmio_dev *dev, *tmp;
+ int r;
if (zone->pio != 1 && zone->pio != 0) {
return -EVAL;
}
mutex_lock(&kvm->slots_lock);
- list_for_each_entry_safe(dev, tmp, &kvm->coal... |
CVE-2021-47060 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | virt/kvm/kvm_main.c | kvm_io_bus_unregister_dev | void kvm_io_bus_unregister_dev(struct kvm *kvm, enum kvm_bus bus_idx, struct kvm_io_device *dev) {
int i, j;
struct kvm_io_bus *new_bus, *bus;
bus = kvm_get_bus(kvm, bus_idx);
if (!bus) {
return;
}
for (i = 0; i < bus->dev_count; i++)
if (bus->range[i].dev == dev) {
b... | int kvm_io_bus_unregister_dev(struct kvm *kvm, enum kvm_bus bus_idx, struct kvm_io_device *dev) {
int i, j;
struct kvm_io_bus *new_bus, *bus;
bus = kvm_get_bus(kvm, bus_idx);
if (!bus) {
return 0;
}
for (i = 0; i < bus->dev_count; i++)
if (bus->range[i].dev == dev) {
... | void kvm_io_bus_unregister_dev(struct kvm *kvm, enum kvm_bus bus_idx, struct kvm_io_device *dev) {
int i, j;
struct kvm_io_bus *new_bus, *bus;
bus = kvm_get_bus(kvm, bus_idx);
if (!bus) {
return;
}
for (i = 0; i < bus->dev_count; i++)
if (bus->range[i].dev == dev) {
b... | int kvm_io_bus_unregister_dev(struct kvm *kvm, enum kvm_bus bus_idx, struct kvm_io_device *dev) {
int i, j;
struct kvm_io_bus *new_bus, *bus;
bus = kvm_get_bus(kvm, bus_idx);
if (!bus) {
return 0;
}
for (i = 0; i < bus->dev_count; i++)
if (bus->range[i].dev == dev) {
... | void kvm_io_bus_unregister_dev(struct kvm *kvm, enum kvm_bus bus_idx, struct kvm_io_device *dev) {
if (!bus) {
return;
}
if (i == bus->dev_count) {
return;
}
kfree(bus);
return;
}
| int kvm_io_bus_unregister_dev(struct kvm *kvm, enum kvm_bus bus_idx, struct kvm_io_device *dev) {
if (!bus) {
return 0;
}
if (i == bus->dev_count) {
return 0;
}
kfree(bus);
return new_bus ? 0 : -ENOMEM;
}
| void kvm_io_bus_unregister_dev(struct kvm *kvm, enum kvm_bus bus_idx, struct kvm_io_device *dev) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (!bus) {
return;
}
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (i == bus->dev_count) {
return;
}
/* PLACEHOLDER: DO NOT DEL... | int kvm_io_bus_unregister_dev(struct kvm *kvm, enum kvm_bus bus_idx, struct kvm_io_device *dev) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (!bus) {
return 0;
}
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (i == bus->dev_count) {
return 0;
}
/* PLACEHOLDER: DO NOT ... | -void kvm_io_bus_unregister_dev(struct kvm *kvm, enum kvm_bus bus_idx, struct kvm_io_device *dev) {
+int kvm_io_bus_unregister_dev(struct kvm *kvm, enum kvm_bus bus_idx, struct kvm_io_device *dev) {
if (!bus) {
- return;
+ return 0;
}
if (i == bus->dev_count) {
- return;
+ ret... |
CVE-2021-47061 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | virt/kvm/kvm_main.c | kvm_io_bus_unregister_dev | void kvm_io_bus_unregister_dev(struct kvm *kvm, enum kvm_bus bus_idx, struct kvm_io_device *dev) {
int i, j;
struct kvm_io_bus *new_bus, *bus;
bus = kvm_get_bus(kvm, bus_idx);
if (!bus) {
return;
}
for (i = 0; i < bus->dev_count; i++)
if (bus->range[i].dev == dev) {
b... | void kvm_io_bus_unregister_dev(struct kvm *kvm, enum kvm_bus bus_idx, struct kvm_io_device *dev) {
int i, j;
struct kvm_io_bus *new_bus, *bus;
bus = kvm_get_bus(kvm, bus_idx);
if (!bus) {
return;
}
for (i = 0; i < bus->dev_count; i++)
if (bus->range[i].dev == dev) {
b... | void kvm_io_bus_unregister_dev(struct kvm *kvm, enum kvm_bus bus_idx, struct kvm_io_device *dev) {
int i, j;
struct kvm_io_bus *new_bus, *bus;
bus = kvm_get_bus(kvm, bus_idx);
if (!bus) {
return;
}
for (i = 0; i < bus->dev_count; i++)
if (bus->range[i].dev == dev) {
b... | void kvm_io_bus_unregister_dev(struct kvm *kvm, enum kvm_bus bus_idx, struct kvm_io_device *dev) {
int i, j;
struct kvm_io_bus *new_bus, *bus;
bus = kvm_get_bus(kvm, bus_idx);
if (!bus) {
return;
}
for (i = 0; i < bus->dev_count; i++)
if (bus->range[i].dev == dev) {
b... | void kvm_io_bus_unregister_dev(struct kvm *kvm, enum kvm_bus bus_idx, struct kvm_io_device *dev) {
bus = kvm_get_bus(kvm, bus_idx);
if (!bus) {
return;
}
for (i = 0; i < bus->dev_count; i++)
if (bus->range[i].dev == dev) {
}
if (i == bus->dev_count) {
return;
}
... | void kvm_io_bus_unregister_dev(struct kvm *kvm, enum kvm_bus bus_idx, struct kvm_io_device *dev) {
bus = kvm_get_bus(kvm, bus_idx);
if (!bus) {
return;
}
for (i = 0; i < bus->dev_count; i++)
if (bus->range[i].dev == dev) {
}
if (i == bus->dev_count) {
return;
}
... | void kvm_io_bus_unregister_dev(struct kvm *kvm, enum kvm_bus bus_idx, struct kvm_io_device *dev) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
bus = kvm_get_bus(kvm, bus_idx);
if (!bus) {
return;
}
for (i = 0; i < bus->dev_count; i++)
if (bus->range[i].dev == dev) {
/* PLACEHOL... | void kvm_io_bus_unregister_dev(struct kvm *kvm, enum kvm_bus bus_idx, struct kvm_io_device *dev) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
bus = kvm_get_bus(kvm, bus_idx);
if (!bus) {
return;
}
for (i = 0; i < bus->dev_count; i++)
if (bus->range[i].dev == dev) {
/* PLACEHOL... | void kvm_io_bus_unregister_dev(struct kvm *kvm, enum kvm_bus bus_idx, struct kvm_io_device *dev) {
bus = kvm_get_bus(kvm, bus_idx);
if (!bus) {
return;
}
for (i = 0; i < bus->dev_count; i++)
if (bus->range[i].dev == dev) {
}
if (i == bus->dev_count) {
return... |
CVE-2021-47062 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | arch/x86/kvm/svm/sev.c | sev_launch_update_vmsa | static int sev_launch_update_vmsa(struct kvm *kvm, struct kvm_sev_cmd *argp) {
struct kvm_sev_info *sev = &to_kvm_svm(kvm)->sev_info;
struct sev_data_launch_update_vmsa *vmsa;
int i, ret;
if (!sev_es_guest(kvm)) {
return -ENOTTY;
}
vmsa = kzalloc(sizeof(*vmsa), GFP_KERNEL);
if (!vmsa... | static int sev_launch_update_vmsa(struct kvm *kvm, struct kvm_sev_cmd *argp) {
struct kvm_sev_info *sev = &to_kvm_svm(kvm)->sev_info;
struct sev_data_launch_update_vmsa *vmsa;
struct kvm_vcpu *vcpu;
int i, ret;
if (!sev_es_guest(kvm)) {
return -ENOTTY;
}
vmsa = kzalloc(sizeof(*vmsa),... | static int sev_launch_update_vmsa(struct kvm *kvm, struct kvm_sev_cmd *argp) {
struct kvm_sev_info *sev = &to_kvm_svm(kvm)->sev_info;
struct sev_data_launch_update_vmsa *vmsa;
int i, ret;
if (!sev_es_guest(kvm)) {
return -ENOTTY;
}
vmsa = kzalloc(sizeof(*vmsa), GFP_KERNEL);
if (!vmsa... | static int sev_launch_update_vmsa(struct kvm *kvm, struct kvm_sev_cmd *argp) {
struct kvm_sev_info *sev = &to_kvm_svm(kvm)->sev_info;
struct sev_data_launch_update_vmsa *vmsa;
struct kvm_vcpu *vcpu;
int i, ret;
if (!sev_es_guest(kvm)) {
return -ENOTTY;
}
vmsa = kzalloc(sizeof(*vmsa),... | static int sev_launch_update_vmsa(struct kvm *kvm, struct kvm_sev_cmd *argp) {
struct kvm_sev_info *sev = &to_kvm_svm(kvm)->sev_info;
struct sev_data_launch_update_vmsa *vmsa;
int i, ret;
if (!sev_es_guest(kvm)) {
return -ENOTTY;
}
if (!vmsa) {
return -ENOMEM;
}
for (i = ... | static int sev_launch_update_vmsa(struct kvm *kvm, struct kvm_sev_cmd *argp) {
struct kvm_sev_info *sev = &to_kvm_svm(kvm)->sev_info;
struct sev_data_launch_update_vmsa *vmsa;
struct kvm_vcpu *vcpu;
int i, ret;
if (!sev_es_guest(kvm)) {
return -ENOTTY;
}
if (!vmsa) {
return -... | static int sev_launch_update_vmsa(struct kvm *kvm, struct kvm_sev_cmd *argp) {
struct kvm_sev_info *sev = &to_kvm_svm(kvm)->sev_info;
struct sev_data_launch_update_vmsa *vmsa;
int i, ret;
if (!sev_es_guest(kvm)) {
return -ENOTTY;
}
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (!v... | static int sev_launch_update_vmsa(struct kvm *kvm, struct kvm_sev_cmd *argp) {
struct kvm_sev_info *sev = &to_kvm_svm(kvm)->sev_info;
struct sev_data_launch_update_vmsa *vmsa;
struct kvm_vcpu *vcpu;
int i, ret;
if (!sev_es_guest(kvm)) {
return -ENOTTY;
}
/* PLACEHOLDER: DO NOT DELETE... | static int sev_launch_update_vmsa(struct kvm *kvm, struct kvm_sev_cmd *argp) {
struct kvm_sev_info *sev = &to_kvm_svm(kvm)->sev_info;
struct sev_data_launch_update_vmsa *vmsa;
+ struct kvm_vcpu *vcpu;
int i, ret;
if (!sev_es_guest(kvm)) {
return -ENOTTY;
}
if (!vmsa) {
... |
CVE-2021-47063 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/gpu/drm/bridge/panel.c | panel_bridge_detach | static void panel_bridge_detach(struct drm_bridge *bridge) {
} | static void panel_bridge_detach(struct drm_bridge *bridge) {
struct panel_bridge *panel_bridge = drm_bridge_to_panel_bridge(bridge);
struct drm_connector *connector = &panel_bridge->connector;
if (connector->dev) {
drm_connector_cleanup(connector);
}
} | static void panel_bridge_detach(struct drm_bridge *bridge) {
} | static void panel_bridge_detach(struct drm_bridge *bridge) {
struct panel_bridge *panel_bridge = drm_bridge_to_panel_bridge(bridge);
struct drm_connector *connector = &panel_bridge->connector;
if (connector->dev) {
drm_connector_cleanup(connector);
}
} | static void panel_bridge_detach(struct drm_bridge *bridge) {
}
| static void panel_bridge_detach(struct drm_bridge *bridge) {
struct panel_bridge *panel_bridge = drm_bridge_to_panel_bridge(bridge);
struct drm_connector *connector = &panel_bridge->connector;
if (connector->dev) {
drm_connector_cleanup(connector);
}
}
| static void panel_bridge_detach(struct drm_bridge *bridge) {
}
| static void panel_bridge_detach(struct drm_bridge *bridge) {
struct panel_bridge *panel_bridge = drm_bridge_to_panel_bridge(bridge);
struct drm_connector *connector = &panel_bridge->connector;
if (connector->dev) {
drm_connector_cleanup(connector);
}
} | static void panel_bridge_detach(struct drm_bridge *bridge) {
+ struct panel_bridge *panel_bridge = drm_bridge_to_panel_bridge(bridge);
+ struct drm_connector *connector = &panel_bridge->connector;
+ if (connector->dev) {
+ drm_connector_cleanup(connector);
+ }
} |
CVE-2021-47064 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/net/wireless/mediatek/mt76/dma.c | mt76_dma_tx_queue_skb_raw | static int mt76_dma_tx_queue_skb_raw(struct mt76_dev *dev, enum mt76_txq_id qid, struct sk_buff *skb, u32 tx_info) {
struct mt76_queue *q = dev->q_tx[qid];
struct mt76_queue_buf buf;
dma_addr_t addr;
if (q->queued + 1 >= q->ndesc - 1) {
goto error;
}
addr = dma_map_single(dev->dev, skb->... | static int mt76_dma_tx_queue_skb_raw(struct mt76_dev *dev, enum mt76_txq_id qid, struct sk_buff *skb, u32 tx_info) {
struct mt76_queue *q = dev->q_tx[qid];
struct mt76_queue_buf buf = {};
dma_addr_t addr;
if (q->queued + 1 >= q->ndesc - 1) {
goto error;
}
addr = dma_map_single(dev->dev, ... | static int mt76_dma_tx_queue_skb_raw(struct mt76_dev *dev, struct mt76_queue *q, struct sk_buff *skb, u32 tx_info) {
struct mt76_queue_buf buf;
dma_addr_t addr;
if (q->queued + 1 >= q->ndesc - 1) {
goto error;
}
addr = dma_map_single(dev->dev, skb->data, skb->len, DMA_TO_DEVICE);
if (unl... | static int mt76_dma_tx_queue_skb_raw(struct mt76_dev *dev, struct mt76_queue *q, struct sk_buff *skb, u32 tx_info) {
struct mt76_queue_buf buf = {};
dma_addr_t addr;
if (q->queued + 1 >= q->ndesc - 1) {
goto error;
}
addr = dma_map_single(dev->dev, skb->data, skb->len, DMA_TO_DEVICE);
if... | static int mt76_dma_tx_queue_skb_raw(struct mt76_dev *dev, enum mt76_txq_id qid, struct sk_buff *skb, u32 tx_info) {
struct mt76_queue *q = dev->q_tx[qid];
struct mt76_queue_buf buf;
dma_addr_t addr;
if (q->queued + 1 >= q->ndesc - 1) {
goto error;
}
mt76_dma_add_buf(dev, q, &buf, 1, tx_... | static int mt76_dma_tx_queue_skb_raw(struct mt76_dev *dev, enum mt76_txq_id qid, struct sk_buff *skb, u32 tx_info) {
struct mt76_queue *q = dev->q_tx[qid];
struct mt76_queue_buf buf = {};
dma_addr_t addr;
if (q->queued + 1 >= q->ndesc - 1) {
goto error;
}
mt76_dma_add_buf(dev, q, &buf, 1... | static int mt76_dma_tx_queue_skb_raw(struct mt76_dev *dev, struct mt76_queue *q, struct sk_buff *skb, u32 tx_info) {
struct mt76_queue_buf buf;
dma_addr_t addr;
if (q->queued + 1 >= q->ndesc - 1) {
goto error;
}
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
mt76_dma_add_buf(dev, q, &buf,... | static int mt76_dma_tx_queue_skb_raw(struct mt76_dev *dev, struct mt76_queue *q, struct sk_buff *skb, u32 tx_info) {
struct mt76_queue_buf buf = {};
dma_addr_t addr;
if (q->queued + 1 >= q->ndesc - 1) {
goto error;
}
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
mt76_dma_add_buf(dev, q, ... | static int mt76_dma_tx_queue_skb_raw(struct mt76_dev *dev, enum mt76_txq_id qid, struct sk_buff *skb, u32 tx_info) {
struct mt76_queue *q = dev->q_tx[qid];
- struct mt76_queue_buf buf;
+ struct mt76_queue_buf buf = {};
dma_addr_t addr;
if (q->queued + 1 >= q->ndesc - 1) {
goto error;
... |
CVE-2021-47065 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/net/wireless/realtek/rtw88/phy.c | rtw_get_channel_group | static u8 rtw_get_channel_group(u8 channel) {
switch (channel) {
default:
WARN_ON(1);
case 1:
case 2:
case 36:
case 38:
case 40:
case 42:
return 0;
case 3:
case 4:
case 5:
case 44:
case 46:
case 48:
case 50:
return 1;
case 6:
ca... | static u8 rtw_get_channel_group(u8 channel, u8 rate) {
switch (channel) {
default:
WARN_ON(1);
case 1:
case 2:
case 36:
case 38:
case 40:
case 42:
return 0;
case 3:
case 4:
case 5:
case 44:
case 46:
case 48:
case 50:
return 1;
case ... | static u8 rtw_get_channel_group(u8 channel) {
switch (channel) {
default:
WARN_ON(1);
fallthrough;
case 1:
case 2:
case 36:
case 38:
case 40:
case 42:
return 0;
case 3:
case 4:
case 5:
case 44:
case 46:
case 48:
case 50:
return ... | static u8 rtw_get_channel_group(u8 channel, u8 rate) {
switch (channel) {
default:
WARN_ON(1);
fallthrough;
case 1:
case 2:
case 36:
case 38:
case 40:
case 42:
return 0;
case 3:
case 4:
case 5:
case 44:
case 46:
case 48:
case 50:
... | static u8 rtw_get_channel_group(u8 channel) {
switch (channel) {
case 14:
}
}
| static u8 rtw_get_channel_group(u8 channel, u8 rate) {
switch (channel) {
case 14:
return rate <= DESC_RATE11M ? 5 : 4;
}
}
| static u8 rtw_get_channel_group(u8 channel) {
switch (channel) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
case 14:
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
}
}
| static u8 rtw_get_channel_group(u8 channel, u8 rate) {
switch (channel) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
case 14:
return rate <= DESC_RATE11M ? 5 : 4;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
}
} | -static u8 rtw_get_channel_group(u8 channel) {
+static u8 rtw_get_channel_group(u8 channel, u8 rate) {
switch (channel) {
case 14:
+ return rate <= DESC_RATE11M ? 5 : 4;
}
} |
CVE-2021-47065 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/net/wireless/realtek/rtw88/phy.c | rtw_get_tx_power_params | void rtw_get_tx_power_params(struct rtw_dev *rtwdev, u8 path, u8 rate, u8 bw, u8 ch, u8 regd, struct rtw_power_params *pwr_param) {
struct rtw_hal *hal = &rtwdev->hal;
struct rtw_txpwr_idx *pwr_idx;
u8 group, band;
u8 *base = &pwr_param->pwr_base;
s8 *offset = &pwr_param->pwr_offset;
s8 *limit =... | void rtw_get_tx_power_params(struct rtw_dev *rtwdev, u8 path, u8 rate, u8 bw, u8 ch, u8 regd, struct rtw_power_params *pwr_param) {
struct rtw_hal *hal = &rtwdev->hal;
struct rtw_txpwr_idx *pwr_idx;
u8 group, band;
u8 *base = &pwr_param->pwr_base;
s8 *offset = &pwr_param->pwr_offset;
s8 *limit =... | void rtw_get_tx_power_params(struct rtw_dev *rtwdev, u8 path, u8 rate, u8 bw, u8 ch, u8 regd, struct rtw_power_params *pwr_param) {
struct rtw_hal *hal = &rtwdev->hal;
struct rtw_dm_info *dm_info = &rtwdev->dm_info;
struct rtw_txpwr_idx *pwr_idx;
u8 group, band;
u8 *base = &pwr_param->pwr_base;
... | void rtw_get_tx_power_params(struct rtw_dev *rtwdev, u8 path, u8 rate, u8 bw, u8 ch, u8 regd, struct rtw_power_params *pwr_param) {
struct rtw_hal *hal = &rtwdev->hal;
struct rtw_dm_info *dm_info = &rtwdev->dm_info;
struct rtw_txpwr_idx *pwr_idx;
u8 group, band;
u8 *base = &pwr_param->pwr_base;
... | void rtw_get_tx_power_params(struct rtw_dev *rtwdev, u8 path, u8 rate, u8 bw, u8 ch, u8 regd, struct rtw_power_params *pwr_param) {
pwr_idx = &rtwdev->efuse.txpwr_idx_table[path];
group = rtw_get_channel_group(ch);
if (ch <= 14) {
*base = rtw_phy_get_2g_tx_power_index(rtwdev, &pwr_idx->pwr_idx_2g, b... | void rtw_get_tx_power_params(struct rtw_dev *rtwdev, u8 path, u8 rate, u8 bw, u8 ch, u8 regd, struct rtw_power_params *pwr_param) {
pwr_idx = &rtwdev->efuse.txpwr_idx_table[path];
group = rtw_get_channel_group(ch, rate);
if (ch <= 14) {
*base = rtw_phy_get_2g_tx_power_index(rtwdev, &pwr_idx->pwr_idx... | void rtw_get_tx_power_params(struct rtw_dev *rtwdev, u8 path, u8 rate, u8 bw, u8 ch, u8 regd, struct rtw_power_params *pwr_param) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
pwr_idx = &rtwdev->efuse.txpwr_idx_table[path];
group = rtw_get_channel_group(ch);
if (IS_CH_2G_BAND(ch)) {
/* PLACEHOLDER... | void rtw_get_tx_power_params(struct rtw_dev *rtwdev, u8 path, u8 rate, u8 bw, u8 ch, u8 regd, struct rtw_power_params *pwr_param) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
pwr_idx = &rtwdev->efuse.txpwr_idx_table[path];
group = rtw_get_channel_group(ch, rate);
if (IS_CH_2G_BAND(ch)) {
/* PLACE... | void rtw_get_tx_power_params(struct rtw_dev *rtwdev, u8 path, u8 rate, u8 bw, u8 ch, u8 regd, struct rtw_power_params *pwr_param) {
pwr_idx = &rtwdev->efuse.txpwr_idx_table[path];
- group = rtw_get_channel_group(ch);
+ group = rtw_get_channel_group(ch, rate);
if (ch <= 14) {
*base = rtw_phy_ge... |
CVE-2021-47066 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | crypto/async_tx/async_xor.c | async_xor_offs | struct dma_async_tx_descriptor * async_xor_offs(struct page *dest, unsigned int offset, struct page **src_list, unsigned int *src_offs, int src_cnt, size_t len, struct async_submit_ctl *submit) {
struct dma_chan *chan = async_tx_find_channel(submit, DMA_XOR, &dest, 1, src_list, src_cnt, len);
struct dma_device ... | struct dma_async_tx_descriptor * async_xor_offs(struct page *dest, unsigned int offset, struct page **src_list, unsigned int *src_offs, int src_cnt, size_t len, struct async_submit_ctl *submit) {
struct dma_chan *chan = async_tx_find_channel(submit, DMA_XOR, &dest, 1, src_list, src_cnt, len);
struct dma_device ... | struct dma_async_tx_descriptor * async_xor_offs(struct page *dest, unsigned int offset, struct page **src_list, unsigned int *src_offs, int src_cnt, size_t len, struct async_submit_ctl *submit) {
struct dma_chan *chan = async_tx_find_channel(submit, DMA_XOR, &dest, 1, src_list, src_cnt, len);
struct dma_device ... | struct dma_async_tx_descriptor * async_xor_offs(struct page *dest, unsigned int offset, struct page **src_list, unsigned int *src_offs, int src_cnt, size_t len, struct async_submit_ctl *submit) {
struct dma_chan *chan = async_tx_find_channel(submit, DMA_XOR, &dest, 1, src_list, src_cnt, len);
struct dma_device ... | struct dma_async_tx_descriptor * async_xor_offs(struct page *dest, unsigned int offset, struct page **src_list, unsigned int *src_offs, int src_cnt, size_t len, struct async_submit_ctl *submit) {
struct dma_chan *chan = async_tx_find_channel(submit, DMA_XOR, &dest, 1, src_list, src_cnt, len);
struct dma_device ... | struct dma_async_tx_descriptor * async_xor_offs(struct page *dest, unsigned int offset, struct page **src_list, unsigned int *src_offs, int src_cnt, size_t len, struct async_submit_ctl *submit) {
struct dma_chan *chan = async_tx_find_channel(submit, DMA_XOR, &dest, 1, src_list, src_cnt, len);
struct dma_device ... | struct dma_async_tx_descriptor * async_xor_offs(struct page *dest, unsigned int offset, struct page **src_list, unsigned int *src_offs, int src_cnt, size_t len, struct async_submit_ctl *submit) {
struct dma_chan *chan = async_tx_find_channel(submit, DMA_XOR, &dest, 1, src_list, src_cnt, len);
struct dma_device ... | struct dma_async_tx_descriptor * async_xor_offs(struct page *dest, unsigned int offset, struct page **src_list, unsigned int *src_offs, int src_cnt, size_t len, struct async_submit_ctl *submit) {
struct dma_chan *chan = async_tx_find_channel(submit, DMA_XOR, &dest, 1, src_list, src_cnt, len);
struct dma_device ... | struct dma_async_tx_descriptor * async_xor_offs(struct page *dest, unsigned int offset, struct page **src_list, unsigned int *src_offs, int src_cnt, size_t len, struct async_submit_ctl *submit) {
struct dma_chan *chan = async_tx_find_channel(submit, DMA_XOR, &dest, 1, src_list, src_cnt, len);
struct dma_devi... |
CVE-2021-47067 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/soc/tegra/regulators-tegra30.c | tegra30_voltage_update | static int tegra30_voltage_update(struct tegra_regulator_coupler *tegra, struct regulator_dev *cpu_rdev, struct regulator_dev *core_rdev) {
int core_min_uV, core_max_uV = T_MAX;
int cpu_min_uV, cpu_max_uV = T_MAX;
int cpu_min_uV_consumers = 0;
int core_min_limited_uV;
int core_target_uV;
int cpu... | static int tegra30_voltage_update(struct tegra_regulator_coupler *tegra, struct regulator_dev *cpu_rdev, struct regulator_dev *core_rdev) {
int core_min_uV, core_max_uV = T_MAX;
int cpu_min_uV, cpu_max_uV = T_MAX;
int cpu_min_uV_consumers = 0;
int core_min_limited_uV;
int core_target_uV;
int cpu... | static int tegra30_voltage_update(struct tegra_regulator_coupler *tegra, struct regulator_dev *cpu_rdev, struct regulator_dev *core_rdev) {
int core_min_uV, core_max_uV = T_MAX;
int cpu_min_uV, cpu_max_uV = T_MAX;
int cpu_min_uV_consumers = 0;
int core_min_limited_uV;
int core_target_uV;
int cpu... | static int tegra30_voltage_update(struct tegra_regulator_coupler *tegra, struct regulator_dev *cpu_rdev, struct regulator_dev *core_rdev) {
int core_min_uV, core_max_uV = T_MAX;
int cpu_min_uV, cpu_max_uV = T_MAX;
int cpu_min_uV_consumers = 0;
int core_min_limited_uV;
int core_target_uV;
int cpu... | static int tegra30_voltage_update(struct tegra_regulator_coupler *tegra, struct regulator_dev *cpu_rdev, struct regulator_dev *core_rdev) {
int core_min_uV, core_max_uV = T_MAX;
int cpu_min_uV, cpu_max_uV = T_MAX;
int cpu_min_uV_consumers = 0;
max_spread = cpu_rdev->constraints->max_spread[0];
if (!... | static int tegra30_voltage_update(struct tegra_regulator_coupler *tegra, struct regulator_dev *cpu_rdev, struct regulator_dev *core_rdev) {
int core_min_uV, core_max_uV = T_MAX;
int cpu_min_uV, cpu_max_uV = T_MAX;
int cpu_min_uV_consumers = 0;
max_spread = cpu_rdev->constraints->max_spread[0];
if (!... | static int tegra30_voltage_update(struct tegra_regulator_coupler *tegra, struct regulator_dev *cpu_rdev, struct regulator_dev *core_rdev) {
int core_min_uV, core_max_uV = T_MAX;
int cpu_min_uV, cpu_max_uV = T_MAX;
int cpu_min_uV_consumers = 0;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
max_spread... | static int tegra30_voltage_update(struct tegra_regulator_coupler *tegra, struct regulator_dev *cpu_rdev, struct regulator_dev *core_rdev) {
int core_min_uV, core_max_uV = T_MAX;
int cpu_min_uV, cpu_max_uV = T_MAX;
int cpu_min_uV_consumers = 0;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
max_spread... | static int tegra30_voltage_update(struct tegra_regulator_coupler *tegra, struct regulator_dev *cpu_rdev, struct regulator_dev *core_rdev) {
int core_min_uV, core_max_uV = T_MAX;
int cpu_min_uV, cpu_max_uV = T_MAX;
int cpu_min_uV_consumers = 0;
max_spread = cpu_rdev->constraints->max_spread[0];
... |
CVE-2021-47069 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | ipc/mqueue.c | __pipelined_op | static inline void __pipelined_op(struct wake_q_head *wake_q, struct mqueue_inode_info *info, struct ext_wait_queue *this) {
list_del(&this->list);
get_task_struct(this->task);
smp_store_release(&this->state, STATE_READY);
wake_q_add_safe(wake_q, this->task);
} | static inline void __pipelined_op(struct wake_q_head *wake_q, struct mqueue_inode_info *info, struct ext_wait_queue *this) {
struct task_struct *task;
list_del(&this->list);
task = get_task_struct(this->task);
smp_store_release(&this->state, STATE_READY);
wake_q_add_safe(wake_q, task);
} | static inline void __pipelined_op(struct wake_q_head *wake_q, struct mqueue_inode_info *info, struct ext_wait_queue *this) {
list_del(&this->list);
get_task_struct(this->task);
smp_store_release(&this->state, STATE_READY);
wake_q_add_safe(wake_q, this->task);
} | static inline void __pipelined_op(struct wake_q_head *wake_q, struct mqueue_inode_info *info, struct ext_wait_queue *this) {
struct task_struct *task;
list_del(&this->list);
task = get_task_struct(this->task);
smp_store_release(&this->state, STATE_READY);
wake_q_add_safe(wake_q, task);
} | static inline void __pipelined_op(struct wake_q_head *wake_q, struct mqueue_inode_info *info, struct ext_wait_queue *this) {
list_del(&this->list);
get_task_struct(this->task);
smp_store_release(&this->state, STATE_READY);
wake_q_add_safe(wake_q, this->task);
}
| static inline void __pipelined_op(struct wake_q_head *wake_q, struct mqueue_inode_info *info, struct ext_wait_queue *this) {
struct task_struct *task;
list_del(&this->list);
task = get_task_struct(this->task);
smp_store_release(&this->state, STATE_READY);
wake_q_add_safe(wake_q, task);
}
| static inline void __pipelined_op(struct wake_q_head *wake_q, struct mqueue_inode_info *info, struct ext_wait_queue *this) {
list_del(&this->list);
get_task_struct(this->task);
smp_store_release(&this->state, STATE_READY);
wake_q_add_safe(wake_q, this->task);
}
| static inline void __pipelined_op(struct wake_q_head *wake_q, struct mqueue_inode_info *info, struct ext_wait_queue *this) {
struct task_struct *task;
list_del(&this->list);
task = get_task_struct(this->task);
smp_store_release(&this->state, STATE_READY);
wake_q_add_safe(wake_q, task);
} | static inline void __pipelined_op(struct wake_q_head *wake_q, struct mqueue_inode_info *info, struct ext_wait_queue *this) {
+ struct task_struct *task;
list_del(&this->list);
- get_task_struct(this->task);
+ task = get_task_struct(this->task);
smp_store_release(&this->state, STATE_READY);
- wake... |
CVE-2021-47069 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | ipc/msg.c | expunge_all | static void expunge_all(struct msg_queue *msq, int res, struct wake_q_head *wake_q) {
struct msg_receiver *msr, *t;
list_for_each_entry_safe(msr, t, &msq->q_receivers, r_list) {
get_task_struct(msr->r_tsk);
smp_store_release(&msr->r_msg, ERR_PTR(res));
wake_q_add_safe(wake_q, msr->r_tsk)... | static void expunge_all(struct msg_queue *msq, int res, struct wake_q_head *wake_q) {
struct msg_receiver *msr, *t;
list_for_each_entry_safe(msr, t, &msq->q_receivers, r_list) {
struct task_struct *r_tsk;
r_tsk = get_task_struct(msr->r_tsk);
smp_store_release(&msr->r_msg, ERR_PTR(res));
... | static void expunge_all(struct msg_queue *msq, int res, struct wake_q_head *wake_q) {
struct msg_receiver *msr, *t;
list_for_each_entry_safe(msr, t, &msq->q_receivers, r_list) {
get_task_struct(msr->r_tsk);
smp_store_release(&msr->r_msg, ERR_PTR(res));
wake_q_add_safe(wake_q, msr->r_tsk)... | static void expunge_all(struct msg_queue *msq, int res, struct wake_q_head *wake_q) {
struct msg_receiver *msr, *t;
list_for_each_entry_safe(msr, t, &msq->q_receivers, r_list) {
struct task_struct *r_tsk;
r_tsk = get_task_struct(msr->r_tsk);
smp_store_release(&msr->r_msg, ERR_PTR(res));
... | static void expunge_all(struct msg_queue *msq, int res, struct wake_q_head *wake_q) {
struct msg_receiver *msr, *t;
list_for_each_entry_safe(msr, t, &msq->q_receivers, r_list) {
get_task_struct(msr->r_tsk);
smp_store_release(&msr->r_msg, ERR_PTR(res));
wake_q_add_safe(wake_q, msr->r_tsk)... | static void expunge_all(struct msg_queue *msq, int res, struct wake_q_head *wake_q) {
struct msg_receiver *msr, *t;
list_for_each_entry_safe(msr, t, &msq->q_receivers, r_list) {
struct task_struct *r_tsk;
r_tsk = get_task_struct(msr->r_tsk);
smp_store_release(&msr->r_msg, ERR_PTR(res));
... | static void expunge_all(struct msg_queue *msq, int res, struct wake_q_head *wake_q) {
struct msg_receiver *msr, *t;
list_for_each_entry_safe(msr, t, &msq->q_receivers, r_list) {
get_task_struct(msr->r_tsk);
smp_store_release(&msr->r_msg, ERR_PTR(res));
wake_q_add_safe(wake_q, msr->r_tsk)... | static void expunge_all(struct msg_queue *msq, int res, struct wake_q_head *wake_q) {
struct msg_receiver *msr, *t;
list_for_each_entry_safe(msr, t, &msq->q_receivers, r_list) {
struct task_struct *r_tsk;
r_tsk = get_task_struct(msr->r_tsk);
smp_store_release(&msr->r_msg, ERR_PTR(res));
... | static void expunge_all(struct msg_queue *msq, int res, struct wake_q_head *wake_q) {
struct msg_receiver *msr, *t;
list_for_each_entry_safe(msr, t, &msq->q_receivers, r_list) {
- get_task_struct(msr->r_tsk);
+ struct task_struct *r_tsk;
+ r_tsk = get_task_struct(msr->r_tsk);
sm... |
CVE-2021-47069 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | ipc/sem.c | wake_up_sem_queue_prepare | static inline void wake_up_sem_queue_prepare(struct sem_queue *q, int error, struct wake_q_head *wake_q) {
get_task_struct(q->sleeper);
smp_store_release(&q->status, error);
wake_q_add_safe(wake_q, q->sleeper);
} | static inline void wake_up_sem_queue_prepare(struct sem_queue *q, int error, struct wake_q_head *wake_q) {
struct task_struct *sleeper;
sleeper = get_task_struct(q->sleeper);
smp_store_release(&q->status, error);
wake_q_add_safe(wake_q, sleeper);
} | static inline void wake_up_sem_queue_prepare(struct sem_queue *q, int error, struct wake_q_head *wake_q) {
get_task_struct(q->sleeper);
smp_store_release(&q->status, error);
wake_q_add_safe(wake_q, q->sleeper);
} | static inline void wake_up_sem_queue_prepare(struct sem_queue *q, int error, struct wake_q_head *wake_q) {
struct task_struct *sleeper;
sleeper = get_task_struct(q->sleeper);
smp_store_release(&q->status, error);
wake_q_add_safe(wake_q, sleeper);
} | static inline void wake_up_sem_queue_prepare(struct sem_queue *q, int error, struct wake_q_head *wake_q) {
get_task_struct(q->sleeper);
smp_store_release(&q->status, error);
wake_q_add_safe(wake_q, q->sleeper);
}
| static inline void wake_up_sem_queue_prepare(struct sem_queue *q, int error, struct wake_q_head *wake_q) {
struct task_struct *sleeper;
sleeper = get_task_struct(q->sleeper);
smp_store_release(&q->status, error);
wake_q_add_safe(wake_q, sleeper);
}
| static inline void wake_up_sem_queue_prepare(struct sem_queue *q, int error, struct wake_q_head *wake_q) {
get_task_struct(q->sleeper);
smp_store_release(&q->status, error);
wake_q_add_safe(wake_q, q->sleeper);
}
| static inline void wake_up_sem_queue_prepare(struct sem_queue *q, int error, struct wake_q_head *wake_q) {
struct task_struct *sleeper;
sleeper = get_task_struct(q->sleeper);
smp_store_release(&q->status, error);
wake_q_add_safe(wake_q, sleeper);
} | static inline void wake_up_sem_queue_prepare(struct sem_queue *q, int error, struct wake_q_head *wake_q) {
- get_task_struct(q->sleeper);
+ struct task_struct *sleeper;
+ sleeper = get_task_struct(q->sleeper);
smp_store_release(&q->status, error);
- wake_q_add_safe(wake_q, q->sleeper);
+ wake_q_add... |
CVE-2021-47071 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/uio/uio_hv_generic.c | hv_uio_probe | static int hv_uio_probe(struct hv_device *dev, const struct hv_vmbus_device_id *dev_id) {
struct vmbus_channel *channel = dev->channel;
struct hv_uio_private_data *pdata;
void *ring_buffer;
int ret;
if (!channel->offermsg.monitor_allocated) {
dev_err(&dev->device, "vmbus channel requires hyp... | static int hv_uio_probe(struct hv_device *dev, const struct hv_vmbus_device_id *dev_id) {
struct vmbus_channel *channel = dev->channel;
struct hv_uio_private_data *pdata;
void *ring_buffer;
int ret;
if (!channel->offermsg.monitor_allocated) {
dev_err(&dev->device, "vmbus channel requires hyp... | static int hv_uio_probe(struct hv_device *dev, const struct hv_vmbus_device_id *dev_id) {
struct vmbus_channel *channel = dev->channel;
struct hv_uio_private_data *pdata;
void *ring_buffer;
int ret;
if (!channel->offermsg.monitor_allocated) {
dev_err(&dev->device, "vmbus channel requires hyp... | static int hv_uio_probe(struct hv_device *dev, const struct hv_vmbus_device_id *dev_id) {
struct vmbus_channel *channel = dev->channel;
struct hv_uio_private_data *pdata;
void *ring_buffer;
int ret;
if (!channel->offermsg.monitor_allocated) {
dev_err(&dev->device, "vmbus channel requires hyp... | static int hv_uio_probe(struct hv_device *dev, const struct hv_vmbus_device_id *dev_id) {
struct vmbus_channel *channel = dev->channel;
pdata = kzalloc(sizeof(*pdata), GFP_KERNEL);
if (!pdata) {
return -ENOMEM;
}
ret = vmbus_alloc_ring(channel, HV_RG_SIZE * PAGE_SIZE, HV_RG_SIZE * PAGE_SIZE)... | static int hv_uio_probe(struct hv_device *dev, const struct hv_vmbus_device_id *dev_id) {
struct vmbus_channel *channel = dev->channel;
pdata = kzalloc(sizeof(*pdata), GFP_KERNEL);
if (!pdata) {
return -ENOMEM;
}
ret = vmbus_alloc_ring(channel, HV_RG_SIZE * PAGE_SIZE, HV_RG_SIZE * PAGE_SIZE)... | static int hv_uio_probe(struct hv_device *dev, const struct hv_vmbus_device_id *dev_id) {
struct vmbus_channel *channel = dev->channel;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
pdata = devm_kzalloc(&dev->device, sizeof(*pdata), GFP_KERNEL);
if (!pdata) {
return -ENOMEM;
}
ret = vmbu... | static int hv_uio_probe(struct hv_device *dev, const struct hv_vmbus_device_id *dev_id) {
struct vmbus_channel *channel = dev->channel;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
pdata = devm_kzalloc(&dev->device, sizeof(*pdata), GFP_KERNEL);
if (!pdata) {
return -ENOMEM;
}
ret = vmbu... | static int hv_uio_probe(struct hv_device *dev, const struct hv_vmbus_device_id *dev_id) {
struct vmbus_channel *channel = dev->channel;
pdata = kzalloc(sizeof(*pdata), GFP_KERNEL);
if (!pdata) {
return -ENOMEM;
}
ret = vmbus_alloc_ring(channel, HV_RG_SIZE * PAGE_SIZE, HV_RG_SIZE * PAG... |
CVE-2021-47073 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/platform/x86/dell/dell-smbios-wmi.c | exit_dell_smbios_wmi | void exit_dell_smbios_wmi(void) {
wmi_driver_unregister(&dell_smbios_wmi_driver);
} | void exit_dell_smbios_wmi(void) {
if (wmi_supported) {
wmi_driver_unregister(&dell_smbios_wmi_driver);
}
} | void exit_dell_smbios_wmi(void) {
wmi_driver_unregister(&dell_smbios_wmi_driver);
} | void exit_dell_smbios_wmi(void) {
if (wmi_supported) {
wmi_driver_unregister(&dell_smbios_wmi_driver);
}
} | void exit_dell_smbios_wmi(void) {
wmi_driver_unregister(&dell_smbios_wmi_driver);
}
| void exit_dell_smbios_wmi(void) {
if (wmi_supported) {
wmi_driver_unregister(&dell_smbios_wmi_driver);
}
}
| void exit_dell_smbios_wmi(void) {
wmi_driver_unregister(&dell_smbios_wmi_driver);
}
| void exit_dell_smbios_wmi(void) {
if (wmi_supported) {
wmi_driver_unregister(&dell_smbios_wmi_driver);
}
} | void exit_dell_smbios_wmi(void) {
- wmi_driver_unregister(&dell_smbios_wmi_driver);
+ if (wmi_supported) {
+ wmi_driver_unregister(&dell_smbios_wmi_driver);
+ }
} |
CVE-2021-47074 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/nvme/target/loop.c | nvme_loop_create_ctrl | static struct nvme_ctrl *nvme_loop_create_ctrl(struct device *dev, struct nvmf_ctrl_options *opts) {
struct nvme_loop_ctrl *ctrl;
int ret;
ctrl = kzalloc(sizeof(*ctrl), GFP_KERNEL);
if (!ctrl) {
return ERR_PTR(-ENOMEM);
}
ctrl->ctrl.opts = opts;
IT_LIST_HEAD(&ctrl->list);
IT_WORK... | static struct nvme_ctrl *nvme_loop_create_ctrl(struct device *dev, struct nvmf_ctrl_options *opts) {
struct nvme_loop_ctrl *ctrl;
int ret;
ctrl = kzalloc(sizeof(*ctrl), GFP_KERNEL);
if (!ctrl) {
return ERR_PTR(-ENOMEM);
}
ctrl->ctrl.opts = opts;
IT_LIST_HEAD(&ctrl->list);
IT_WORK... | static struct nvme_ctrl *nvme_loop_create_ctrl(struct device *dev, struct nvmf_ctrl_options *opts) {
struct nvme_loop_ctrl *ctrl;
int ret;
ctrl = kzalloc(sizeof(*ctrl), GFP_KERNEL);
if (!ctrl) {
return ERR_PTR(-ENOMEM);
}
ctrl->ctrl.opts = opts;
IT_LIST_HEAD(&ctrl->list);
IT_WORK... | static struct nvme_ctrl *nvme_loop_create_ctrl(struct device *dev, struct nvmf_ctrl_options *opts) {
struct nvme_loop_ctrl *ctrl;
int ret;
ctrl = kzalloc(sizeof(*ctrl), GFP_KERNEL);
if (!ctrl) {
return ERR_PTR(-ENOMEM);
}
ctrl->ctrl.opts = opts;
IT_LIST_HEAD(&ctrl->list);
IT_WORK... | static struct nvme_ctrl *nvme_loop_create_ctrl(struct device *dev, struct nvmf_ctrl_options *opts) {
ctrl = kzalloc(sizeof(*ctrl), GFP_KERNEL);
if (!ctrl) {
return ERR_PTR(-ENOMEM);
}
if (ret) {
goto out;
}
out:
if (ret > 0) {
ret = -EIO;
}
}
| static struct nvme_ctrl *nvme_loop_create_ctrl(struct device *dev, struct nvmf_ctrl_options *opts) {
ctrl = kzalloc(sizeof(*ctrl), GFP_KERNEL);
if (!ctrl) {
return ERR_PTR(-ENOMEM);
}
if (ret) {
kfree(ctrl);
goto out;
}
out:
if (ret > 0) {
ret = -EIO;
}
}
| static struct nvme_ctrl *nvme_loop_create_ctrl(struct device *dev, struct nvmf_ctrl_options *opts) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
ctrl = kzalloc(sizeof(*ctrl), GFP_KERNEL);
if (!ctrl) {
return ERR_PTR(-ENOMEM);
}
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (ret) {
... | static struct nvme_ctrl *nvme_loop_create_ctrl(struct device *dev, struct nvmf_ctrl_options *opts) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
ctrl = kzalloc(sizeof(*ctrl), GFP_KERNEL);
if (!ctrl) {
return ERR_PTR(-ENOMEM);
}
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (ret) {
... | static struct nvme_ctrl *nvme_loop_create_ctrl(struct device *dev, struct nvmf_ctrl_options *opts) {
ctrl = kzalloc(sizeof(*ctrl), GFP_KERNEL);
if (!ctrl) {
return ERR_PTR(-ENOMEM);
}
if (ret) {
+ kfree(ctrl);
goto out;
}
out:
if (ret > 0) {
ret = -EIO;
... |
CVE-2021-47075 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/nvme/target/core.c | nvmet_alloc_ctrl | u16 nvmet_alloc_ctrl(const char *subsysnqn, const char *hostnqn, struct nvmet_req *req, u32 kato, struct nvmet_ctrl **ctrlp) {
struct nvmet_subsys *subsys;
struct nvmet_ctrl *ctrl;
int ret;
u16 status;
status = NVME_SC_CONNECT_VALID_PARAM | NVME_SC_DNR;
subsys = nvmet_find_get_subsys(req->port, ... | u16 nvmet_alloc_ctrl(const char *subsysnqn, const char *hostnqn, struct nvmet_req *req, u32 kato, struct nvmet_ctrl **ctrlp) {
struct nvmet_subsys *subsys;
struct nvmet_ctrl *ctrl;
int ret;
u16 status;
status = NVME_SC_CONNECT_VALID_PARAM | NVME_SC_DNR;
subsys = nvmet_find_get_subsys(req->port, ... | u16 nvmet_alloc_ctrl(const char *subsysnqn, const char *hostnqn, struct nvmet_req *req, u32 kato, struct nvmet_ctrl **ctrlp) {
struct nvmet_subsys *subsys;
struct nvmet_ctrl *ctrl;
int ret;
u16 status;
status = NVME_SC_CONNECT_VALID_PARAM | NVME_SC_DNR;
subsys = nvmet_find_get_subsys(req->port, ... | u16 nvmet_alloc_ctrl(const char *subsysnqn, const char *hostnqn, struct nvmet_req *req, u32 kato, struct nvmet_ctrl **ctrlp) {
struct nvmet_subsys *subsys;
struct nvmet_ctrl *ctrl;
int ret;
u16 status;
status = NVME_SC_CONNECT_VALID_PARAM | NVME_SC_DNR;
subsys = nvmet_find_get_subsys(req->port, ... | u16 nvmet_alloc_ctrl(const char *subsysnqn, const char *hostnqn, struct nvmet_req *req, u32 kato, struct nvmet_ctrl **ctrlp) {
if (subsys->cntlid_min > subsys->cntlid_max) {
goto out_free_changed_ns_list;
}
out_free_sqs:
kfree(ctrl->sqs);
out_free_changed_ns_list:
kfree(ctrl->changed_ns_list);
}... | u16 nvmet_alloc_ctrl(const char *subsysnqn, const char *hostnqn, struct nvmet_req *req, u32 kato, struct nvmet_ctrl **ctrlp) {
if (subsys->cntlid_min > subsys->cntlid_max) {
goto out_free_sqs;
}
out_free_sqs:
kfree(ctrl->sqs);
out_free_changed_ns_list:
kfree(ctrl->changed_ns_list);
}
| u16 nvmet_alloc_ctrl(const char *subsysnqn, const char *hostnqn, struct nvmet_req *req, u32 kato, struct nvmet_ctrl **ctrlp) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (subsys->cntlid_min > subsys->cntlid_max) {
goto out_free_changed_ns_list;
}
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT ... | u16 nvmet_alloc_ctrl(const char *subsysnqn, const char *hostnqn, struct nvmet_req *req, u32 kato, struct nvmet_ctrl **ctrlp) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (subsys->cntlid_min > subsys->cntlid_max) {
goto out_free_sqs;
}
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
out_free_... | u16 nvmet_alloc_ctrl(const char *subsysnqn, const char *hostnqn, struct nvmet_req *req, u32 kato, struct nvmet_ctrl **ctrlp) {
if (subsys->cntlid_min > subsys->cntlid_max) {
- goto out_free_changed_ns_list;
+ goto out_free_sqs;
}
out_free_sqs:
kfree(ctrl->sqs);
out_free_changed_ns_list:
... |
CVE-2021-47077 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/scsi/qedf/qedf_main.c | qedf_update_link_speed | static void qedf_update_link_speed(struct qedf_ctx *qedf, struct qed_link_output *link) {
__ETHTOOL_DECLARE_LK_MODE_MASK(sup_caps);
struct fc_lport *lport = qedf->lport;
lport->link_speed = FC_PORTSPEED_UNKNOWN;
lport->link_supported_speeds = FC_PORTSPEED_UNKNOWN;
switch (link->speed) {
case 100... | static void qedf_update_link_speed(struct qedf_ctx *qedf, struct qed_link_output *link) {
__ETHTOOL_DECLARE_LK_MODE_MASK(sup_caps);
struct fc_lport *lport = qedf->lport;
lport->link_speed = FC_PORTSPEED_UNKNOWN;
lport->link_supported_speeds = FC_PORTSPEED_UNKNOWN;
switch (link->speed) {
case 100... | static void qedf_update_link_speed(struct qedf_ctx *qedf, struct qed_link_output *link) {
__ETHTOOL_DECLARE_LK_MODE_MASK(sup_caps);
struct fc_lport *lport = qedf->lport;
lport->link_speed = FC_PORTSPEED_UNKNOWN;
lport->link_supported_speeds = FC_PORTSPEED_UNKNOWN;
switch (link->speed) {
case 100... | static void qedf_update_link_speed(struct qedf_ctx *qedf, struct qed_link_output *link) {
__ETHTOOL_DECLARE_LK_MODE_MASK(sup_caps);
struct fc_lport *lport = qedf->lport;
lport->link_speed = FC_PORTSPEED_UNKNOWN;
lport->link_supported_speeds = FC_PORTSPEED_UNKNOWN;
switch (link->speed) {
case 100... | static void qedf_update_link_speed(struct qedf_ctx *qedf, struct qed_link_output *link) {
struct fc_lport *lport = qedf->lport;
if (linkmode_intersects(link->supported_caps, sup_caps)) {
lport->link_supported_speeds |= FC_PORTSPEED_20GBIT;
}
fc_host_supported_speeds(lport->host) = lport->link_su... | static void qedf_update_link_speed(struct qedf_ctx *qedf, struct qed_link_output *link) {
struct fc_lport *lport = qedf->lport;
if (linkmode_intersects(link->supported_caps, sup_caps)) {
lport->link_supported_speeds |= FC_PORTSPEED_20GBIT;
}
if (lport->host && lport->host->shost_data) {
... | static void qedf_update_link_speed(struct qedf_ctx *qedf, struct qed_link_output *link) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
struct fc_lport *lport = qedf->lport;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (linkmode_intersects(link->supported_caps, sup_caps)) {
lport->link_suppo... | static void qedf_update_link_speed(struct qedf_ctx *qedf, struct qed_link_output *link) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
struct fc_lport *lport = qedf->lport;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (linkmode_intersects(link->supported_caps, sup_caps)) {
lport->link_suppo... | static void qedf_update_link_speed(struct qedf_ctx *qedf, struct qed_link_output *link) {
struct fc_lport *lport = qedf->lport;
if (linkmode_intersects(link->supported_caps, sup_caps)) {
lport->link_supported_speeds |= FC_PORTSPEED_20GBIT;
}
- fc_host_supported_speeds(lport->host) = lport->l... |
CVE-2021-47078 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/infiniband/sw/rxe/rxe_qp.c | rxe_qp_from_init | int rxe_qp_from_init(struct rxe_dev *rxe, struct rxe_qp *qp, struct rxe_pd *pd, struct ib_qp_init_attr *init, struct ib_udata *udata, struct ib_pd *ibpd) {
int err;
struct rxe_cq *rcq = to_rcq(init->recv_cq);
struct rxe_cq *scq = to_rcq(init->send_cq);
struct rxe_srq *srq = init->srq ? to_rsrq(init->srq... | int rxe_qp_from_init(struct rxe_dev *rxe, struct rxe_qp *qp, struct rxe_pd *pd, struct ib_qp_init_attr *init, struct ib_udata *udata, struct ib_pd *ibpd) {
int err;
struct rxe_cq *rcq = to_rcq(init->recv_cq);
struct rxe_cq *scq = to_rcq(init->send_cq);
struct rxe_srq *srq = init->srq ? to_rsrq(init->srq... | int rxe_qp_from_init(struct rxe_dev *rxe, struct rxe_qp *qp, struct rxe_pd *pd, struct ib_qp_init_attr *init, struct rxe_create_qp_resp *uresp, struct ib_pd *ibpd, struct ib_udata *udata) {
int err;
struct rxe_cq *rcq = to_rcq(init->recv_cq);
struct rxe_cq *scq = to_rcq(init->send_cq);
struct rxe_srq *s... | int rxe_qp_from_init(struct rxe_dev *rxe, struct rxe_qp *qp, struct rxe_pd *pd, struct ib_qp_init_attr *init, struct rxe_create_qp_resp *uresp, struct ib_pd *ibpd, struct ib_udata *udata) {
int err;
struct rxe_cq *rcq = to_rcq(init->recv_cq);
struct rxe_cq *scq = to_rcq(init->send_cq);
struct rxe_srq *s... | int rxe_qp_from_init(struct rxe_dev *rxe, struct rxe_qp *qp, struct rxe_pd *pd, struct ib_qp_init_attr *init, struct ib_udata *udata, struct ib_pd *ibpd) {
if (err) {
goto err1;
}
err2:
rxe_queue_cleanup(qp->sq.queue);
err1:
}
| int rxe_qp_from_init(struct rxe_dev *rxe, struct rxe_qp *qp, struct rxe_pd *pd, struct ib_qp_init_attr *init, struct ib_udata *udata, struct ib_pd *ibpd) {
if (err) {
goto err1;
}
err2:
rxe_queue_cleanup(qp->sq.queue);
err1:
qp->pd = NULL;
qp->rcq = NULL;
qp->scq = NULL;
qp->srq = NU... | int rxe_qp_from_init(struct rxe_dev *rxe, struct rxe_qp *qp, struct rxe_pd *pd, struct ib_qp_init_attr *init, struct rxe_create_qp_resp *uresp, struct ib_pd *ibpd, struct ib_udata *udata) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (err) {
goto err1;
}
/* PLACEHOLDER: DO NOT DELETE THIS C... | int rxe_qp_from_init(struct rxe_dev *rxe, struct rxe_qp *qp, struct rxe_pd *pd, struct ib_qp_init_attr *init, struct rxe_create_qp_resp *uresp, struct ib_pd *ibpd, struct ib_udata *udata) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (err) {
goto err1;
}
/* PLACEHOLDER: DO NOT DELETE THIS C... | int rxe_qp_from_init(struct rxe_dev *rxe, struct rxe_qp *qp, struct rxe_pd *pd, struct ib_qp_init_attr *init, struct ib_udata *udata, struct ib_pd *ibpd) {
if (err) {
goto err1;
}
err2:
rxe_queue_cleanup(qp->sq.queue);
err1:
+ qp->pd = NULL;
+ qp->rcq = NULL;
+ qp->scq = NULL;
+ q... |
CVE-2021-47078 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/infiniband/sw/rxe/rxe_qp.c | rxe_qp_init_req | static int rxe_qp_init_req(struct rxe_dev *rxe, struct rxe_qp *qp, struct ib_qp_init_attr *init, struct ib_ucontext *context, struct ib_udata *udata) {
int err;
int wqe_size;
err = sock_create_kern(&init_net, AF_ET, SOCK_DGRAM, 0, &qp->sk);
if (err < 0) {
return err;
}
qp->sk->sk->sk_use... | static int rxe_qp_init_req(struct rxe_dev *rxe, struct rxe_qp *qp, struct ib_qp_init_attr *init, struct ib_ucontext *context, struct ib_udata *udata) {
int err;
int wqe_size;
err = sock_create_kern(&init_net, AF_ET, SOCK_DGRAM, 0, &qp->sk);
if (err < 0) {
return err;
}
qp->sk->sk->sk_use... | static int rxe_qp_init_req(struct rxe_dev *rxe, struct rxe_qp *qp, struct ib_qp_init_attr *init, struct ib_udata *udata, struct rxe_create_qp_resp *uresp) {
int err;
int wqe_size;
err = sock_create_kern(&init_net, AF_ET, SOCK_DGRAM, 0, &qp->sk);
if (err < 0) {
return err;
}
qp->sk->sk->s... | static int rxe_qp_init_req(struct rxe_dev *rxe, struct rxe_qp *qp, struct ib_qp_init_attr *init, struct ib_udata *udata, struct rxe_create_qp_resp *uresp) {
int err;
int wqe_size;
err = sock_create_kern(&init_net, AF_ET, SOCK_DGRAM, 0, &qp->sk);
if (err < 0) {
return err;
}
qp->sk->sk->s... | static int rxe_qp_init_req(struct rxe_dev *rxe, struct rxe_qp *qp, struct ib_qp_init_attr *init, struct ib_ucontext *context, struct ib_udata *udata) {
if (err) {
kfree(qp->sq.queue);
return err;
}
}
| static int rxe_qp_init_req(struct rxe_dev *rxe, struct rxe_qp *qp, struct ib_qp_init_attr *init, struct ib_ucontext *context, struct ib_udata *udata) {
if (err) {
kfree(qp->sq.queue);
qp->sq.queue = NULL;
return err;
}
}
| static int rxe_qp_init_req(struct rxe_dev *rxe, struct rxe_qp *qp, struct ib_qp_init_attr *init, struct ib_udata *udata, struct rxe_create_qp_resp *uresp) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (err) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
kfree(qp->sq.queue);
return err;... | static int rxe_qp_init_req(struct rxe_dev *rxe, struct rxe_qp *qp, struct ib_qp_init_attr *init, struct ib_udata *udata, struct rxe_create_qp_resp *uresp) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (err) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
kfree(qp->sq.queue);
qp->sq.queu... | static int rxe_qp_init_req(struct rxe_dev *rxe, struct rxe_qp *qp, struct ib_qp_init_attr *init, struct ib_ucontext *context, struct ib_udata *udata) {
if (err) {
kfree(qp->sq.queue);
+ qp->sq.queue = NULL;
return err;
}
} |
CVE-2021-47078 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/infiniband/sw/rxe/rxe_qp.c | rxe_qp_init_resp | static int rxe_qp_init_resp(struct rxe_dev *rxe, struct rxe_qp *qp, struct ib_qp_init_attr *init, struct ib_ucontext *context, struct ib_udata *udata) {
int err;
int wqe_size;
if (!qp->srq) {
qp->rq.max_wr = init->cap.max_recv_wr;
qp->rq.max_sge = init->cap.max_recv_sge;
wqe_size = r... | static int rxe_qp_init_resp(struct rxe_dev *rxe, struct rxe_qp *qp, struct ib_qp_init_attr *init, struct ib_ucontext *context, struct ib_udata *udata) {
int err;
int wqe_size;
if (!qp->srq) {
qp->rq.max_wr = init->cap.max_recv_wr;
qp->rq.max_sge = init->cap.max_recv_sge;
wqe_size = r... | static int rxe_qp_init_resp(struct rxe_dev *rxe, struct rxe_qp *qp, struct ib_qp_init_attr *init, struct ib_udata *udata, struct rxe_create_qp_resp *uresp) {
int err;
int wqe_size;
if (!qp->srq) {
qp->rq.max_wr = init->cap.max_recv_wr;
qp->rq.max_sge = init->cap.max_recv_sge;
wqe_siz... | static int rxe_qp_init_resp(struct rxe_dev *rxe, struct rxe_qp *qp, struct ib_qp_init_attr *init, struct ib_udata *udata, struct rxe_create_qp_resp *uresp) {
int err;
int wqe_size;
if (!qp->srq) {
qp->rq.max_wr = init->cap.max_recv_wr;
qp->rq.max_sge = init->cap.max_recv_sge;
wqe_siz... | static int rxe_qp_init_resp(struct rxe_dev *rxe, struct rxe_qp *qp, struct ib_qp_init_attr *init, struct ib_ucontext *context, struct ib_udata *udata) {
if (!qp->srq) {
if (err) {
kfree(qp->rq.queue);
return err;
}
}
}
| static int rxe_qp_init_resp(struct rxe_dev *rxe, struct rxe_qp *qp, struct ib_qp_init_attr *init, struct ib_ucontext *context, struct ib_udata *udata) {
if (!qp->srq) {
if (err) {
kfree(qp->rq.queue);
qp->rq.queue = NULL;
return err;
}
}
}
| static int rxe_qp_init_resp(struct rxe_dev *rxe, struct rxe_qp *qp, struct ib_qp_init_attr *init, struct ib_udata *udata, struct rxe_create_qp_resp *uresp) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (!qp->srq) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (err) {
/* PLACEHOLDER: DO ... | static int rxe_qp_init_resp(struct rxe_dev *rxe, struct rxe_qp *qp, struct ib_qp_init_attr *init, struct ib_udata *udata, struct rxe_create_qp_resp *uresp) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (!qp->srq) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (err) {
/* PLACEHOLDER: DO ... | static int rxe_qp_init_resp(struct rxe_dev *rxe, struct rxe_qp *qp, struct ib_qp_init_attr *init, struct ib_ucontext *context, struct ib_udata *udata) {
if (!qp->srq) {
if (err) {
kfree(qp->rq.queue);
+ qp->rq.queue = NULL;
return err;
}
}
} |
CVE-2021-47083 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/pinctrl/mediatek/pinctrl-mtk-common-v2.c | mtk_xt_get_gpio_n | static int mtk_xt_get_gpio_n(void *data, unsigned long eint_n, unsigned int *gpio_n, struct gpio_chip **gpio_chip) {
struct mtk_pinctrl *hw = (struct mtk_pinctrl *)data;
const struct mtk_pin_desc *desc;
desc = (const struct mtk_pin_desc *)hw->soc->pins;
*gpio_chip = &hw->chip;
if (desc[eint_n].eint.... | static int mtk_xt_get_gpio_n(void *data, unsigned long eint_n, unsigned int *gpio_n, struct gpio_chip **gpio_chip) {
struct mtk_pinctrl *hw = (struct mtk_pinctrl *)data;
const struct mtk_pin_desc *desc;
desc = (const struct mtk_pin_desc *)hw->soc->pins;
*gpio_chip = &hw->chip;
if (hw->soc->npins > e... | static int mtk_xt_get_gpio_n(void *data, unsigned long eint_n, unsigned int *gpio_n, struct gpio_chip **gpio_chip) {
struct mtk_pinctrl *hw = (struct mtk_pinctrl *)data;
const struct mtk_pin_desc *desc;
desc = (const struct mtk_pin_desc *)hw->soc->pins;
*gpio_chip = &hw->chip;
if (desc[eint_n].eint.... | static int mtk_xt_get_gpio_n(void *data, unsigned long eint_n, unsigned int *gpio_n, struct gpio_chip **gpio_chip) {
struct mtk_pinctrl *hw = (struct mtk_pinctrl *)data;
const struct mtk_pin_desc *desc;
desc = (const struct mtk_pin_desc *)hw->soc->pins;
*gpio_chip = &hw->chip;
if (hw->soc->npins > e... | static int mtk_xt_get_gpio_n(void *data, unsigned long eint_n, unsigned int *gpio_n, struct gpio_chip **gpio_chip) {
*gpio_chip = &hw->chip;
if (desc[eint_n].eint.eint_n == eint_n) {
*gpio_n = eint_n;
} else {
*gpio_n = mtk_xt_find_eint_num(hw, eint_n);
}
return *gpio_n == ET_NA ? -E... | static int mtk_xt_get_gpio_n(void *data, unsigned long eint_n, unsigned int *gpio_n, struct gpio_chip **gpio_chip) {
*gpio_chip = &hw->chip;
if (hw->soc->npins > eint_n && desc[eint_n].eint.eint_n == eint_n) {
*gpio_n = eint_n;
} else {
*gpio_n = mtk_xt_find_eint_num(hw, eint_n);
}
r... | static int mtk_xt_get_gpio_n(void *data, unsigned long eint_n, unsigned int *gpio_n, struct gpio_chip **gpio_chip) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
*gpio_chip = &hw->chip;
if (desc[eint_n].eint.eint_n == eint_n) {
*gpio_n = eint_n;
} else {
*gpio_n = mtk_xt_find_eint_num(h... | static int mtk_xt_get_gpio_n(void *data, unsigned long eint_n, unsigned int *gpio_n, struct gpio_chip **gpio_chip) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
*gpio_chip = &hw->chip;
if (hw->soc->npins > eint_n && desc[eint_n].eint.eint_n == eint_n) {
*gpio_n = eint_n;
} else {
*gpio... | static int mtk_xt_get_gpio_n(void *data, unsigned long eint_n, unsigned int *gpio_n, struct gpio_chip **gpio_chip) {
*gpio_chip = &hw->chip;
- if (desc[eint_n].eint.eint_n == eint_n) {
+ if (hw->soc->npins > eint_n && desc[eint_n].eint.eint_n == eint_n) {
*gpio_n = eint_n;
} else {
*g... |
CVE-2021-47086 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | net/phonet/pep.c | pep_ioctl | static int pep_ioctl(struct sock *sk, int cmd, unsigned long arg) {
struct pep_sock *pn = pep_sk(sk);
int answ;
int ret = -ENOIOCTLCMD;
switch (cmd) {
case SIOCQ:
if (sk->sk_state == TCP_LISTEN) {
ret = -EVAL;
break;
}
lock_sock(sk);
if (sock_f... | static int pep_ioctl(struct sock *sk, int cmd, unsigned long arg) {
struct pep_sock *pn = pep_sk(sk);
int answ;
int ret = -ENOIOCTLCMD;
switch (cmd) {
case SIOCQ:
if (sk->sk_state == TCP_LISTEN) {
ret = -EVAL;
break;
}
lock_sock(sk);
if (sock_f... | static int pep_ioctl(struct sock *sk, int cmd, unsigned long arg) {
struct pep_sock *pn = pep_sk(sk);
int answ;
int ret = -ENOIOCTLCMD;
switch (cmd) {
case SIOCQ:
if (sk->sk_state == TCP_LISTEN) {
ret = -EVAL;
break;
}
lock_sock(sk);
if (sock_f... | static int pep_ioctl(struct sock *sk, int cmd, unsigned long arg) {
struct pep_sock *pn = pep_sk(sk);
int answ;
int ret = -ENOIOCTLCMD;
switch (cmd) {
case SIOCQ:
if (sk->sk_state == TCP_LISTEN) {
ret = -EVAL;
break;
}
lock_sock(sk);
if (sock_f... | static int pep_ioctl(struct sock *sk, int cmd, unsigned long arg) {
switch (cmd) {
case SIOCPNENABLEPIPE:
if (sk->sk_state == TCP_SYN_SENT) {
} else if (sk->sk_state == TCP_ESTABLISHED) {
} else {
ret = pep_sock_enable(sk, NULL, 0);
}
release_sock(sk);
... | static int pep_ioctl(struct sock *sk, int cmd, unsigned long arg) {
switch (cmd) {
case SIOCPNENABLEPIPE:
if (sk->sk_state == TCP_SYN_SENT) {
} else if (sk->sk_state == TCP_ESTABLISHED) {
} else if (!pn->pn_sk.sobject) {
ret = -EADDRNOTAVAIL;
} else {
ret ... | static int pep_ioctl(struct sock *sk, int cmd, unsigned long arg) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
switch (cmd) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
case SIOCPNENABLEPIPE:
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (sk->sk_state == TCP_SYN_SENT) {
/* PLACE... | static int pep_ioctl(struct sock *sk, int cmd, unsigned long arg) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
switch (cmd) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
case SIOCPNENABLEPIPE:
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (sk->sk_state == TCP_SYN_SENT) {
/* PLACE... | static int pep_ioctl(struct sock *sk, int cmd, unsigned long arg) {
switch (cmd) {
case SIOCPNENABLEPIPE:
if (sk->sk_state == TCP_SYN_SENT) {
} else if (sk->sk_state == TCP_ESTABLISHED) {
+ } else if (!pn->pn_sk.sobject) {
+ ret = -EADDRNOTAVAIL;
} else {
... |
CVE-2021-47090 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | mm/memory-failure.c | soft_offline_page | int soft_offline_page(unsigned long pfn, int flags) {
int ret;
struct page *page;
bool try_again = true;
if (!pfn_valid(pfn)) {
return -ENXIO;
}
page = pfn_to_online_page(pfn);
if (!page) {
return -EIO;
}
if (PageHWPoison(page)) {
pr_info("soft offline: %#lx p... | int soft_offline_page(unsigned long pfn, int flags) {
int ret;
struct page *page;
bool try_again = true;
if (!pfn_valid(pfn)) {
return -ENXIO;
}
page = pfn_to_online_page(pfn);
if (!page) {
return -EIO;
}
if (PageHWPoison(page)) {
pr_info("soft offline: %#lx p... | int soft_offline_page(unsigned long pfn, int flags) {
int ret;
bool try_again = true;
struct page *page, *ref_page = NULL;
WARN_ON_ONCE(!pfn_valid(pfn) && (flags & MF_COUNT_CREASED));
if (!pfn_valid(pfn)) {
return -ENXIO;
}
if (flags & MF_COUNT_CREASED) {
ref_page = pfn_to_pa... | int soft_offline_page(unsigned long pfn, int flags) {
int ret;
bool try_again = true;
struct page *page, *ref_page = NULL;
WARN_ON_ONCE(!pfn_valid(pfn) && (flags & MF_COUNT_CREASED));
if (!pfn_valid(pfn)) {
return -ENXIO;
}
if (flags & MF_COUNT_CREASED) {
ref_page = pfn_to_pa... | int soft_offline_page(unsigned long pfn, int flags) {
if (!pfn_valid(pfn)) {
return -ENXIO;
}
page = pfn_to_online_page(pfn);
if (!page) {
return -EIO;
}
if (PageHWPoison(page)) {
return 0;
}
retry:
get_online_mems();
ret = get_any_page(page, pfn, flags);
... | int soft_offline_page(unsigned long pfn, int flags) {
if (!pfn_valid(pfn)) {
return -ENXIO;
}
page = pfn_to_online_page(pfn);
if (!page) {
return -EIO;
}
if (PageHWPoison(page)) {
return 0;
}
retry:
get_online_mems();
ret = get_any_page(page, pfn, flags);
... | int soft_offline_page(unsigned long pfn, int flags) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (!pfn_valid(pfn)) {
return -ENXIO;
}
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
page = pfn_to_online_page(pfn);
if (!page) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
... | int soft_offline_page(unsigned long pfn, int flags) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (!pfn_valid(pfn)) {
return -ENXIO;
}
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
page = pfn_to_online_page(pfn);
if (!page) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
... | int soft_offline_page(unsigned long pfn, int flags) {
if (!pfn_valid(pfn)) {
return -ENXIO;
}
page = pfn_to_online_page(pfn);
if (!page) {
return -EIO;
}
if (PageHWPoison(page)) {
return 0;
}
retry:
get_online_mems();
ret = get_any_page(page, pfn... |
CVE-2021-47091 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | net/mac80211/cfg.c | ieee80211_start_ap | static int ieee80211_start_ap(struct wiphy *wiphy, struct net_device *dev, struct cfg80211_ap_settings *params) {
struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev);
struct ieee80211_local *local = sdata->local;
struct beacon_data *old;
struct ieee80211_sub_if_data *vlan;
u32 changed... | static int ieee80211_start_ap(struct wiphy *wiphy, struct net_device *dev, struct cfg80211_ap_settings *params) {
struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev);
struct ieee80211_local *local = sdata->local;
struct beacon_data *old;
struct ieee80211_sub_if_data *vlan;
u32 changed... | static int ieee80211_start_ap(struct wiphy *wiphy, struct net_device *dev, struct cfg80211_ap_settings *params) {
struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev);
struct ieee80211_local *local = sdata->local;
struct beacon_data *old;
struct ieee80211_sub_if_data *vlan;
u32 changed... | static int ieee80211_start_ap(struct wiphy *wiphy, struct net_device *dev, struct cfg80211_ap_settings *params) {
struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev);
struct ieee80211_local *local = sdata->local;
struct beacon_data *old;
struct ieee80211_sub_if_data *vlan;
u32 changed... | static int ieee80211_start_ap(struct wiphy *wiphy, struct net_device *dev, struct cfg80211_ap_settings *params) {
struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev);
struct ieee80211_local *local = sdata->local;
if (err < 0) {
goto error;
}
if (params->fils_discovery.max_inte... | static int ieee80211_start_ap(struct wiphy *wiphy, struct net_device *dev, struct cfg80211_ap_settings *params) {
struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev);
struct ieee80211_local *local = sdata->local;
if (err < 0) {
goto error;
}
if (params->fils_discovery.max_inte... | static int ieee80211_start_ap(struct wiphy *wiphy, struct net_device *dev, struct cfg80211_ap_settings *params) {
struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev);
struct ieee80211_local *local = sdata->local;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (err < 0) {
goto er... | static int ieee80211_start_ap(struct wiphy *wiphy, struct net_device *dev, struct cfg80211_ap_settings *params) {
struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev);
struct ieee80211_local *local = sdata->local;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (err < 0) {
goto er... | static int ieee80211_start_ap(struct wiphy *wiphy, struct net_device *dev, struct cfg80211_ap_settings *params) {
struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev);
struct ieee80211_local *local = sdata->local;
if (err < 0) {
goto error;
}
if (params->fils_discovery.m... |
CVE-2021-47095 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/char/ipmi/ipmi_ssif.c | ssif_probe | static int ssif_probe(struct i2c_client *client, const struct i2c_device_id *id) {
unsigned char msg[3];
unsigned char *resp;
struct ssif_info *ssif_info;
int rv = 0;
int len;
int i;
u8 slave_addr = 0;
struct ssif_addr_info *addr_info = NULL;
mutex_lock(&ssif_infos_mutex);
resp =... | static int ssif_probe(struct i2c_client *client, const struct i2c_device_id *id) {
unsigned char msg[3];
unsigned char *resp;
struct ssif_info *ssif_info;
int rv = 0;
int len;
int i;
u8 slave_addr = 0;
struct ssif_addr_info *addr_info = NULL;
mutex_lock(&ssif_infos_mutex);
resp =... | static int ssif_probe(struct i2c_client *client, const struct i2c_device_id *id) {
unsigned char msg[3];
unsigned char *resp;
struct ssif_info *ssif_info;
int rv = 0;
int len;
int i;
u8 slave_addr = 0;
struct ssif_addr_info *addr_info = NULL;
mutex_lock(&ssif_infos_mutex);
resp =... | static int ssif_probe(struct i2c_client *client, const struct i2c_device_id *id) {
unsigned char msg[3];
unsigned char *resp;
struct ssif_info *ssif_info;
int rv = 0;
int len;
int i;
u8 slave_addr = 0;
struct ssif_addr_info *addr_info = NULL;
mutex_lock(&ssif_infos_mutex);
resp =... | static int ssif_probe(struct i2c_client *client, const struct i2c_device_id *id) {
u8 slave_addr = 0;
resp = kmalloc(IPMI_MAX_MSG_LENGTH, GFP_KERNEL);
if (!resp) {
return -ENOMEM;
}
ssif_info = kzalloc(sizeof(*ssif_info), GFP_KERNEL);
if (!ssif_info) {
return -ENOMEM;
}
i... | static int ssif_probe(struct i2c_client *client, const struct i2c_device_id *id) {
u8 slave_addr = 0;
resp = kmalloc(IPMI_MAX_MSG_LENGTH, GFP_KERNEL);
if (!resp) {
return -ENOMEM;
}
ssif_info = kzalloc(sizeof(*ssif_info), GFP_KERNEL);
if (!ssif_info) {
return -ENOMEM;
}
i... | static int ssif_probe(struct i2c_client *client, const struct i2c_device_id *id) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
u8 slave_addr = 0;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
resp = kmalloc(IPMI_MAX_MSG_LENGTH, GFP_KERNEL);
if (!resp) {
/* PLACEHOLDER: DO NOT DELETE THIS COMME... | static int ssif_probe(struct i2c_client *client, const struct i2c_device_id *id) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
u8 slave_addr = 0;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
resp = kmalloc(IPMI_MAX_MSG_LENGTH, GFP_KERNEL);
if (!resp) {
/* PLACEHOLDER: DO NOT DELETE THIS COMME... | static int ssif_probe(struct i2c_client *client, const struct i2c_device_id *id) {
u8 slave_addr = 0;
resp = kmalloc(IPMI_MAX_MSG_LENGTH, GFP_KERNEL);
if (!resp) {
return -ENOMEM;
}
ssif_info = kzalloc(sizeof(*ssif_info), GFP_KERNEL);
if (!ssif_info) {
return -ENOMEM;
... |
CVE-2021-47100 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/char/ipmi/ipmi_msghandler.c | cleanup_bmc_device | static void cleanup_bmc_device(struct kref *ref) {
struct bmc_device *bmc = container_of(ref, struct bmc_device, usecount);
schedule_work(&bmc->remove_work);
} | static void cleanup_bmc_device(struct kref *ref) {
struct bmc_device *bmc = container_of(ref, struct bmc_device, usecount);
queue_work(remove_work_wq, &bmc->remove_work);
} | static void cleanup_bmc_device(struct kref *ref) {
struct bmc_device *bmc = container_of(ref, struct bmc_device, usecount);
schedule_work(&bmc->remove_work);
} | static void cleanup_bmc_device(struct kref *ref) {
struct bmc_device *bmc = container_of(ref, struct bmc_device, usecount);
queue_work(remove_work_wq, &bmc->remove_work);
} | static void cleanup_bmc_device(struct kref *ref) {
struct bmc_device *bmc = container_of(ref, struct bmc_device, usecount);
schedule_work(&bmc->remove_work);
}
| static void cleanup_bmc_device(struct kref *ref) {
struct bmc_device *bmc = container_of(ref, struct bmc_device, usecount);
queue_work(remove_work_wq, &bmc->remove_work);
}
| static void cleanup_bmc_device(struct kref *ref) {
struct bmc_device *bmc = container_of(ref, struct bmc_device, usecount);
schedule_work(&bmc->remove_work);
}
| static void cleanup_bmc_device(struct kref *ref) {
struct bmc_device *bmc = container_of(ref, struct bmc_device, usecount);
queue_work(remove_work_wq, &bmc->remove_work);
} | static void cleanup_bmc_device(struct kref *ref) {
struct bmc_device *bmc = container_of(ref, struct bmc_device, usecount);
- schedule_work(&bmc->remove_work);
+ queue_work(remove_work_wq, &bmc->remove_work);
} |
CVE-2021-47103 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | net/ipv4/af_inet.c | inet_sock_destruct | void inet_sock_destruct(struct sock *sk) {
struct inet_sock *inet = inet_sk(sk);
__skb_queue_purge(&sk->sk_receive_queue);
if (sk->sk_rx_skb_cache) {
__kfree_skb(sk->sk_rx_skb_cache);
sk->sk_rx_skb_cache = NULL;
}
__skb_queue_purge(&sk->sk_error_queue);
sk_mem_reclaim(sk);
if... | void inet_sock_destruct(struct sock *sk) {
struct inet_sock *inet = inet_sk(sk);
__skb_queue_purge(&sk->sk_receive_queue);
if (sk->sk_rx_skb_cache) {
__kfree_skb(sk->sk_rx_skb_cache);
sk->sk_rx_skb_cache = NULL;
}
__skb_queue_purge(&sk->sk_error_queue);
sk_mem_reclaim(sk);
if... | void inet_sock_destruct(struct sock *sk) {
struct inet_sock *inet = inet_sk(sk);
__skb_queue_purge(&sk->sk_receive_queue);
if (sk->sk_rx_skb_cache) {
__kfree_skb(sk->sk_rx_skb_cache);
sk->sk_rx_skb_cache = NULL;
}
__skb_queue_purge(&sk->sk_error_queue);
sk_mem_reclaim(sk);
if... | void inet_sock_destruct(struct sock *sk) {
struct inet_sock *inet = inet_sk(sk);
__skb_queue_purge(&sk->sk_receive_queue);
if (sk->sk_rx_skb_cache) {
__kfree_skb(sk->sk_rx_skb_cache);
sk->sk_rx_skb_cache = NULL;
}
__skb_queue_purge(&sk->sk_error_queue);
sk_mem_reclaim(sk);
if... | void inet_sock_destruct(struct sock *sk) {
struct inet_sock *inet = inet_sk(sk);
sk_mem_reclaim(sk);
if (!sock_flag(sk, SOCK_DEAD)) {
return;
}
dst_release(rcu_dereference_protected(sk->sk_dst_cache, 1));
dst_release(sk->sk_rx_dst);
sk_refcnt_debug_dec(sk);
}
| void inet_sock_destruct(struct sock *sk) {
struct inet_sock *inet = inet_sk(sk);
sk_mem_reclaim(sk);
if (!sock_flag(sk, SOCK_DEAD)) {
return;
}
dst_release(rcu_dereference_protected(sk->sk_dst_cache, 1));
dst_release(rcu_dereference_protected(sk->sk_rx_dst, 1));
sk_refcnt_debug_dec(s... | void inet_sock_destruct(struct sock *sk) {
struct inet_sock *inet = inet_sk(sk);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
sk_mem_reclaim(sk);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (!sock_flag(sk, SOCK_DEAD)) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
return;
}
... | void inet_sock_destruct(struct sock *sk) {
struct inet_sock *inet = inet_sk(sk);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
sk_mem_reclaim(sk);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (!sock_flag(sk, SOCK_DEAD)) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
return;
}
... | void inet_sock_destruct(struct sock *sk) {
struct inet_sock *inet = inet_sk(sk);
sk_mem_reclaim(sk);
if (!sock_flag(sk, SOCK_DEAD)) {
return;
}
dst_release(rcu_dereference_protected(sk->sk_dst_cache, 1));
- dst_release(sk->sk_rx_dst);
+ dst_release(rcu_dereference_protected(sk->... |
CVE-2021-47103 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | net/ipv4/tcp.c | tcp_disconnect | int tcp_disconnect(struct sock *sk, int flags) {
struct inet_sock *inet = inet_sk(sk);
struct inet_connection_sock *icsk = inet_csk(sk);
struct tcp_sock *tp = tcp_sk(sk);
int old_state = sk->sk_state;
u32 seq;
if (old_state != TCP_CLOSE) {
tcp_set_state(sk, TCP_CLOSE);
}
if (old_... | int tcp_disconnect(struct sock *sk, int flags) {
struct inet_sock *inet = inet_sk(sk);
struct inet_connection_sock *icsk = inet_csk(sk);
struct tcp_sock *tp = tcp_sk(sk);
int old_state = sk->sk_state;
u32 seq;
if (old_state != TCP_CLOSE) {
tcp_set_state(sk, TCP_CLOSE);
}
if (old_... | int tcp_disconnect(struct sock *sk, int flags) {
struct inet_sock *inet = inet_sk(sk);
struct inet_connection_sock *icsk = inet_csk(sk);
struct tcp_sock *tp = tcp_sk(sk);
int old_state = sk->sk_state;
u32 seq;
if (old_state != TCP_CLOSE) {
tcp_set_state(sk, TCP_CLOSE);
}
if (old_... | int tcp_disconnect(struct sock *sk, int flags) {
struct inet_sock *inet = inet_sk(sk);
struct inet_connection_sock *icsk = inet_csk(sk);
struct tcp_sock *tp = tcp_sk(sk);
int old_state = sk->sk_state;
u32 seq;
if (old_state != TCP_CLOSE) {
tcp_set_state(sk, TCP_CLOSE);
}
if (old_... | int tcp_disconnect(struct sock *sk, int flags) {
struct inet_sock *inet = inet_sk(sk);
struct inet_connection_sock *icsk = inet_csk(sk);
struct tcp_sock *tp = tcp_sk(sk);
int old_state = sk->sk_state;
if (old_state != TCP_CLOSE) {
tcp_set_state(sk, TCP_CLOSE);
}
if (old_state == TCP_... | int tcp_disconnect(struct sock *sk, int flags) {
struct inet_sock *inet = inet_sk(sk);
struct inet_connection_sock *icsk = inet_csk(sk);
struct tcp_sock *tp = tcp_sk(sk);
int old_state = sk->sk_state;
if (old_state != TCP_CLOSE) {
tcp_set_state(sk, TCP_CLOSE);
}
if (old_state == TCP_... | int tcp_disconnect(struct sock *sk, int flags) {
struct inet_sock *inet = inet_sk(sk);
struct inet_connection_sock *icsk = inet_csk(sk);
struct tcp_sock *tp = tcp_sk(sk);
int old_state = sk->sk_state;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (old_state != TCP_CLOSE) {
tcp_set_sta... | int tcp_disconnect(struct sock *sk, int flags) {
struct inet_sock *inet = inet_sk(sk);
struct inet_connection_sock *icsk = inet_csk(sk);
struct tcp_sock *tp = tcp_sk(sk);
int old_state = sk->sk_state;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (old_state != TCP_CLOSE) {
tcp_set_sta... | int tcp_disconnect(struct sock *sk, int flags) {
struct inet_sock *inet = inet_sk(sk);
struct inet_connection_sock *icsk = inet_csk(sk);
struct tcp_sock *tp = tcp_sk(sk);
int old_state = sk->sk_state;
if (old_state != TCP_CLOSE) {
tcp_set_state(sk, TCP_CLOSE);
}
if (old_stat... |
CVE-2021-47103 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | net/ipv4/tcp_input.c | tcp_rcv_established | void tcp_rcv_established(struct sock *sk, struct sk_buff *skb) {
const struct tcphdr *th = (const struct tcphdr *)skb->data;
struct tcp_sock *tp = tcp_sk(sk);
unsigned int len = skb->len;
trace_tcp_probe(sk, skb);
tcp_mstamp_refresh(tp);
if (unlikely(!sk->sk_rx_dst)) {
inet_csk(sk)->icsk... | void tcp_rcv_established(struct sock *sk, struct sk_buff *skb) {
const struct tcphdr *th = (const struct tcphdr *)skb->data;
struct tcp_sock *tp = tcp_sk(sk);
unsigned int len = skb->len;
trace_tcp_probe(sk, skb);
tcp_mstamp_refresh(tp);
if (unlikely(!rcu_access_pointer(sk->sk_rx_dst))) {
... | void tcp_rcv_established(struct sock *sk, struct sk_buff *skb) {
const struct tcphdr *th = (const struct tcphdr *)skb->data;
struct tcp_sock *tp = tcp_sk(sk);
unsigned int len = skb->len;
trace_tcp_probe(sk, skb);
tcp_mstamp_refresh(tp);
if (unlikely(!sk->sk_rx_dst)) {
inet_csk(sk)->icsk... | void tcp_rcv_established(struct sock *sk, struct sk_buff *skb) {
const struct tcphdr *th = (const struct tcphdr *)skb->data;
struct tcp_sock *tp = tcp_sk(sk);
unsigned int len = skb->len;
trace_tcp_probe(sk, skb);
tcp_mstamp_refresh(tp);
if (unlikely(!rcu_access_pointer(sk->sk_rx_dst))) {
... | void tcp_rcv_established(struct sock *sk, struct sk_buff *skb) {
struct tcp_sock *tp = tcp_sk(sk);
trace_tcp_probe(sk, skb);
tcp_mstamp_refresh(tp);
if (unlikely(!sk->sk_rx_dst)) {
inet_csk(sk)->icsk_af_ops->sk_rx_dst_set(sk, skb);
}
tp->rx_opt.saw_tstamp = 0;
if ((tcp_flag_word(th) ... | void tcp_rcv_established(struct sock *sk, struct sk_buff *skb) {
struct tcp_sock *tp = tcp_sk(sk);
trace_tcp_probe(sk, skb);
tcp_mstamp_refresh(tp);
if (unlikely(!rcu_access_pointer(sk->sk_rx_dst))) {
inet_csk(sk)->icsk_af_ops->sk_rx_dst_set(sk, skb);
}
tp->rx_opt.saw_tstamp = 0;
if ... | void tcp_rcv_established(struct sock *sk, struct sk_buff *skb) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
struct tcp_sock *tp = tcp_sk(sk);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
trace_tcp_probe(sk, skb);
tcp_mstamp_refresh(tp);
if (unlikely(!sk->sk_rx_dst)) {
inet_csk(sk)->i... | void tcp_rcv_established(struct sock *sk, struct sk_buff *skb) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
struct tcp_sock *tp = tcp_sk(sk);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
trace_tcp_probe(sk, skb);
tcp_mstamp_refresh(tp);
if (unlikely(!rcu_access_pointer(sk->sk_rx_dst))) {
... | void tcp_rcv_established(struct sock *sk, struct sk_buff *skb) {
struct tcp_sock *tp = tcp_sk(sk);
trace_tcp_probe(sk, skb);
tcp_mstamp_refresh(tp);
- if (unlikely(!sk->sk_rx_dst)) {
+ if (unlikely(!rcu_access_pointer(sk->sk_rx_dst))) {
inet_csk(sk)->icsk_af_ops->sk_rx_dst_set(sk, skb);
... |
CVE-2021-47103 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | net/ipv4/tcp_ipv4.c | inet_sk_rx_dst_set | void inet_sk_rx_dst_set(struct sock *sk, const struct sk_buff *skb) {
struct dst_entry *dst = skb_dst(skb);
if (dst && dst_hold_safe(dst)) {
sk->sk_rx_dst = dst;
sk->sk_rx_dst_ifindex = skb->skb_iif;
}
} | void inet_sk_rx_dst_set(struct sock *sk, const struct sk_buff *skb) {
struct dst_entry *dst = skb_dst(skb);
if (dst && dst_hold_safe(dst)) {
rcu_assign_pointer(sk->sk_rx_dst, dst);
sk->sk_rx_dst_ifindex = skb->skb_iif;
}
} | void inet_sk_rx_dst_set(struct sock *sk, const struct sk_buff *skb) {
struct dst_entry *dst = skb_dst(skb);
if (dst && dst_hold_safe(dst)) {
sk->sk_rx_dst = dst;
inet_sk(sk)->rx_dst_ifindex = skb->skb_iif;
}
} | void inet_sk_rx_dst_set(struct sock *sk, const struct sk_buff *skb) {
struct dst_entry *dst = skb_dst(skb);
if (dst && dst_hold_safe(dst)) {
rcu_assign_pointer(sk->sk_rx_dst, dst);
inet_sk(sk)->rx_dst_ifindex = skb->skb_iif;
}
} | void inet_sk_rx_dst_set(struct sock *sk, const struct sk_buff *skb) {
struct dst_entry *dst = skb_dst(skb);
if (dst && dst_hold_safe(dst)) {
sk->sk_rx_dst = dst;
sk->sk_rx_dst_ifindex = skb->skb_iif;
}
}
| void inet_sk_rx_dst_set(struct sock *sk, const struct sk_buff *skb) {
struct dst_entry *dst = skb_dst(skb);
if (dst && dst_hold_safe(dst)) {
rcu_assign_pointer(sk->sk_rx_dst, dst);
sk->sk_rx_dst_ifindex = skb->skb_iif;
}
}
| void inet_sk_rx_dst_set(struct sock *sk, const struct sk_buff *skb) {
struct dst_entry *dst = skb_dst(skb);
if (dst && dst_hold_safe(dst)) {
sk->sk_rx_dst = dst;
inet_sk(sk)->rx_dst_ifindex = skb->skb_iif;
}
}
| void inet_sk_rx_dst_set(struct sock *sk, const struct sk_buff *skb) {
struct dst_entry *dst = skb_dst(skb);
if (dst && dst_hold_safe(dst)) {
rcu_assign_pointer(sk->sk_rx_dst, dst);
inet_sk(sk)->rx_dst_ifindex = skb->skb_iif;
}
} | void inet_sk_rx_dst_set(struct sock *sk, const struct sk_buff *skb) {
struct dst_entry *dst = skb_dst(skb);
if (dst && dst_hold_safe(dst)) {
- sk->sk_rx_dst = dst;
+ rcu_assign_pointer(sk->sk_rx_dst, dst);
sk->sk_rx_dst_ifindex = skb->skb_iif;
}
} |
CVE-2021-47103 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | net/ipv4/tcp_ipv4.c | tcp_v4_do_rcv | int tcp_v4_do_rcv(struct sock *sk, struct sk_buff *skb) {
struct sock *rsk;
if (sk->sk_state == TCP_ESTABLISHED) {
struct dst_entry *dst = sk->sk_rx_dst;
sock_rps_save_rxhash(sk, skb);
sk_mark_napi_id(sk, skb);
if (dst) {
if (sk->sk_rx_dst_ifindex != skb->skb_iif || !... | int tcp_v4_do_rcv(struct sock *sk, struct sk_buff *skb) {
struct sock *rsk;
if (sk->sk_state == TCP_ESTABLISHED) {
struct dst_entry *dst;
dst = rcu_dereference_protected(sk->sk_rx_dst, lockdep_sock_is_held(sk));
sock_rps_save_rxhash(sk, skb);
sk_mark_napi_id(sk, skb);
if ... | int tcp_v4_do_rcv(struct sock *sk, struct sk_buff *skb) {
struct sock *rsk;
if (sk->sk_state == TCP_ESTABLISHED) {
struct dst_entry *dst = sk->sk_rx_dst;
sock_rps_save_rxhash(sk, skb);
sk_mark_napi_id(sk, skb);
if (dst) {
if (inet_sk(sk)->rx_dst_ifindex != skb->skb_ii... | int tcp_v4_do_rcv(struct sock *sk, struct sk_buff *skb) {
struct sock *rsk;
if (sk->sk_state == TCP_ESTABLISHED) {
struct dst_entry *dst;
dst = rcu_dereference_protected(sk->sk_rx_dst, lockdep_sock_is_held(sk));
sock_rps_save_rxhash(sk, skb);
sk_mark_napi_id(sk, skb);
if ... | int tcp_v4_do_rcv(struct sock *sk, struct sk_buff *skb) {
if (sk->sk_state == TCP_ESTABLISHED) {
struct dst_entry *dst = sk->sk_rx_dst;
sock_rps_save_rxhash(sk, skb);
sk_mark_napi_id(sk, skb);
if (dst) {
if (sk->sk_rx_dst_ifindex != skb->skb_iif || !DIRECT_CALL_1(dst->ops... | int tcp_v4_do_rcv(struct sock *sk, struct sk_buff *skb) {
if (sk->sk_state == TCP_ESTABLISHED) {
struct dst_entry *dst;
dst = rcu_dereference_protected(sk->sk_rx_dst, lockdep_sock_is_held(sk));
sock_rps_save_rxhash(sk, skb);
sk_mark_napi_id(sk, skb);
if (dst) {
if... | int tcp_v4_do_rcv(struct sock *sk, struct sk_buff *skb) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (sk->sk_state == TCP_ESTABLISHED) {
struct dst_entry *dst = sk->sk_rx_dst;
sock_rps_save_rxhash(sk, skb);
sk_mark_napi_id(sk, skb);
if (dst) {
if (inet_sk(sk)->r... | int tcp_v4_do_rcv(struct sock *sk, struct sk_buff *skb) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (sk->sk_state == TCP_ESTABLISHED) {
struct dst_entry *dst;
dst = rcu_dereference_protected(sk->sk_rx_dst, lockdep_sock_is_held(sk));
sock_rps_save_rxhash(sk, skb);
sk_mark_n... | int tcp_v4_do_rcv(struct sock *sk, struct sk_buff *skb) {
if (sk->sk_state == TCP_ESTABLISHED) {
- struct dst_entry *dst = sk->sk_rx_dst;
+ struct dst_entry *dst;
+ dst = rcu_dereference_protected(sk->sk_rx_dst, lockdep_sock_is_held(sk));
sock_rps_save_rxhash(sk, skb);
sk_ma... |
CVE-2021-47103 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | net/ipv4/tcp_ipv4.c | tcp_v4_early_demux | int tcp_v4_early_demux(struct sk_buff *skb) {
const struct iphdr *iph;
const struct tcphdr *th;
struct sock *sk;
if (skb->pkt_type != PACKET_HOST) {
return 0;
}
if (!pskb_may_pull(skb, skb_transport_offset(skb) + sizeof(struct tcphdr))) {
return 0;
}
iph = ip_hdr(skb);
... | int tcp_v4_early_demux(struct sk_buff *skb) {
const struct iphdr *iph;
const struct tcphdr *th;
struct sock *sk;
if (skb->pkt_type != PACKET_HOST) {
return 0;
}
if (!pskb_may_pull(skb, skb_transport_offset(skb) + sizeof(struct tcphdr))) {
return 0;
}
iph = ip_hdr(skb);
... | int tcp_v4_early_demux(struct sk_buff *skb) {
const struct iphdr *iph;
const struct tcphdr *th;
struct sock *sk;
if (skb->pkt_type != PACKET_HOST) {
return 0;
}
if (!pskb_may_pull(skb, skb_transport_offset(skb) + sizeof(struct tcphdr))) {
return 0;
}
iph = ip_hdr(skb);
... | int tcp_v4_early_demux(struct sk_buff *skb) {
const struct iphdr *iph;
const struct tcphdr *th;
struct sock *sk;
if (skb->pkt_type != PACKET_HOST) {
return 0;
}
if (!pskb_may_pull(skb, skb_transport_offset(skb) + sizeof(struct tcphdr))) {
return 0;
}
iph = ip_hdr(skb);
... | int tcp_v4_early_demux(struct sk_buff *skb) {
if (!pskb_may_pull(skb, skb_transport_offset(skb) + sizeof(struct tcphdr))) {
return 0;
}
iph = ip_hdr(skb);
th = tcp_hdr(skb);
sk = __inet_lookup_established(dev_net(skb->dev), &tcp_hashinfo, iph->saddr, th->source, iph->daddr, ntohs(th->dest), ... | int tcp_v4_early_demux(struct sk_buff *skb) {
if (!pskb_may_pull(skb, skb_transport_offset(skb) + sizeof(struct tcphdr))) {
return 0;
}
iph = ip_hdr(skb);
th = tcp_hdr(skb);
sk = __inet_lookup_established(dev_net(skb->dev), &tcp_hashinfo, iph->saddr, th->source, iph->daddr, ntohs(th->dest), ... | int tcp_v4_early_demux(struct sk_buff *skb) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (!pskb_may_pull(skb, skb_transport_offset(skb) + sizeof(struct tcphdr))) {
return 0;
}
iph = ip_hdr(skb);
th = tcp_hdr(skb);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
sk = __inet_lookup... | int tcp_v4_early_demux(struct sk_buff *skb) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (!pskb_may_pull(skb, skb_transport_offset(skb) + sizeof(struct tcphdr))) {
return 0;
}
iph = ip_hdr(skb);
th = tcp_hdr(skb);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
sk = __inet_lookup... | int tcp_v4_early_demux(struct sk_buff *skb) {
if (!pskb_may_pull(skb, skb_transport_offset(skb) + sizeof(struct tcphdr))) {
return 0;
}
iph = ip_hdr(skb);
th = tcp_hdr(skb);
sk = __inet_lookup_established(dev_net(skb->dev), &tcp_hashinfo, iph->saddr, th->source, iph->daddr, ntohs(th->... |
CVE-2021-47103 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | net/ipv4/udp.c | __udp4_lib_rcv | int __udp4_lib_rcv(struct sk_buff *skb, struct udp_table *udptable, int proto) {
struct sock *sk;
struct udphdr *uh;
unsigned short ulen;
struct rtable *rt = skb_rtable(skb);
__be32 saddr, daddr;
struct net *net = dev_net(skb->dev);
bool refcounted;
if (!pskb_may_pull(skb, sizeof(struct ... | int __udp4_lib_rcv(struct sk_buff *skb, struct udp_table *udptable, int proto) {
struct sock *sk;
struct udphdr *uh;
unsigned short ulen;
struct rtable *rt = skb_rtable(skb);
__be32 saddr, daddr;
struct net *net = dev_net(skb->dev);
bool refcounted;
if (!pskb_may_pull(skb, sizeof(struct ... | int __udp4_lib_rcv(struct sk_buff *skb, struct udp_table *udptable, int proto) {
struct sock *sk;
struct udphdr *uh;
unsigned short ulen;
struct rtable *rt = skb_rtable(skb);
__be32 saddr, daddr;
struct net *net = dev_net(skb->dev);
bool refcounted;
if (!pskb_may_pull(skb, sizeof(struct ... | int __udp4_lib_rcv(struct sk_buff *skb, struct udp_table *udptable, int proto) {
struct sock *sk;
struct udphdr *uh;
unsigned short ulen;
struct rtable *rt = skb_rtable(skb);
__be32 saddr, daddr;
struct net *net = dev_net(skb->dev);
bool refcounted;
if (!pskb_may_pull(skb, sizeof(struct ... | int __udp4_lib_rcv(struct sk_buff *skb, struct udp_table *udptable, int proto) {
struct rtable *rt = skb_rtable(skb);
if (!pskb_may_pull(skb, sizeof(struct udphdr))) {
goto drop;
}
uh = udp_hdr(skb);
ulen = ntohs(uh->len);
saddr = ip_hdr(skb)->saddr;
daddr = ip_hdr(skb)->daddr;
i... | int __udp4_lib_rcv(struct sk_buff *skb, struct udp_table *udptable, int proto) {
struct rtable *rt = skb_rtable(skb);
if (!pskb_may_pull(skb, sizeof(struct udphdr))) {
goto drop;
}
uh = udp_hdr(skb);
ulen = ntohs(uh->len);
saddr = ip_hdr(skb)->saddr;
daddr = ip_hdr(skb)->daddr;
i... | int __udp4_lib_rcv(struct sk_buff *skb, struct udp_table *udptable, int proto) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
struct rtable *rt = skb_rtable(skb);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (!pskb_may_pull(skb, sizeof(struct udphdr))) {
goto drop;
}
uh = udp_hdr(sk... | int __udp4_lib_rcv(struct sk_buff *skb, struct udp_table *udptable, int proto) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
struct rtable *rt = skb_rtable(skb);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (!pskb_may_pull(skb, sizeof(struct udphdr))) {
goto drop;
}
uh = udp_hdr(sk... | int __udp4_lib_rcv(struct sk_buff *skb, struct udp_table *udptable, int proto) {
struct rtable *rt = skb_rtable(skb);
if (!pskb_may_pull(skb, sizeof(struct udphdr))) {
goto drop;
}
uh = udp_hdr(skb);
ulen = ntohs(uh->len);
saddr = ip_hdr(skb)->saddr;
daddr = ip_hdr(skb)->dad... |
CVE-2021-47103 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | net/ipv4/udp.c | udp_sk_rx_dst_set | bool udp_sk_rx_dst_set(struct sock *sk, struct dst_entry *dst) {
struct dst_entry *old;
if (dst_hold_safe(dst)) {
old = xchg(&sk->sk_rx_dst, dst);
dst_release(old);
return old != dst;
}
return false;
} | bool udp_sk_rx_dst_set(struct sock *sk, struct dst_entry *dst) {
struct dst_entry *old;
if (dst_hold_safe(dst)) {
old = xchg((__force struct dst_entry **)&sk->sk_rx_dst, dst);
dst_release(old);
return old != dst;
}
return false;
} | bool udp_sk_rx_dst_set(struct sock *sk, struct dst_entry *dst) {
struct dst_entry *old;
if (dst_hold_safe(dst)) {
old = xchg(&sk->sk_rx_dst, dst);
dst_release(old);
return old != dst;
}
return false;
} | bool udp_sk_rx_dst_set(struct sock *sk, struct dst_entry *dst) {
struct dst_entry *old;
if (dst_hold_safe(dst)) {
old = xchg((__force struct dst_entry **)&sk->sk_rx_dst, dst);
dst_release(old);
return old != dst;
}
return false;
} | bool udp_sk_rx_dst_set(struct sock *sk, struct dst_entry *dst) {
struct dst_entry *old;
if (dst_hold_safe(dst)) {
old = xchg(&sk->sk_rx_dst, dst);
dst_release(old);
return old != dst;
}
return false;
}
| bool udp_sk_rx_dst_set(struct sock *sk, struct dst_entry *dst) {
struct dst_entry *old;
if (dst_hold_safe(dst)) {
old = xchg((__force struct dst_entry **)&sk->sk_rx_dst, dst);
dst_release(old);
return old != dst;
}
return false;
}
| bool udp_sk_rx_dst_set(struct sock *sk, struct dst_entry *dst) {
struct dst_entry *old;
if (dst_hold_safe(dst)) {
old = xchg(&sk->sk_rx_dst, dst);
dst_release(old);
return old != dst;
}
return false;
}
| bool udp_sk_rx_dst_set(struct sock *sk, struct dst_entry *dst) {
struct dst_entry *old;
if (dst_hold_safe(dst)) {
old = xchg((__force struct dst_entry **)&sk->sk_rx_dst, dst);
dst_release(old);
return old != dst;
}
return false;
} | bool udp_sk_rx_dst_set(struct sock *sk, struct dst_entry *dst) {
struct dst_entry *old;
if (dst_hold_safe(dst)) {
- old = xchg(&sk->sk_rx_dst, dst);
+ old = xchg((__force struct dst_entry **)&sk->sk_rx_dst, dst);
dst_release(old);
return old != dst;
}
return false;
... |
CVE-2021-47103 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | net/ipv4/udp.c | udp_v4_early_demux | int udp_v4_early_demux(struct sk_buff *skb) {
struct net *net = dev_net(skb->dev);
struct in_device *in_dev = NULL;
const struct iphdr *iph;
const struct udphdr *uh;
struct sock *sk = NULL;
struct dst_entry *dst;
int dif = skb->dev->ifindex;
int sdif = inet_sdif(skb);
int ours;
i... | int udp_v4_early_demux(struct sk_buff *skb) {
struct net *net = dev_net(skb->dev);
struct in_device *in_dev = NULL;
const struct iphdr *iph;
const struct udphdr *uh;
struct sock *sk = NULL;
struct dst_entry *dst;
int dif = skb->dev->ifindex;
int sdif = inet_sdif(skb);
int ours;
i... | int udp_v4_early_demux(struct sk_buff *skb) {
struct net *net = dev_net(skb->dev);
struct in_device *in_dev = NULL;
const struct iphdr *iph;
const struct udphdr *uh;
struct sock *sk = NULL;
struct dst_entry *dst;
int dif = skb->dev->ifindex;
int sdif = inet_sdif(skb);
int ours;
i... | int udp_v4_early_demux(struct sk_buff *skb) {
struct net *net = dev_net(skb->dev);
struct in_device *in_dev = NULL;
const struct iphdr *iph;
const struct udphdr *uh;
struct sock *sk = NULL;
struct dst_entry *dst;
int dif = skb->dev->ifindex;
int sdif = inet_sdif(skb);
int ours;
i... | int udp_v4_early_demux(struct sk_buff *skb) {
struct net *net = dev_net(skb->dev);
struct sock *sk = NULL;
int dif = skb->dev->ifindex;
int sdif = inet_sdif(skb);
if (!pskb_may_pull(skb, skb_transport_offset(skb) + sizeof(struct udphdr))) {
return 0;
}
iph = ip_hdr(skb);
uh = udp... | int udp_v4_early_demux(struct sk_buff *skb) {
struct net *net = dev_net(skb->dev);
struct sock *sk = NULL;
int dif = skb->dev->ifindex;
int sdif = inet_sdif(skb);
if (!pskb_may_pull(skb, skb_transport_offset(skb) + sizeof(struct udphdr))) {
return 0;
}
iph = ip_hdr(skb);
uh = udp... | int udp_v4_early_demux(struct sk_buff *skb) {
struct net *net = dev_net(skb->dev);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
struct sock *sk = NULL;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
int dif = skb->dev->ifindex;
int sdif = inet_sdif(skb);
/* PLACEHOLDER: DO NOT DELETE THIS CO... | int udp_v4_early_demux(struct sk_buff *skb) {
struct net *net = dev_net(skb->dev);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
struct sock *sk = NULL;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
int dif = skb->dev->ifindex;
int sdif = inet_sdif(skb);
/* PLACEHOLDER: DO NOT DELETE THIS CO... | int udp_v4_early_demux(struct sk_buff *skb) {
struct net *net = dev_net(skb->dev);
struct sock *sk = NULL;
int dif = skb->dev->ifindex;
int sdif = inet_sdif(skb);
if (!pskb_may_pull(skb, skb_transport_offset(skb) + sizeof(struct udphdr))) {
return 0;
}
iph = ip_hdr(skb);
... |
CVE-2021-47103 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | net/ipv6/tcp_ipv6.c | inet6_sk_rx_dst_set | static void inet6_sk_rx_dst_set(struct sock *sk, const struct sk_buff *skb) {
struct dst_entry *dst = skb_dst(skb);
if (dst && dst_hold_safe(dst)) {
const struct rt6_info *rt = (const struct rt6_info *)dst;
sk->sk_rx_dst = dst;
sk->sk_rx_dst_ifindex = skb->skb_iif;
sk->sk_rx_dst_... | static void inet6_sk_rx_dst_set(struct sock *sk, const struct sk_buff *skb) {
struct dst_entry *dst = skb_dst(skb);
if (dst && dst_hold_safe(dst)) {
const struct rt6_info *rt = (const struct rt6_info *)dst;
rcu_assign_pointer(sk->sk_rx_dst, dst);
sk->sk_rx_dst_ifindex = skb->skb_iif;
... | static void inet6_sk_rx_dst_set(struct sock *sk, const struct sk_buff *skb) {
struct dst_entry *dst = skb_dst(skb);
if (dst && dst_hold_safe(dst)) {
const struct rt6_info *rt = (const struct rt6_info *)dst;
sk->sk_rx_dst = dst;
inet_sk(sk)->rx_dst_ifindex = skb->skb_iif;
tcp_inet... | static void inet6_sk_rx_dst_set(struct sock *sk, const struct sk_buff *skb) {
struct dst_entry *dst = skb_dst(skb);
if (dst && dst_hold_safe(dst)) {
const struct rt6_info *rt = (const struct rt6_info *)dst;
rcu_assign_pointer(sk->sk_rx_dst, dst);
inet_sk(sk)->rx_dst_ifindex = skb->skb_ii... | static void inet6_sk_rx_dst_set(struct sock *sk, const struct sk_buff *skb) {
struct dst_entry *dst = skb_dst(skb);
if (dst && dst_hold_safe(dst)) {
const struct rt6_info *rt = (const struct rt6_info *)dst;
sk->sk_rx_dst = dst;
sk->sk_rx_dst_ifindex = skb->skb_iif;
sk->sk_rx_dst_... | static void inet6_sk_rx_dst_set(struct sock *sk, const struct sk_buff *skb) {
struct dst_entry *dst = skb_dst(skb);
if (dst && dst_hold_safe(dst)) {
const struct rt6_info *rt = (const struct rt6_info *)dst;
rcu_assign_pointer(sk->sk_rx_dst, dst);
sk->sk_rx_dst_ifindex = skb->skb_iif;
... | static void inet6_sk_rx_dst_set(struct sock *sk, const struct sk_buff *skb) {
struct dst_entry *dst = skb_dst(skb);
if (dst && dst_hold_safe(dst)) {
const struct rt6_info *rt = (const struct rt6_info *)dst;
sk->sk_rx_dst = dst;
inet_sk(sk)->rx_dst_ifindex = skb->skb_iif;
tcp_inet... | static void inet6_sk_rx_dst_set(struct sock *sk, const struct sk_buff *skb) {
struct dst_entry *dst = skb_dst(skb);
if (dst && dst_hold_safe(dst)) {
const struct rt6_info *rt = (const struct rt6_info *)dst;
rcu_assign_pointer(sk->sk_rx_dst, dst);
inet_sk(sk)->rx_dst_ifindex = skb->skb_ii... | static void inet6_sk_rx_dst_set(struct sock *sk, const struct sk_buff *skb) {
struct dst_entry *dst = skb_dst(skb);
if (dst && dst_hold_safe(dst)) {
const struct rt6_info *rt = (const struct rt6_info *)dst;
- sk->sk_rx_dst = dst;
+ rcu_assign_pointer(sk->sk_rx_dst, dst);
sk->s... |
CVE-2021-47103 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | net/ipv6/tcp_ipv6.c | tcp_v6_do_rcv | static int tcp_v6_do_rcv(struct sock *sk, struct sk_buff *skb) {
struct ipv6_pinfo *np = tcp_inet6_sk(sk);
struct sk_buff *opt_skb = NULL;
struct tcp_sock *tp;
if (skb->protocol == htons(ETH_P_IP)) {
return tcp_v4_do_rcv(sk, skb);
}
if (np->rxopt.all) {
opt_skb = skb_clone(skb, s... | static int tcp_v6_do_rcv(struct sock *sk, struct sk_buff *skb) {
struct ipv6_pinfo *np = tcp_inet6_sk(sk);
struct sk_buff *opt_skb = NULL;
struct tcp_sock *tp;
if (skb->protocol == htons(ETH_P_IP)) {
return tcp_v4_do_rcv(sk, skb);
}
if (np->rxopt.all) {
opt_skb = skb_clone(skb, s... | static int tcp_v6_do_rcv(struct sock *sk, struct sk_buff *skb) {
struct ipv6_pinfo *np = tcp_inet6_sk(sk);
struct sk_buff *opt_skb = NULL;
struct tcp_sock *tp;
if (skb->protocol == htons(ETH_P_IP)) {
return tcp_v4_do_rcv(sk, skb);
}
if (np->rxopt.all) {
opt_skb = skb_clone(skb, s... | static int tcp_v6_do_rcv(struct sock *sk, struct sk_buff *skb) {
struct ipv6_pinfo *np = tcp_inet6_sk(sk);
struct sk_buff *opt_skb = NULL;
struct tcp_sock *tp;
if (skb->protocol == htons(ETH_P_IP)) {
return tcp_v4_do_rcv(sk, skb);
}
if (np->rxopt.all) {
opt_skb = skb_clone(skb, s... | static int tcp_v6_do_rcv(struct sock *sk, struct sk_buff *skb) {
struct ipv6_pinfo *np = tcp_inet6_sk(sk);
if (np->rxopt.all) {
opt_skb = skb_clone(skb, sk_gfp_mask(sk, GFP_ATOMIC));
}
if (sk->sk_state == TCP_ESTABLISHED) {
struct dst_entry *dst = sk->sk_rx_dst;
sock_rps_save_rxh... | static int tcp_v6_do_rcv(struct sock *sk, struct sk_buff *skb) {
struct ipv6_pinfo *np = tcp_inet6_sk(sk);
if (np->rxopt.all) {
opt_skb = skb_clone(skb, sk_gfp_mask(sk, GFP_ATOMIC));
}
if (sk->sk_state == TCP_ESTABLISHED) {
struct dst_entry *dst;
dst = rcu_dereference_protected(s... | static int tcp_v6_do_rcv(struct sock *sk, struct sk_buff *skb) {
struct ipv6_pinfo *np = tcp_inet6_sk(sk);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (np->rxopt.all) {
opt_skb = skb_clone(skb, sk_gfp_mask(sk, GFP_ATOMIC));
}
if (sk->sk_state == TCP_ESTABLISHED) {
struct dst_ent... | static int tcp_v6_do_rcv(struct sock *sk, struct sk_buff *skb) {
struct ipv6_pinfo *np = tcp_inet6_sk(sk);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (np->rxopt.all) {
opt_skb = skb_clone(skb, sk_gfp_mask(sk, GFP_ATOMIC));
}
if (sk->sk_state == TCP_ESTABLISHED) {
struct dst_ent... | static int tcp_v6_do_rcv(struct sock *sk, struct sk_buff *skb) {
struct ipv6_pinfo *np = tcp_inet6_sk(sk);
if (np->rxopt.all) {
opt_skb = skb_clone(skb, sk_gfp_mask(sk, GFP_ATOMIC));
}
if (sk->sk_state == TCP_ESTABLISHED) {
- struct dst_entry *dst = sk->sk_rx_dst;
+ struct ds... |
CVE-2021-47103 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | net/ipv6/tcp_ipv6.c | tcp_v6_early_demux | DIRECT_CALLABLE_SCOPE void tcp_v6_early_demux(struct sk_buff *skb) {
const struct ipv6hdr *hdr;
const struct tcphdr *th;
struct sock *sk;
if (skb->pkt_type != PACKET_HOST) {
return;
}
if (!pskb_may_pull(skb, skb_transport_offset(skb) + sizeof(struct tcphdr))) {
return;
}
... | DIRECT_CALLABLE_SCOPE void tcp_v6_early_demux(struct sk_buff *skb) {
const struct ipv6hdr *hdr;
const struct tcphdr *th;
struct sock *sk;
if (skb->pkt_type != PACKET_HOST) {
return;
}
if (!pskb_may_pull(skb, skb_transport_offset(skb) + sizeof(struct tcphdr))) {
return;
}
... | DIRECT_CALLABLE_SCOPE void tcp_v6_early_demux(struct sk_buff *skb) {
const struct ipv6hdr *hdr;
const struct tcphdr *th;
struct sock *sk;
if (skb->pkt_type != PACKET_HOST) {
return;
}
if (!pskb_may_pull(skb, skb_transport_offset(skb) + sizeof(struct tcphdr))) {
return;
}
... | DIRECT_CALLABLE_SCOPE void tcp_v6_early_demux(struct sk_buff *skb) {
const struct ipv6hdr *hdr;
const struct tcphdr *th;
struct sock *sk;
if (skb->pkt_type != PACKET_HOST) {
return;
}
if (!pskb_may_pull(skb, skb_transport_offset(skb) + sizeof(struct tcphdr))) {
return;
}
... | DIRECT_CALLABLE_SCOPE void tcp_v6_early_demux(struct sk_buff *skb) {
if (!pskb_may_pull(skb, skb_transport_offset(skb) + sizeof(struct tcphdr))) {
return;
}
hdr = ipv6_hdr(skb);
th = tcp_hdr(skb);
sk = __inet6_lookup_established(dev_net(skb->dev), &tcp_hashinfo, &hdr->saddr, th->source, &hdr... | DIRECT_CALLABLE_SCOPE void tcp_v6_early_demux(struct sk_buff *skb) {
if (!pskb_may_pull(skb, skb_transport_offset(skb) + sizeof(struct tcphdr))) {
return;
}
hdr = ipv6_hdr(skb);
th = tcp_hdr(skb);
sk = __inet6_lookup_established(dev_net(skb->dev), &tcp_hashinfo, &hdr->saddr, th->source, &hdr... | DIRECT_CALLABLE_SCOPE void tcp_v6_early_demux(struct sk_buff *skb) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (!pskb_may_pull(skb, skb_transport_offset(skb) + sizeof(struct tcphdr))) {
return;
}
hdr = ipv6_hdr(skb);
th = tcp_hdr(skb);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */... | DIRECT_CALLABLE_SCOPE void tcp_v6_early_demux(struct sk_buff *skb) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (!pskb_may_pull(skb, skb_transport_offset(skb) + sizeof(struct tcphdr))) {
return;
}
hdr = ipv6_hdr(skb);
th = tcp_hdr(skb);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */... | DIRECT_CALLABLE_SCOPE void tcp_v6_early_demux(struct sk_buff *skb) {
if (!pskb_may_pull(skb, skb_transport_offset(skb) + sizeof(struct tcphdr))) {
return;
}
hdr = ipv6_hdr(skb);
th = tcp_hdr(skb);
sk = __inet6_lookup_established(dev_net(skb->dev), &tcp_hashinfo, &hdr->saddr, th->sourc... |
CVE-2021-47103 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | net/ipv6/udp.c | __udp6_lib_rcv | int __udp6_lib_rcv(struct sk_buff *skb, struct udp_table *udptable, int proto) {
const struct in6_addr *saddr, *daddr;
struct net *net = dev_net(skb->dev);
struct udphdr *uh;
struct sock *sk;
bool refcounted;
u32 ulen = 0;
if (!pskb_may_pull(skb, sizeof(struct udphdr))) {
goto discar... | int __udp6_lib_rcv(struct sk_buff *skb, struct udp_table *udptable, int proto) {
const struct in6_addr *saddr, *daddr;
struct net *net = dev_net(skb->dev);
struct udphdr *uh;
struct sock *sk;
bool refcounted;
u32 ulen = 0;
if (!pskb_may_pull(skb, sizeof(struct udphdr))) {
goto discar... | int __udp6_lib_rcv(struct sk_buff *skb, struct udp_table *udptable, int proto) {
const struct in6_addr *saddr, *daddr;
struct net *net = dev_net(skb->dev);
struct udphdr *uh;
struct sock *sk;
bool refcounted;
u32 ulen = 0;
if (!pskb_may_pull(skb, sizeof(struct udphdr))) {
goto discar... | int __udp6_lib_rcv(struct sk_buff *skb, struct udp_table *udptable, int proto) {
const struct in6_addr *saddr, *daddr;
struct net *net = dev_net(skb->dev);
struct udphdr *uh;
struct sock *sk;
bool refcounted;
u32 ulen = 0;
if (!pskb_may_pull(skb, sizeof(struct udphdr))) {
goto discar... | int __udp6_lib_rcv(struct sk_buff *skb, struct udp_table *udptable, int proto) {
if (!pskb_may_pull(skb, sizeof(struct udphdr))) {
goto discard;
}
saddr = &ipv6_hdr(skb)->saddr;
daddr = &ipv6_hdr(skb)->daddr;
uh = udp_hdr(skb);
ulen = ntohs(uh->len);
if (ulen > skb->len) {
go... | int __udp6_lib_rcv(struct sk_buff *skb, struct udp_table *udptable, int proto) {
if (!pskb_may_pull(skb, sizeof(struct udphdr))) {
goto discard;
}
saddr = &ipv6_hdr(skb)->saddr;
daddr = &ipv6_hdr(skb)->daddr;
uh = udp_hdr(skb);
ulen = ntohs(uh->len);
if (ulen > skb->len) {
go... | int __udp6_lib_rcv(struct sk_buff *skb, struct udp_table *udptable, int proto) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (!pskb_may_pull(skb, sizeof(struct udphdr))) {
goto discard;
}
saddr = &ipv6_hdr(skb)->saddr;
daddr = &ipv6_hdr(skb)->daddr;
uh = udp_hdr(skb);
ulen = nto... | int __udp6_lib_rcv(struct sk_buff *skb, struct udp_table *udptable, int proto) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (!pskb_may_pull(skb, sizeof(struct udphdr))) {
goto discard;
}
saddr = &ipv6_hdr(skb)->saddr;
daddr = &ipv6_hdr(skb)->daddr;
uh = udp_hdr(skb);
ulen = nto... | int __udp6_lib_rcv(struct sk_buff *skb, struct udp_table *udptable, int proto) {
if (!pskb_may_pull(skb, sizeof(struct udphdr))) {
goto discard;
}
saddr = &ipv6_hdr(skb)->saddr;
daddr = &ipv6_hdr(skb)->daddr;
uh = udp_hdr(skb);
ulen = ntohs(uh->len);
if (ulen > skb->len) {
... |
CVE-2021-47103 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | net/ipv6/udp.c | udp_v6_early_demux | DIRECT_CALLABLE_SCOPE void udp_v6_early_demux(struct sk_buff *skb) {
struct net *net = dev_net(skb->dev);
const struct udphdr *uh;
struct sock *sk;
struct dst_entry *dst;
int dif = skb->dev->ifindex;
int sdif = inet6_sdif(skb);
if (!pskb_may_pull(skb, skb_transport_offset(skb) + sizeof(struc... | DIRECT_CALLABLE_SCOPE void udp_v6_early_demux(struct sk_buff *skb) {
struct net *net = dev_net(skb->dev);
const struct udphdr *uh;
struct sock *sk;
struct dst_entry *dst;
int dif = skb->dev->ifindex;
int sdif = inet6_sdif(skb);
if (!pskb_may_pull(skb, skb_transport_offset(skb) + sizeof(struc... | DIRECT_CALLABLE_SCOPE void udp_v6_early_demux(struct sk_buff *skb) {
struct net *net = dev_net(skb->dev);
const struct udphdr *uh;
struct sock *sk;
struct dst_entry *dst;
int dif = skb->dev->ifindex;
int sdif = inet6_sdif(skb);
if (!pskb_may_pull(skb, skb_transport_offset(skb) + sizeof(struc... | DIRECT_CALLABLE_SCOPE void udp_v6_early_demux(struct sk_buff *skb) {
struct net *net = dev_net(skb->dev);
const struct udphdr *uh;
struct sock *sk;
struct dst_entry *dst;
int dif = skb->dev->ifindex;
int sdif = inet6_sdif(skb);
if (!pskb_may_pull(skb, skb_transport_offset(skb) + sizeof(struc... | DIRECT_CALLABLE_SCOPE void udp_v6_early_demux(struct sk_buff *skb) {
struct net *net = dev_net(skb->dev);
int dif = skb->dev->ifindex;
int sdif = inet6_sdif(skb);
if (!pskb_may_pull(skb, skb_transport_offset(skb) + sizeof(struct udphdr))) {
return;
}
uh = udp_hdr(skb);
if (skb->pkt_t... | DIRECT_CALLABLE_SCOPE void udp_v6_early_demux(struct sk_buff *skb) {
struct net *net = dev_net(skb->dev);
int dif = skb->dev->ifindex;
int sdif = inet6_sdif(skb);
if (!pskb_may_pull(skb, skb_transport_offset(skb) + sizeof(struct udphdr))) {
return;
}
uh = udp_hdr(skb);
if (skb->pkt_t... | DIRECT_CALLABLE_SCOPE void udp_v6_early_demux(struct sk_buff *skb) {
struct net *net = dev_net(skb->dev);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
int dif = skb->dev->ifindex;
int sdif = inet6_sdif(skb);
if (!pskb_may_pull(skb, skb_transport_offset(skb) + sizeof(struct udphdr))) {
retur... | DIRECT_CALLABLE_SCOPE void udp_v6_early_demux(struct sk_buff *skb) {
struct net *net = dev_net(skb->dev);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
int dif = skb->dev->ifindex;
int sdif = inet6_sdif(skb);
if (!pskb_may_pull(skb, skb_transport_offset(skb) + sizeof(struct udphdr))) {
/* PLACEH... | DIRECT_CALLABLE_SCOPE void udp_v6_early_demux(struct sk_buff *skb) {
struct net *net = dev_net(skb->dev);
int dif = skb->dev->ifindex;
int sdif = inet6_sdif(skb);
if (!pskb_may_pull(skb, skb_transport_offset(skb) + sizeof(struct udphdr))) {
return;
}
uh = udp_hdr(skb);
if (s... |
CVE-2021-47109 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | net/core/neighbour.c | neigh_forced_gc | static int neigh_forced_gc(struct neigh_table *tbl) {
int max_clean = atomic_read(&tbl->gc_entries) - tbl->gc_thresh2;
unsigned long tref = jiffies - 5 * HZ;
struct neighbour *n, *tmp;
int shrunk = 0;
NEIGH_CACHE_STAT_C(tbl, forced_gc_runs);
write_lock_bh(&tbl->lock);
list_for_each_entry_saf... | static int neigh_forced_gc(struct neigh_table *tbl) {
int max_clean = atomic_read(&tbl->gc_entries) - tbl->gc_thresh2;
unsigned long tref = jiffies - 5 * HZ;
struct neighbour *n, *tmp;
int shrunk = 0;
NEIGH_CACHE_STAT_C(tbl, forced_gc_runs);
write_lock_bh(&tbl->lock);
list_for_each_entry_saf... | static int neigh_forced_gc(struct neigh_table *tbl) {
int max_clean = atomic_read(&tbl->gc_entries) - tbl->gc_thresh2;
unsigned long tref = jiffies - 5 * HZ;
struct neighbour *n, *tmp;
int shrunk = 0;
NEIGH_CACHE_STAT_C(tbl, forced_gc_runs);
write_lock_bh(&tbl->lock);
list_for_each_entry_saf... | static int neigh_forced_gc(struct neigh_table *tbl) {
int max_clean = atomic_read(&tbl->gc_entries) - tbl->gc_thresh2;
unsigned long tref = jiffies - 5 * HZ;
struct neighbour *n, *tmp;
int shrunk = 0;
NEIGH_CACHE_STAT_C(tbl, forced_gc_runs);
write_lock_bh(&tbl->lock);
list_for_each_entry_saf... | static int neigh_forced_gc(struct neigh_table *tbl) {
unsigned long tref = jiffies - 5 * HZ;
NEIGH_CACHE_STAT_C(tbl, forced_gc_runs);
list_for_each_entry_safe(n, tmp, &tbl->gc_list, gc_list) {
if (refcount_read(&n->refcnt) == 1) {
write_lock(&n->lock);
if ((n->nud_state == NU... | static int neigh_forced_gc(struct neigh_table *tbl) {
unsigned long tref = jiffies - 5 * HZ;
NEIGH_CACHE_STAT_C(tbl, forced_gc_runs);
list_for_each_entry_safe(n, tmp, &tbl->gc_list, gc_list) {
if (refcount_read(&n->refcnt) == 1) {
write_lock(&n->lock);
if ((n->nud_state == NU... | static int neigh_forced_gc(struct neigh_table *tbl) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
unsigned long tref = jiffies - 5 * HZ;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
NEIGH_CACHE_STAT_C(tbl, forced_gc_runs);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
list_for_each_entry_safe... | static int neigh_forced_gc(struct neigh_table *tbl) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
unsigned long tref = jiffies - 5 * HZ;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
NEIGH_CACHE_STAT_C(tbl, forced_gc_runs);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
list_for_each_entry_safe... | static int neigh_forced_gc(struct neigh_table *tbl) {
unsigned long tref = jiffies - 5 * HZ;
NEIGH_CACHE_STAT_C(tbl, forced_gc_runs);
list_for_each_entry_safe(n, tmp, &tbl->gc_list, gc_list) {
if (refcount_read(&n->refcnt) == 1) {
write_lock(&n->lock);
- if ((n->nud_stat... |
CVE-2021-47110 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | arch/x86/kernel/kvm.c | kvm_guest_cpu_offline | static void kvm_guest_cpu_offline(void) {
kvm_disable_steal_time();
if (kvm_para_has_feature(KVM_FEATURE_PV_EOI)) {
wrmsrl(MSR_KVM_PV_EOI_EN, 0);
}
kvm_pv_disable_apf();
apf_task_wake_all();
} | static void kvm_guest_cpu_offline(void) {
kvm_disable_steal_time();
if (kvm_para_has_feature(KVM_FEATURE_PV_EOI)) {
wrmsrl(MSR_KVM_PV_EOI_EN, 0);
}
kvm_pv_disable_apf();
apf_task_wake_all();
kvmclock_disable();
} | static void kvm_guest_cpu_offline(void) {
kvm_disable_steal_time();
if (kvm_para_has_feature(KVM_FEATURE_PV_EOI)) {
wrmsrl(MSR_KVM_PV_EOI_EN, 0);
}
kvm_pv_disable_apf();
apf_task_wake_all();
} | static void kvm_guest_cpu_offline(void) {
kvm_disable_steal_time();
if (kvm_para_has_feature(KVM_FEATURE_PV_EOI)) {
wrmsrl(MSR_KVM_PV_EOI_EN, 0);
}
kvm_pv_disable_apf();
apf_task_wake_all();
kvmclock_disable();
} | static void kvm_guest_cpu_offline(void) {
kvm_disable_steal_time();
if (kvm_para_has_feature(KVM_FEATURE_PV_EOI)) {
wrmsrl(MSR_KVM_PV_EOI_EN, 0);
}
kvm_pv_disable_apf();
apf_task_wake_all();
}
| static void kvm_guest_cpu_offline(void) {
kvm_disable_steal_time();
if (kvm_para_has_feature(KVM_FEATURE_PV_EOI)) {
wrmsrl(MSR_KVM_PV_EOI_EN, 0);
}
kvm_pv_disable_apf();
apf_task_wake_all();
kvmclock_disable();
}
| static void kvm_guest_cpu_offline(void) {
kvm_disable_steal_time();
if (kvm_para_has_feature(KVM_FEATURE_PV_EOI)) {
wrmsrl(MSR_KVM_PV_EOI_EN, 0);
}
kvm_pv_disable_apf();
apf_task_wake_all();
}
| static void kvm_guest_cpu_offline(void) {
kvm_disable_steal_time();
if (kvm_para_has_feature(KVM_FEATURE_PV_EOI)) {
wrmsrl(MSR_KVM_PV_EOI_EN, 0);
}
kvm_pv_disable_apf();
apf_task_wake_all();
kvmclock_disable();
} | static void kvm_guest_cpu_offline(void) {
kvm_disable_steal_time();
if (kvm_para_has_feature(KVM_FEATURE_PV_EOI)) {
wrmsrl(MSR_KVM_PV_EOI_EN, 0);
}
kvm_pv_disable_apf();
apf_task_wake_all();
+ kvmclock_disable();
} |
CVE-2021-47110 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | arch/x86/kernel/kvmclock.c | kvmclock_init | void kvmclock_init(void) {
u8 flags;
if (!kvm_para_available() || !kvmclock) {
return;
}
if (kvm_para_has_feature(KVM_FEATURE_CLOCKSOURCE2)) {
msr_kvm_system_time = MSR_KVM_SYSTEM_TIME_NEW;
msr_kvm_wall_clock = MSR_KVM_WALL_CLOCK_NEW;
} else if (!kvm_para_has_feature(KVM_FEAT... | void kvmclock_init(void) {
u8 flags;
if (!kvm_para_available() || !kvmclock) {
return;
}
if (kvm_para_has_feature(KVM_FEATURE_CLOCKSOURCE2)) {
msr_kvm_system_time = MSR_KVM_SYSTEM_TIME_NEW;
msr_kvm_wall_clock = MSR_KVM_WALL_CLOCK_NEW;
} else if (!kvm_para_has_feature(KVM_FEAT... | void kvmclock_init(void) {
u8 flags;
if (!kvm_para_available() || !kvmclock) {
return;
}
if (kvm_para_has_feature(KVM_FEATURE_CLOCKSOURCE2)) {
msr_kvm_system_time = MSR_KVM_SYSTEM_TIME_NEW;
msr_kvm_wall_clock = MSR_KVM_WALL_CLOCK_NEW;
} else if (!kvm_para_has_feature(KVM_FEAT... | void kvmclock_init(void) {
u8 flags;
if (!kvm_para_available() || !kvmclock) {
return;
}
if (kvm_para_has_feature(KVM_FEATURE_CLOCKSOURCE2)) {
msr_kvm_system_time = MSR_KVM_SYSTEM_TIME_NEW;
msr_kvm_wall_clock = MSR_KVM_WALL_CLOCK_NEW;
} else if (!kvm_para_has_feature(KVM_FEAT... | void kvmclock_init(void) {
x86_platform.restore_sched_clock_state = kvm_restore_sched_clock_state;
machine_ops.shutdown = kvm_shutdown;
machine_ops.crash_shutdown = kvm_crash_shutdown;
}
| void kvmclock_init(void) {
x86_platform.restore_sched_clock_state = kvm_restore_sched_clock_state;
machine_ops.crash_shutdown = kvm_crash_shutdown;
}
| void kvmclock_init(void) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
x86_platform.restore_sched_clock_state = kvm_restore_sched_clock_state;
machine_ops.shutdown = kvm_shutdown;
machine_ops.crash_shutdown = kvm_crash_shutdown;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
}
| void kvmclock_init(void) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
x86_platform.restore_sched_clock_state = kvm_restore_sched_clock_state;
machine_ops.crash_shutdown = kvm_crash_shutdown;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
} | void kvmclock_init(void) {
x86_platform.restore_sched_clock_state = kvm_restore_sched_clock_state;
- machine_ops.shutdown = kvm_shutdown;
machine_ops.crash_shutdown = kvm_crash_shutdown;
} |
CVE-2021-47111 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/net/xen-netback/interface.c | xenvif_connect_data | int xenvif_connect_data(struct xenvif_queue *queue, unsigned long tx_ring_ref, unsigned long rx_ring_ref, unsigned int tx_evtchn, unsigned int rx_evtchn) {
struct task_struct *task;
int err;
BUG_ON(queue->tx_irq);
BUG_ON(queue->task);
BUG_ON(queue->dealloc_task);
err = xenvif_map_frontend_data_r... | int xenvif_connect_data(struct xenvif_queue *queue, unsigned long tx_ring_ref, unsigned long rx_ring_ref, unsigned int tx_evtchn, unsigned int rx_evtchn) {
struct task_struct *task;
int err;
BUG_ON(queue->tx_irq);
BUG_ON(queue->task);
BUG_ON(queue->dealloc_task);
err = xenvif_map_frontend_data_r... | int xenvif_connect_data(struct xenvif_queue *queue, unsigned long tx_ring_ref, unsigned long rx_ring_ref, unsigned int tx_evtchn, unsigned int rx_evtchn) {
struct xenbus_device *dev = xenvif_to_xenbus_device(queue->vif);
struct task_struct *task;
int err;
BUG_ON(queue->tx_irq);
BUG_ON(queue->task);
... | int xenvif_connect_data(struct xenvif_queue *queue, unsigned long tx_ring_ref, unsigned long rx_ring_ref, unsigned int tx_evtchn, unsigned int rx_evtchn) {
struct xenbus_device *dev = xenvif_to_xenbus_device(queue->vif);
struct task_struct *task;
int err;
BUG_ON(queue->tx_irq);
BUG_ON(queue->task);
... | int xenvif_connect_data(struct xenvif_queue *queue, unsigned long tx_ring_ref, unsigned long rx_ring_ref, unsigned int tx_evtchn, unsigned int rx_evtchn) {
err = xenvif_map_frontend_data_rings(queue, tx_ring_ref, rx_ring_ref);
task = kthread_run(xenvif_kthread_guest_rx, queue, "%s-guest-rx", queue->name);
i... | int xenvif_connect_data(struct xenvif_queue *queue, unsigned long tx_ring_ref, unsigned long rx_ring_ref, unsigned int tx_evtchn, unsigned int rx_evtchn) {
err = xenvif_map_frontend_data_rings(queue, tx_ring_ref, rx_ring_ref);
task = kthread_run(xenvif_kthread_guest_rx, queue, "%s-guest-rx", queue->name);
i... | int xenvif_connect_data(struct xenvif_queue *queue, unsigned long tx_ring_ref, unsigned long rx_ring_ref, unsigned int tx_evtchn, unsigned int rx_evtchn) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
err = xenvif_map_frontend_data_rings(queue, tx_ring_ref, rx_ring_ref);
/* PLACEHOLDER: DO NOT DELETE THIS ... | int xenvif_connect_data(struct xenvif_queue *queue, unsigned long tx_ring_ref, unsigned long rx_ring_ref, unsigned int tx_evtchn, unsigned int rx_evtchn) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
err = xenvif_map_frontend_data_rings(queue, tx_ring_ref, rx_ring_ref);
/* PLACEHOLDER: DO NOT DELETE THIS ... | int xenvif_connect_data(struct xenvif_queue *queue, unsigned long tx_ring_ref, unsigned long rx_ring_ref, unsigned int tx_evtchn, unsigned int rx_evtchn) {
err = xenvif_map_frontend_data_rings(queue, tx_ring_ref, rx_ring_ref);
task = kthread_run(xenvif_kthread_guest_rx, queue, "%s-guest-rx", queue->name);
... |
CVE-2021-47111 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/net/xen-netback/interface.c | xenvif_disconnect_queue | static void xenvif_disconnect_queue(struct xenvif_queue *queue) {
if (queue->task) {
kthread_stop(queue->task);
queue->task = NULL;
}
if (queue->dealloc_task) {
kthread_stop(queue->dealloc_task);
queue->dealloc_task = NULL;
}
if (queue->napi.poll) {
netif_napi... | static void xenvif_disconnect_queue(struct xenvif_queue *queue) {
if (queue->task) {
kthread_stop(queue->task);
put_task_struct(queue->task);
queue->task = NULL;
}
if (queue->dealloc_task) {
kthread_stop(queue->dealloc_task);
queue->dealloc_task = NULL;
}
if (... | static void xenvif_disconnect_queue(struct xenvif_queue *queue) {
if (queue->task) {
kthread_stop(queue->task);
queue->task = NULL;
}
if (queue->dealloc_task) {
kthread_stop(queue->dealloc_task);
queue->dealloc_task = NULL;
}
if (queue->napi.poll) {
netif_napi... | static void xenvif_disconnect_queue(struct xenvif_queue *queue) {
if (queue->task) {
kthread_stop(queue->task);
put_task_struct(queue->task);
queue->task = NULL;
}
if (queue->dealloc_task) {
kthread_stop(queue->dealloc_task);
queue->dealloc_task = NULL;
}
if (... | static void xenvif_disconnect_queue(struct xenvif_queue *queue) {
if (queue->task) {
kthread_stop(queue->task);
queue->task = NULL;
}
}
| static void xenvif_disconnect_queue(struct xenvif_queue *queue) {
if (queue->task) {
kthread_stop(queue->task);
put_task_struct(queue->task);
queue->task = NULL;
}
}
| static void xenvif_disconnect_queue(struct xenvif_queue *queue) {
if (queue->task) {
kthread_stop(queue->task);
queue->task = NULL;
}
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
}
| static void xenvif_disconnect_queue(struct xenvif_queue *queue) {
if (queue->task) {
kthread_stop(queue->task);
put_task_struct(queue->task);
queue->task = NULL;
}
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
} | static void xenvif_disconnect_queue(struct xenvif_queue *queue) {
if (queue->task) {
kthread_stop(queue->task);
+ put_task_struct(queue->task);
queue->task = NULL;
}
} |
CVE-2021-47112 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | arch/x86/kernel/kvm.c | kvm_guest_init | static void kvm_guest_init(void) {
int i;
paravirt_ops_setup();
register_reboot_notifier(&kvm_pv_reboot_nb);
for (i = 0; i < KVM_TASK_SLEEP_HASHSIZE; i++)
raw_spin_lock_init(&async_pf_sleepers[i].lock);
if (kvm_para_has_feature(KVM_FEATURE_ASYNC_PF)) {
x86_init.irqs.trap_init = kvm_a... | static void kvm_guest_init(void) {
int i;
paravirt_ops_setup();
register_reboot_notifier(&kvm_pv_reboot_nb);
for (i = 0; i < KVM_TASK_SLEEP_HASHSIZE; i++)
raw_spin_lock_init(&async_pf_sleepers[i].lock);
if (kvm_para_has_feature(KVM_FEATURE_ASYNC_PF)) {
x86_init.irqs.trap_init = kvm_a... | static void kvm_guest_init(void) {
int i;
paravirt_ops_setup();
register_reboot_notifier(&kvm_pv_reboot_nb);
for (i = 0; i < KVM_TASK_SLEEP_HASHSIZE; i++)
raw_spin_lock_init(&async_pf_sleepers[i].lock);
if (kvm_para_has_feature(KVM_FEATURE_STEAL_TIME)) {
has_steal_clock = 1;
... | static void kvm_guest_init(void) {
int i;
paravirt_ops_setup();
register_reboot_notifier(&kvm_pv_reboot_nb);
for (i = 0; i < KVM_TASK_SLEEP_HASHSIZE; i++)
raw_spin_lock_init(&async_pf_sleepers[i].lock);
if (kvm_para_has_feature(KVM_FEATURE_STEAL_TIME)) {
has_steal_clock = 1;
... | static void kvm_guest_init(void) {
kvm_guest_cpu_init();
hardlockup_detector_disable();
}
| static void kvm_guest_init(void) {
kvm_guest_cpu_init();
register_syscore_ops(&kvm_syscore_ops);
hardlockup_detector_disable();
}
| static void kvm_guest_init(void) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
kvm_guest_cpu_init();
hardlockup_detector_disable();
}
| static void kvm_guest_init(void) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
kvm_guest_cpu_init();
register_syscore_ops(&kvm_syscore_ops);
hardlockup_detector_disable();
} | static void kvm_guest_init(void) {
kvm_guest_cpu_init();
+ register_syscore_ops(&kvm_syscore_ops);
hardlockup_detector_disable();
} |
CVE-2021-47113 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | fs/btrfs/inode.c | btrfs_rename_exchange | static int btrfs_rename_exchange(struct inode *old_dir, struct dentry *old_dentry, struct inode *new_dir, struct dentry *new_dentry) {
struct btrfs_fs_info *fs_info = btrfs_sb(old_dir->i_sb);
struct btrfs_trans_handle *trans;
struct btrfs_root *root = BTRFS_I(old_dir)->root;
struct btrfs_root *dest = BT... | static int btrfs_rename_exchange(struct inode *old_dir, struct dentry *old_dentry, struct inode *new_dir, struct dentry *new_dentry) {
struct btrfs_fs_info *fs_info = btrfs_sb(old_dir->i_sb);
struct btrfs_trans_handle *trans;
struct btrfs_root *root = BTRFS_I(old_dir)->root;
struct btrfs_root *dest = BT... | static int btrfs_rename_exchange(struct inode *old_dir, struct dentry *old_dentry, struct inode *new_dir, struct dentry *new_dentry) {
struct btrfs_fs_info *fs_info = btrfs_sb(old_dir->i_sb);
struct btrfs_trans_handle *trans;
struct btrfs_root *root = BTRFS_I(old_dir)->root;
struct btrfs_root *dest = BT... | static int btrfs_rename_exchange(struct inode *old_dir, struct dentry *old_dentry, struct inode *new_dir, struct dentry *new_dentry) {
struct btrfs_fs_info *fs_info = btrfs_sb(old_dir->i_sb);
struct btrfs_trans_handle *trans;
struct btrfs_root *root = BTRFS_I(old_dir)->root;
struct btrfs_root *dest = BT... | static int btrfs_rename_exchange(struct inode *old_dir, struct dentry *old_dentry, struct inode *new_dir, struct dentry *new_dentry) {
struct btrfs_root *root = BTRFS_I(old_dir)->root;
struct btrfs_root *dest = BTRFS_I(new_dir)->root;
struct inode *new_inode = new_dentry->d_inode;
struct inode *old_inod... | static int btrfs_rename_exchange(struct inode *old_dir, struct dentry *old_dentry, struct inode *new_dir, struct dentry *new_dentry) {
struct btrfs_root *root = BTRFS_I(old_dir)->root;
struct btrfs_root *dest = BTRFS_I(new_dir)->root;
struct inode *new_inode = new_dentry->d_inode;
struct inode *old_inod... | static int btrfs_rename_exchange(struct inode *old_dir, struct dentry *old_dentry, struct inode *new_dir, struct dentry *new_dentry) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
struct btrfs_root *root = BTRFS_I(old_dir)->root;
struct btrfs_root *dest = BTRFS_I(new_dir)->root;
struct inode *new_inode... | static int btrfs_rename_exchange(struct inode *old_dir, struct dentry *old_dentry, struct inode *new_dir, struct dentry *new_dentry) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
struct btrfs_root *root = BTRFS_I(old_dir)->root;
struct btrfs_root *dest = BTRFS_I(new_dir)->root;
struct inode *new_inode... | static int btrfs_rename_exchange(struct inode *old_dir, struct dentry *old_dentry, struct inode *new_dir, struct dentry *new_dentry) {
struct btrfs_root *root = BTRFS_I(old_dir)->root;
struct btrfs_root *dest = BTRFS_I(new_dir)->root;
struct inode *new_inode = new_dentry->d_inode;
struct inode *old... |
CVE-2021-47114 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | fs/ocfs2/file.c | __ocfs2_change_file_space | static int __ocfs2_change_file_space(struct file *file, struct inode *inode, loff_t f_pos, unsigned int cmd, struct ocfs2_space_resv *sr, int change_size) {
int ret;
s64 llen;
loff_t size;
struct ocfs2_super *osb = OCFS2_SB(inode->i_sb);
struct buffer_head *di_bh = NULL;
handle_t *handle;
un... | static int __ocfs2_change_file_space(struct file *file, struct inode *inode, loff_t f_pos, unsigned int cmd, struct ocfs2_space_resv *sr, int change_size) {
int ret;
s64 llen;
loff_t size, orig_isize;
struct ocfs2_super *osb = OCFS2_SB(inode->i_sb);
struct buffer_head *di_bh = NULL;
handle_t *ha... | static int __ocfs2_change_file_space(struct file *file, struct inode *inode, loff_t f_pos, unsigned int cmd, struct ocfs2_space_resv *sr, int change_size) {
int ret;
s64 llen;
loff_t size;
struct ocfs2_super *osb = OCFS2_SB(inode->i_sb);
struct buffer_head *di_bh = NULL;
handle_t *handle;
un... | static int __ocfs2_change_file_space(struct file *file, struct inode *inode, loff_t f_pos, unsigned int cmd, struct ocfs2_space_resv *sr, int change_size) {
int ret;
s64 llen;
loff_t size, orig_isize;
struct ocfs2_super *osb = OCFS2_SB(inode->i_sb);
struct buffer_head *di_bh = NULL;
handle_t *ha... | static int __ocfs2_change_file_space(struct file *file, struct inode *inode, loff_t f_pos, unsigned int cmd, struct ocfs2_space_resv *sr, int change_size) {
s64 llen;
loff_t size;
struct ocfs2_super *osb = OCFS2_SB(inode->i_sb);
struct buffer_head *di_bh = NULL;
unsigned long long max_off = inode->i... | static int __ocfs2_change_file_space(struct file *file, struct inode *inode, loff_t f_pos, unsigned int cmd, struct ocfs2_space_resv *sr, int change_size) {
s64 llen;
loff_t size, orig_isize;
struct ocfs2_super *osb = OCFS2_SB(inode->i_sb);
struct buffer_head *di_bh = NULL;
unsigned long long max_of... | static int __ocfs2_change_file_space(struct file *file, struct inode *inode, loff_t f_pos, unsigned int cmd, struct ocfs2_space_resv *sr, int change_size) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
s64 llen;
loff_t size;
struct ocfs2_super *osb = OCFS2_SB(inode->i_sb);
struct buffer_head *di_bh... | static int __ocfs2_change_file_space(struct file *file, struct inode *inode, loff_t f_pos, unsigned int cmd, struct ocfs2_space_resv *sr, int change_size) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
s64 llen;
loff_t size, orig_isize;
struct ocfs2_super *osb = OCFS2_SB(inode->i_sb);
struct buffer... | static int __ocfs2_change_file_space(struct file *file, struct inode *inode, loff_t f_pos, unsigned int cmd, struct ocfs2_space_resv *sr, int change_size) {
s64 llen;
- loff_t size;
+ loff_t size, orig_isize;
struct ocfs2_super *osb = OCFS2_SB(inode->i_sb);
struct buffer_head *di_bh = NULL;
u... |
CVE-2021-47116 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | fs/ext4/mballoc.c | ext4_mb_init_backend | static int ext4_mb_init_backend(struct super_block *sb) {
ext4_group_t ngroups = ext4_get_groups_count(sb);
ext4_group_t i;
struct ext4_sb_info *sbi = EXT4_SB(sb);
int err;
struct ext4_group_desc *desc;
struct ext4_group_info ***group_info;
struct kmem_cache *cachep;
err = ext4_mb_alloc_... | static int ext4_mb_init_backend(struct super_block *sb) {
ext4_group_t ngroups = ext4_get_groups_count(sb);
ext4_group_t i;
struct ext4_sb_info *sbi = EXT4_SB(sb);
int err;
struct ext4_group_desc *desc;
struct ext4_group_info ***group_info;
struct kmem_cache *cachep;
err = ext4_mb_alloc_... | static int ext4_mb_init_backend(struct super_block *sb) {
ext4_group_t ngroups = ext4_get_groups_count(sb);
ext4_group_t i;
struct ext4_sb_info *sbi = EXT4_SB(sb);
int err;
struct ext4_group_desc *desc;
struct ext4_group_info ***group_info;
struct kmem_cache *cachep;
err = ext4_mb_alloc_... | static int ext4_mb_init_backend(struct super_block *sb) {
ext4_group_t ngroups = ext4_get_groups_count(sb);
ext4_group_t i;
struct ext4_sb_info *sbi = EXT4_SB(sb);
int err;
struct ext4_group_desc *desc;
struct ext4_group_info ***group_info;
struct kmem_cache *cachep;
err = ext4_mb_alloc_... | static int ext4_mb_init_backend(struct super_block *sb) {
if (ext4_has_feature_flex_bg(sb)) {
if (sbi->s_es->s_log_groups_per_flex >= 32) {
ext4_msg(sb, KERN_ERR, "too many log groups per flexible block group");
goto err_freesgi;
}
} else {
}
err_freebuddy:
cachep... | static int ext4_mb_init_backend(struct super_block *sb) {
if (ext4_has_feature_flex_bg(sb)) {
if (sbi->s_es->s_log_groups_per_flex >= 32) {
ext4_msg(sb, KERN_ERR, "too many log groups per flexible block group");
goto err_freebuddy;
}
} else {
}
err_freebuddy:
cach... | static int ext4_mb_init_backend(struct super_block *sb) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (ext4_has_feature_flex_bg(sb)) {
if (sbi->s_es->s_log_groups_per_flex >= 32) {
ext4_msg(sb, KERN_ERR, "too many log groups per flexible block group");
goto err_freesgi;
... | static int ext4_mb_init_backend(struct super_block *sb) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (ext4_has_feature_flex_bg(sb)) {
if (sbi->s_es->s_log_groups_per_flex >= 32) {
ext4_msg(sb, KERN_ERR, "too many log groups per flexible block group");
goto err_freebuddy;
... | static int ext4_mb_init_backend(struct super_block *sb) {
if (ext4_has_feature_flex_bg(sb)) {
if (sbi->s_es->s_log_groups_per_flex >= 32) {
ext4_msg(sb, KERN_ERR, "too many log groups per flexible block group");
- goto err_freesgi;
+ goto err_freebuddy;
}
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.