search for: err_alloc

Displaying 20 results from an estimated 35 matches for "err_alloc".

2023 Feb 03
6
[PATCH v3 0/6] features provisioning fixes and mlx5_vdpa support
This patchset is pre-requisite to export and provision device config attributes and features for vdpa live migration, in a way backward and forward compatibility can be retained. The follow up work [1] will need to be built around the new feature provisioning uAPI, with which it's easier to formalize migration compatibility support at the driver level. Thanks, -Siwei [1] [PATCH v3 0/4] vDPA:
2023 Feb 06
7
[PATCH v4 0/6] features provisioning fixes and mlx5_vdpa support
This patchset is pre-requisite to export and provision device config attributes and features for vdpa live migration, in a way backward and forward compatibility can be retained. The follow up work [1] will need to be built around the new feature provisioning uAPI, with which it's easier to formalize migration compatibility support at the driver level. Thanks, -Siwei [1] [PATCH v3 0/4] vDPA:
2023 Jan 30
6
[PATCH 0/6] features provisioning fixes and mlx5_vdpa support
This patchset is pre-requisite to export and provision device config attributes and features for vdpa live migration, in a way backward and forward compatibility can be retained. The follow up work [1] will need to be built around the new feature provisioning uAPI, with which it's easier to formalize migration compatibility support at the driver level. Thanks, -Siwei [1] [PATCH v3 0/4] vDPA:
2023 Jan 31
7
[PATCH v2 0/7] features provisioning fixes and mlx5_vdpa support
This patchset is pre-requisite to export and provision device config attributes and features for vdpa live migration, in a way backward and forward compatibility can be retained. The follow up work [1] will need to be built around the new feature provisioning uAPI, with which it's easier to formalize migration compatibility support at the driver level. Thanks, -Siwei [1] [PATCH v3 0/4] vDPA:
2010 Jul 24
0
[PATCH] chain.c: allocation fixes
...part->private.ebr.parent); - free(part->block); - free(part); + free_iter(part); return NULL; } @@ -603,10 +618,9 @@ static struct disk_part_iter *next_mbr_part(struct disk_part_iter *part) error("Could not allocate extended partition iterator!\n"); goto err_alloc; } + memset(ebr_part, 0, sizeof(*ebr_part)); /* Setup EBR iterator parameters */ - ebr_part->block = NULL; ebr_part->index = 4; - ebr_part->record = NULL; ebr_part->next = next_ebr_part; ebr_part->private.ebr.parent = part; /* Trigger an initial EBR load */ @@ -625,9 +639...
2020 Jul 11
0
[vhost:config-endian 33/36] drivers/vdpa/vdpa_sim/vdpa_sim.c:335:21: sparse: sparse: incorrect type in assignment (different base types)
...c06f4 drivers/virtio/vdpa/vdpa_sim/vdpa_sim.c Jason Wang 2020-03-26 315 &vdpasim_net_config_ops); 2c53d0f64c06f4 drivers/virtio/vdpa/vdpa_sim/vdpa_sim.c Jason Wang 2020-03-26 316 if (!vdpasim) 2c53d0f64c06f4 drivers/virtio/vdpa/vdpa_sim/vdpa_sim.c Jason Wang 2020-03-26 317 goto err_alloc; 2c53d0f64c06f4 drivers/virtio/vdpa/vdpa_sim/vdpa_sim.c Jason Wang 2020-03-26 318 2c53d0f64c06f4 drivers/virtio/vdpa/vdpa_sim/vdpa_sim.c Jason Wang 2020-03-26 319 INIT_WORK(&vdpasim->work, vdpasim_work); 2c53d0f64c06f4 drivers/virtio/vdpa/vdpa_sim/vdpa_sim.c Jason Wang 2020-03-26 320...
2020 Aug 19
0
[PATCH 04/28] net/au1000-eth: stop using DMA_ATTR_NON_CONSISTENT
...;pdev->dev, MAX_BUF_SIZE * (NUM_TX_BUFFS + NUM_RX_BUFFS), - (void *)aup->vaddr, aup->dma_addr, - DMA_ATTR_NON_CONSISTENT); + dma_free_coherent(&pdev->dev, MAX_BUF_SIZE * (NUM_TX_BUFFS + NUM_RX_BUFFS), + (void *)aup->vaddr, aup->dma_addr); err_vaddr: free_netdev(dev); err_alloc: @@ -1344,9 +1342,8 @@ static int au1000_remove(struct platform_device *pdev) if (aup->tx_db_inuse[i]) au1000_ReleaseDB(aup, aup->tx_db_inuse[i]); - dma_free_attrs(&pdev->dev, MAX_BUF_SIZE * (NUM_TX_BUFFS + NUM_RX_BUFFS), - (void *)aup->vaddr, aup->dma_addr, - DMA_AT...
2020 Aug 07
0
[PATCH] vdpa/mlx5: Fix uninitialised variable in core/mr.c
...-319,8 +319,10 @@ static int add_direct_chain(struct mlx5_vdpa_dev *mvdev, u64 start, u64 size, u8 > while (size) { > sz = (u32)min_t(u64, MAX_KLM_SIZE, size); > dmr = kzalloc(sizeof(*dmr), GFP_KERNEL); > - if (!dmr) > + if (!dmr) { > + err = -ENOMEM; > goto err_alloc; > + } > > dmr->start = st; > dmr->end = st + sz; > -- > 2.28.0 >
2020 Aug 08
0
[PATCH] vdpa/mlx5: Missing error code on allocation failure
...c +++ b/drivers/vdpa/mlx5/core/mr.c @@ -319,8 +319,10 @@ static int add_direct_chain(struct mlx5_vdpa_dev *mvdev, u64 start, u64 size, u8 while (size) { sz = (u32)min_t(u64, MAX_KLM_SIZE, size); dmr = kzalloc(sizeof(*dmr), GFP_KERNEL); - if (!dmr) + if (!dmr) { + err = -ENOMEM; goto err_alloc; + } dmr->start = st; dmr->end = st + sz; -- 2.27.0
2010 Jul 23
0
[PATCH] chain.c: gpt's index/private.index mismatch fix, cosmetic iterator changes
...out_finished: free(part->private.ebr.parent->block); free(part->private.ebr.parent); @@ -629,7 +624,6 @@ static struct disk_part_iter *next_mbr_part(struct disk_part_iter *part) part->record = table + part->private.mbr_index; return part; - free(ebr_part); err_alloc: free(part->block); @@ -869,7 +863,7 @@ static struct disk_part_iter *next_gpt_part(struct disk_part_iter *part) part->private.gpt.part_guid = &gpt_part->uid; part->private.gpt.part_label = gpt_part->name; /* Update our index */ - part->index++; + p...
2023 Mar 21
0
[PATCH v3 1/2] vdpa/mlx5: Extend driver support for new features
...); > u32 out[MLX5_ST_SZ_DW(create_virtio_net_q_out)] = {}; > void *obj_context; > + u16 mlx_features; > void *cmd_hdr; > void *vq_ctx; > void *in; > @@ -812,6 +829,7 @@ static int create_virtqueue(struct mlx5_vdpa_net *ndev, struct mlx5_vdpa_virtque > goto err_alloc; > } > > + mlx_features = get_features(ndev->mvdev.actual_features); > cmd_hdr = MLX5_ADDR_OF(create_virtio_net_q_in, in, general_obj_in_cmd_hdr); > > MLX5_SET(general_obj_in_cmd_hdr, cmd_hdr, opcode, MLX5_CMD_OP_CREATE_GENERAL_OBJECT); > @@ -822,7 +840,9 @@ s...
2023 Mar 17
0
[PATCH v2 1/2] vdpa/mlx5: Extend driver support for new features
...e_virtio_net_q_out)] = {}; > void *obj_context; > + u16 mlx_features; > void *cmd_hdr; > void *vq_ctx; > void *in; > @@ -812,6 +833,7 @@ static int create_virtqueue(struct mlx5_vdpa_net *ndev, struct mlx5_vdpa_virtque > goto err_alloc; > } > > + mlx_features = get_features(ndev->mvdev.actual_features); > cmd_hdr = MLX5_ADDR_OF(create_virtio_net_q_in, in, general_obj_in_cmd_hdr); > > MLX5_SET(general_obj_in_cmd_hdr, cmd_hdr, opcode, MLX5_CMD_OP_CREATE_GENERAL_OBJECT); > @@ -82...
2020 Feb 20
0
[PATCH V3 5/5] vdpasim: vDPA device simulator
...dpasim *vdpasim; + struct device *dev; + void *buffer; + int ret = -ENOMEM; + + iommu = vhost_iotlb_alloc(2048, 0); + if (!iommu) + goto err; + + buffer = kmalloc(PAGE_SIZE, GFP_KERNEL); + if (!buffer) + goto err_buffer; + + vdpasim = kzalloc(sizeof(*vdpasim), GFP_KERNEL); + if (!vdpasim) + goto err_alloc; + + vdpasim->buffer = buffer; + vdpasim->iommu = iommu; + + config = &vdpasim->config; + config->mtu = 1500; + config->status = VIRTIO_NET_S_LINK_UP; + eth_random_addr(config->mac); + + INIT_WORK(&vdpasim->work, vdpasim_work); + spin_lock_init(&vdpasim->lock); +...
2019 Aug 09
0
[RFC PATCH v6 02/92] kvm: introspection: add basic ioctls (hook/unhook)
...erence */ + mutex_lock(&kvm->lock); + + if (!alloc_kvmi(kvm, qemu)) { + mutex_unlock(&kvm->lock); + return -ENOMEM; + } + ikvm = IKVM(kvm); + + /* interact with other kernel components after structure allocation */ + if (!kvmi_sock_get(ikvm, qemu->fd)) { + err = -EINVAL; + goto err_alloc; + } + + /* + * Make sure all the KVM/KVMI structures are linked and no pointer + * is read as NULL after the reference count has been set. + */ + smp_mb__before_atomic(); + refcount_set(&kvm->kvmi_ref, 1); + + mutex_unlock(&kvm->lock); + + ikvm->recv = kthread_run(kvmi_recv, ik...
2023 Mar 23
1
[PATCH v3 8/8] vdpa_sim: add support for user VA
...gt; dev_attr->alloc_size, > - dev_attr->name, false); > + dev_attr->name, use_va); > if (IS_ERR(vdpa)) { > ret = PTR_ERR(vdpa); > goto err_alloc; > @@ -582,6 +630,30 @@ static int vdpasim_set_map(struct vdpa_device *vdpa, unsigned int asid, > return ret; > } > > +static int vdpasim_bind_mm(struct vdpa_device *vdpa, struct mm_struct *mm) > +{ > + struct vdpasim *vdpasim = vdpa_to_sim(vdpa); > + st...
2023 Mar 14
1
[PATCH v2 8/8] vdpa_sim: add support for user VA
...gt; dev_attr->alloc_size, > - dev_attr->name, false); > + dev_attr->name, use_va); > if (IS_ERR(vdpa)) { > ret = PTR_ERR(vdpa); > goto err_alloc; > @@ -571,6 +640,27 @@ static int vdpasim_set_map(struct vdpa_device *vdpa, unsigned int asid, > return ret; > } > > +static int vdpasim_bind_mm(struct vdpa_device *vdpa, struct mm_struct *mm) > +{ > + struct vdpasim *vdpasim = vdpa_to_sim(vdpa); > + in...
2010 Jul 26
5
[RFC/PATCH] New chainloading functionality
This patch introduces extra functionality to chain.c, mainly with reference to BPB adjustments, but not only that. It expects 3 small patches I sent earlier (they are included for easy reference, patches 1-3/4). The changes introduced are: 1) file and boot sector use separate options to control load address and jump address (if applicable). Options are as described below: *
2023 Mar 24
1
[PATCH v3 8/8] vdpa_sim: add support for user VA
...v_attr, > vdpa = __vdpa_alloc_device(NULL, ops, > dev_attr->ngroups, dev_attr->nas, > dev_attr->alloc_size, > - dev_attr->name, false); > + dev_attr->name, use_va); > if (IS_ERR(vdpa)) { > ret = PTR_ERR(vdpa); > goto err_alloc; > @@ -582,6 +630,30 @@ static int vdpasim_set_map(struct vdpa_device *vdpa, unsigned int asid, > return ret; > } > > +static int vdpasim_bind_mm(struct vdpa_device *vdpa, struct mm_struct *mm) > +{ > + struct vdpasim *vdpasim = vdpa_to_sim(vdpa); > + struct vdpasim_...
2020 Jul 01
5
[PATCH 0/5]
Hi all: This series tries to support batched IOTLB updating vhost-vdpa. Currently vhost-vdpa accepts userspace mapping via IOTLB API, and it can only forward one mapping to IOMMU or device through IOMMU API or dma_map(). Though set_map() is designed to have the capability to pass an rbtree based mapping to vDPA device, it's still be called at least once for each VHOST_IOTLB_UPDATE or
2019 Aug 09
0
[RFC PATCH v6 27/92] kvm: introspection: use page track
...-> kvmi_put. + */ + kvmi_clear_mem_access(kvm); + /* * At this moment the socket is shut down, no more commands will come * from the introspector, and the only way into the introspection is @@ -351,6 +640,8 @@ int kvmi_hook(struct kvm *kvm, const struct kvm_introspection *qemu) goto err_alloc; } + kvm_page_track_register_notifier(kvm, &ikvm->kptn_node); + /* * Make sure all the KVM/KVMI structures are linked and no pointer * is read as NULL after the reference count has been set. diff --git a/virt/kvm/kvmi_int.h b/virt/kvm/kvmi_int.h index 7cff91bc1acc..d798908d0f70 1...