search for: kzalloc

Displaying 20 results from an estimated 1988 matches for "kzalloc".

Did you mean: kmalloc
2012 Dec 10
6
[Bug 58087] New: [-next] nouveau corrupts kernel mm allocator
https://bugs.freedesktop.org/show_bug.cgi?id=58087 Priority: medium Bug ID: 58087 Assignee: nouveau at lists.freedesktop.org Summary: [-next] nouveau corrupts kernel mm allocator QA Contact: xorg-team at lists.x.org Severity: normal Classification: Unclassified OS: Linux (All) Reporter: peter at
2020 Aug 06
1
[PATCH][next] vdpa/mlx5: fix memory allocation failure checks
...vdpa/mlx5/net/mlx5_vnet.c index 3ec44a4f0e45..55bc58e1dae9 100644 --- a/drivers/vdpa/mlx5/net/mlx5_vnet.c +++ b/drivers/vdpa/mlx5/net/mlx5_vnet.c @@ -867,7 +867,7 @@ static void alloc_inout(struct mlx5_vdpa_net *ndev, int cmd, void **in, int *inl *outlen = MLX5_ST_SZ_BYTES(qp_2rst_out); *in = kzalloc(*inlen, GFP_KERNEL); *out = kzalloc(*outlen, GFP_KERNEL); - if (!in || !out) + if (!*in || !*out) goto outerr; MLX5_SET(qp_2rst_in, *in, opcode, cmd); @@ -879,7 +879,7 @@ static void alloc_inout(struct mlx5_vdpa_net *ndev, int cmd, void **in, int *inl *outlen = MLX5_ST_SZ_BYTES(rst...
2023 Aug 09
8
[PATCH -next 0/7] drm: Remove many unnecessary NULL values
The NULL initialization of the pointers assigned by kzalloc() or kunit_kzalloc() first is not necessary, because if the kzalloc() or kunit_kzalloc() failed, the pointers will be assigned NULL, otherwise it works as usual. so remove it. Ruan Jinjie (7): drm/amdkfd: Remove unnecessary NULL values drm/amd/display: Remove unnecessary NULL values drm/msm:...
2020 May 05
2
[vhost:vhost 8/22] drivers/virtio/virtio_mem.c:1375:20: error: implicit declaration of function 'kzalloc'; did you mean 'vzalloc'?
...llowing tag as appropriate Reported-by: kbuild test robot <lkp at intel.com> All error/warnings (new ones prefixed by >>): drivers/virtio/virtio_mem.c: In function 'virtio_mem_probe': >> drivers/virtio/virtio_mem.c:1375:20: error: implicit declaration of function 'kzalloc'; did you mean 'vzalloc'? [-Werror=implicit-function-declaration] vdev->priv = vm = kzalloc(sizeof(*vm), GFP_KERNEL); ^~~~~~~ vzalloc >> drivers/virtio/virtio_mem.c:1375:18: warning: assignment makes pointer from integer withou...
2020 May 05
2
[vhost:vhost 8/22] drivers/virtio/virtio_mem.c:1375:20: error: implicit declaration of function 'kzalloc'; did you mean 'vzalloc'?
...llowing tag as appropriate Reported-by: kbuild test robot <lkp at intel.com> All error/warnings (new ones prefixed by >>): drivers/virtio/virtio_mem.c: In function 'virtio_mem_probe': >> drivers/virtio/virtio_mem.c:1375:20: error: implicit declaration of function 'kzalloc'; did you mean 'vzalloc'? [-Werror=implicit-function-declaration] vdev->priv = vm = kzalloc(sizeof(*vm), GFP_KERNEL); ^~~~~~~ vzalloc >> drivers/virtio/virtio_mem.c:1375:18: warning: assignment makes pointer from integer withou...
2020 May 05
2
[vhost:vhost 8/22] drivers/virtio/virtio_mem.c:1375:20: error: implicit declaration of function 'kzalloc'; did you mean 'vzalloc'?
...st robot <lkp at intel.com> > > > > All error/warnings (new ones prefixed by >>): > > > > drivers/virtio/virtio_mem.c: In function 'virtio_mem_probe': > >>> drivers/virtio/virtio_mem.c:1375:20: error: implicit declaration of function 'kzalloc'; did you mean 'vzalloc'? [-Werror=implicit-function-declaration] > > vdev->priv = vm = kzalloc(sizeof(*vm), GFP_KERNEL); > > ^~~~~~~ > > vzalloc > >>> drivers/virtio/virtio_mem.c:1375:18: warning: assig...
2020 May 05
2
[vhost:vhost 8/22] drivers/virtio/virtio_mem.c:1375:20: error: implicit declaration of function 'kzalloc'; did you mean 'vzalloc'?
...st robot <lkp at intel.com> > > > > All error/warnings (new ones prefixed by >>): > > > > drivers/virtio/virtio_mem.c: In function 'virtio_mem_probe': > >>> drivers/virtio/virtio_mem.c:1375:20: error: implicit declaration of function 'kzalloc'; did you mean 'vzalloc'? [-Werror=implicit-function-declaration] > > vdev->priv = vm = kzalloc(sizeof(*vm), GFP_KERNEL); > > ^~~~~~~ > > vzalloc > >>> drivers/virtio/virtio_mem.c:1375:18: warning: assig...
2013 Sep 17
3
[PATCH] vhost/scsi: use vmalloc for order-10 allocation
As vhost scsi device struct is large, if the device is created on a busy system, kzalloc() might fail, so this patch does a fallback to vzalloc(). As vmalloc() adds overhead on data-path, add __GFP_REPEAT to kzalloc() flags to do this fallback only when really needed. Reported-by: Dan Aloni <alonid at stratoscale.com> Signed-off-by: Michael S. Tsirkin <mst at redhat.com>...
2013 Sep 17
3
[PATCH] vhost/scsi: use vmalloc for order-10 allocation
As vhost scsi device struct is large, if the device is created on a busy system, kzalloc() might fail, so this patch does a fallback to vzalloc(). As vmalloc() adds overhead on data-path, add __GFP_REPEAT to kzalloc() flags to do this fallback only when really needed. Reported-by: Dan Aloni <alonid at stratoscale.com> Signed-off-by: Michael S. Tsirkin <mst at redhat.com>...
2020 May 05
3
[vhost:vhost 8/22] drivers/virtio/virtio_mem.c:1375:20: error: implicit declaration of function 'kzalloc'; did you mean 'vzalloc'?
...>>> > >>> All error/warnings (new ones prefixed by >>): > >>> > >>> drivers/virtio/virtio_mem.c: In function 'virtio_mem_probe': > >>>>> drivers/virtio/virtio_mem.c:1375:20: error: implicit declaration of function 'kzalloc'; did you mean 'vzalloc'? [-Werror=implicit-function-declaration] > >>> vdev->priv = vm = kzalloc(sizeof(*vm), GFP_KERNEL); > >>> ^~~~~~~ > >>> vzalloc > >>>>> drivers/virtio/virt...
2020 May 05
3
[vhost:vhost 8/22] drivers/virtio/virtio_mem.c:1375:20: error: implicit declaration of function 'kzalloc'; did you mean 'vzalloc'?
...>>> > >>> All error/warnings (new ones prefixed by >>): > >>> > >>> drivers/virtio/virtio_mem.c: In function 'virtio_mem_probe': > >>>>> drivers/virtio/virtio_mem.c:1375:20: error: implicit declaration of function 'kzalloc'; did you mean 'vzalloc'? [-Werror=implicit-function-declaration] > >>> vdev->priv = vm = kzalloc(sizeof(*vm), GFP_KERNEL); > >>> ^~~~~~~ > >>> vzalloc > >>>>> drivers/virtio/virt...
2019 Jul 03
3
[PATCH v2 06/35] crypto: Use kmemdup rather than duplicating its implementation
kmemdup is introduced to duplicate a region of memory in a neat way. Rather than kmalloc/kzalloc + memcpy, which the programmer needs to write the size twice (sometimes lead to mistakes), kmemdup improves readability, leads to smaller code and also reduce the chances of mistakes. Suggestion to use kmemdup rather than using kmalloc/kzalloc + memcpy. Signed-off-by: Fuqian Huang <huangfq.daxi...
2019 Jul 03
3
[PATCH v2 06/35] crypto: Use kmemdup rather than duplicating its implementation
kmemdup is introduced to duplicate a region of memory in a neat way. Rather than kmalloc/kzalloc + memcpy, which the programmer needs to write the size twice (sometimes lead to mistakes), kmemdup improves readability, leads to smaller code and also reduce the chances of mistakes. Suggestion to use kmemdup rather than using kmalloc/kzalloc + memcpy. Signed-off-by: Fuqian Huang <huangfq.daxi...
2019 Apr 26
0
[PATCH 09/10] virtio/s390: use DMA memory for ccw I/O and classic notifiers
...tatic void drop_airq_indicator(struct virtqueue *vq, struct airq_info *info) { unsigned long i, flags; @@ -335,8 +355,7 @@ static void virtio_ccw_drop_indicator(struct virtio_ccw_device *vcdev, struct airq_info *airq_info = vcdev->airq_info; if (vcdev->is_thinint) { - thinint_area = kzalloc(sizeof(*thinint_area), - GFP_DMA | GFP_KERNEL); + vc_dma_alloc_struct(&vcdev->vdev, thinint_area); if (!thinint_area) return; thinint_area->summary_indicator = @@ -347,8 +366,8 @@ static void virtio_ccw_drop_indicator(struct virtio_ccw_device *vcdev, ccw->cda =...
2019 May 23
0
[PATCH v2 7/8] virtio/s390: use DMA memory for ccw I/O and classic notifiers
...tatic void drop_airq_indicator(struct virtqueue *vq, struct airq_info *info) { unsigned long i, flags; @@ -336,8 +356,7 @@ static void virtio_ccw_drop_indicator(struct virtio_ccw_device *vcdev, struct airq_info *airq_info = vcdev->airq_info; if (vcdev->is_thinint) { - thinint_area = kzalloc(sizeof(*thinint_area), - GFP_DMA | GFP_KERNEL); + vc_dma_alloc_struct(&vcdev->vdev, thinint_area); if (!thinint_area) return; thinint_area->summary_indicator = @@ -348,8 +367,8 @@ static void virtio_ccw_drop_indicator(struct virtio_ccw_device *vcdev, ccw->cda =...
2019 May 29
0
[PATCH v3 7/8] virtio/s390: use DMA memory for ccw I/O and classic notifiers
...tatic void drop_airq_indicator(struct virtqueue *vq, struct airq_info *info) { unsigned long i, flags; @@ -336,8 +356,7 @@ static void virtio_ccw_drop_indicator(struct virtio_ccw_device *vcdev, struct airq_info *airq_info = vcdev->airq_info; if (vcdev->is_thinint) { - thinint_area = kzalloc(sizeof(*thinint_area), - GFP_DMA | GFP_KERNEL); + vc_dma_alloc_struct(&vcdev->vdev, thinint_area); if (!thinint_area) return; thinint_area->summary_indicator = @@ -348,8 +367,8 @@ static void virtio_ccw_drop_indicator(struct virtio_ccw_device *vcdev, ccw->cda =...
2019 Jun 06
0
[PATCH v4 7/8] virtio/s390: use DMA memory for ccw I/O and classic notifiers
...ev->indicators2; + return &vcdev->dma_area->indicators2; } struct vq_info_block_legacy { @@ -336,8 +340,8 @@ static void virtio_ccw_drop_indicator(struct virtio_ccw_device *vcdev, struct airq_info *airq_info = vcdev->airq_info; if (vcdev->is_thinint) { - thinint_area = kzalloc(sizeof(*thinint_area), - GFP_DMA | GFP_KERNEL); + thinint_area = ccw_device_dma_zalloc(vcdev->cdev, + sizeof(*thinint_area)); if (!thinint_area) return; thinint_area->summary_indicator = @@ -348,8 +352,8 @@ static void virtio_ccw_drop_indicator(struct virtio_ccw...
2019 Jun 12
0
[PATCH v5 7/8] virtio/s390: use DMA memory for ccw I/O and classic notifiers
...ev->indicators2; + return &vcdev->dma_area->indicators2; } struct vq_info_block_legacy { @@ -336,8 +340,8 @@ static void virtio_ccw_drop_indicator(struct virtio_ccw_device *vcdev, struct airq_info *airq_info = vcdev->airq_info; if (vcdev->is_thinint) { - thinint_area = kzalloc(sizeof(*thinint_area), - GFP_DMA | GFP_KERNEL); + thinint_area = ccw_device_dma_zalloc(vcdev->cdev, + sizeof(*thinint_area)); if (!thinint_area) return; thinint_area->summary_indicator = @@ -348,8 +352,8 @@ static void virtio_ccw_drop_indicator(struct virtio_ccw...
2018 Nov 12
14
[PATCH 2/2] drm/atomic: Create and use __drm_atomic_helper_crtc_reset() everywhere
...--git a/drivers/gpu/drm/arm/malidp_crtc.c b/drivers/gpu/drm/arm/malidp_crtc.c index e1b72782848c..9a924ff27148 100644 --- a/drivers/gpu/drm/arm/malidp_crtc.c +++ b/drivers/gpu/drm/arm/malidp_crtc.c @@ -474,10 +474,7 @@ static void malidp_crtc_reset(struct drm_crtc *crtc) kfree(state); state = kzalloc(sizeof(*state), GFP_KERNEL); - if (state) { - crtc->state = &state->base; - crtc->state->crtc = crtc; - } + __drm_atomic_helper_crtc_reset(crtc, &state->base); } static void malidp_crtc_destroy_state(struct drm_crtc *crtc, diff --git a/drivers/gpu/drm/atmel-hlcdc/atmel_...
2020 May 06
1
[vhost:vhost 8/22] drivers/virtio/virtio_mem.c:1375:20: error: implicit declaration of function 'kzalloc'; did you mean 'vzalloc'?
...gt;> All error/warnings (new ones prefixed by >>): > >>>>> > >>>>> drivers/virtio/virtio_mem.c: In function 'virtio_mem_probe': > >>>>>>> drivers/virtio/virtio_mem.c:1375:20: error: implicit declaration of function 'kzalloc'; did you mean 'vzalloc'? [-Werror=implicit-function-declaration] > >>>>> vdev->priv = vm = kzalloc(sizeof(*vm), GFP_KERNEL); > >>>>> ^~~~~~~ > >>>>> vzalloc > >>>>...