ucast:
1522 remove_steering_counters(ndev, node);
1523 out_free:
1524 kvfree(spec);
1525 return err;
1526 }
regards,
dan carpenter
___
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization
onfig)
> > if (config->config_size > PAGE_SIZE)
> > return false;
> >
> > + if (config->vq_num > 0x)
>
> What about using U16_MAX here?
Where is the ->vq_num stored in a u16? I looked for this but didn't
see it.
regards,
dan carpenter
___
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization
--info and reload for the changes to
propagate.
regards,
dan carpenter
___
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization
lement context init: add
virtio_gpu_fence_event")
Signed-off-by: Dan Carpenter
---
v2: Style change. Use BIT_ULL().
drivers/gpu/drm/virtio/virtgpu_ioctl.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/virtio/virtgpu_ioctl.c
b/drivers/gpu/drm/virtio/vi
On Thu, Sep 15, 2022 at 05:45:46PM -0700, Chia-I Wu wrote:
> On Thu, Sep 15, 2022 at 4:14 AM Dan Carpenter
> wrote:
> >
> > The ->ring_idx_mask variable is a u64 so static checkers, Smatch in
> > this case, complain if the BIT() is not also a u64.
> >
> >
lement context init: add
virtio_gpu_fence_event")
Signed-off-by: Dan Carpenter
---
drivers/gpu/drm/virtio/virtgpu_ioctl.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/virtio/virtgpu_ioctl.c
b/drivers/gpu/drm/virtio/virtgpu_ioctl.c
index 3b1701607aae..
he driver to store the config value.
>
> Signed-off-by: Maxime Coquelin
This sounds like it needs a Fixes tag?
regards,
dan carpenter
___
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundat
On Thu, Aug 11, 2022 at 07:23:44AM -0400, Michael S. Tsirkin wrote:
> On Thu, Aug 11, 2022 at 01:15:08PM +0300, Dan Carpenter wrote:
> > On Thu, Aug 11, 2022 at 04:27:32AM -0400, Michael S. Tsirkin wrote:
> > > On Wed, Aug 10, 2022 at 07:15:09PM +0200, Eugenio Pérez wrote:
>
is a false positive but I don't know
the code well enough to be sure.
2673
2674 out:
2675 up_write(>reslock);
--> 2676 return err;
2677 }
regards,
dan carpenter
___
Virtualization mailing list
Virtualization@lists.l
t make it work 100%. Maintainers massage and reformat the patches
too much before applying them.
regards,
dan carpenter
___
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization
: from is NULL but dereferenced.
drivers/android/binder.c:2920:29-33: ERROR: target_thread is NULL but
dereferenced.
drivers/android/binder.c:353:25-35: ERROR: node -> proc is NULL but
dereferenced.
drivers/android/binder.c:4888:16-20: ERROR: t is NULL but dereferenced.
regards,
dan
These lines were supposed to be indented.
Signed-off-by: Dan Carpenter
---
drivers/vdpa/mlx5/net/mlx5_vnet.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/vdpa/mlx5/net/mlx5_vnet.c
b/drivers/vdpa/mlx5/net/mlx5_vnet.c
index c964f4161d7f..83607b7488f1 100644
Return success if we were able to delete a vlan. The current code
always returns failure.
Fixes: baf2ad3f6a98 ("vdpa/mlx5: Add RX MAC VLAN filter support")
Signed-off-by: Dan Carpenter
---
>From review. (Not tested).
drivers/vdpa/mlx5/net/mlx5_vnet.c | 1 +
1 file changed
On Mon, May 30, 2022 at 05:27:25PM +0300, Dan Carpenter wrote:
> On Fri, May 27, 2022 at 10:36:55AM +0300, Dan Carpenter wrote:
> > static void match_pointer(struct expression *ret_value)
> > {
> > struct symbol *type;
> > char *name;
> >
> &
On Fri, May 27, 2022 at 10:36:55AM +0300, Dan Carpenter wrote:
> static void match_pointer(struct expression *ret_value)
> {
> struct symbol *type;
> char *name;
>
> type = cur_func_return_type();
> if (!type || sval_type
On Fri, May 27, 2022 at 08:50:16AM +0200, Eugenio Perez Martin wrote:
> On Thu, May 26, 2022 at 9:07 PM Dan Carpenter
> wrote:
> >
> > On Thu, May 26, 2022 at 07:00:06PM +0200, Eugenio Perez Martin wrote:
> > > > It feels like returning any literal th
Smatch interesting, especially when switching between projects
> frequently. Does it support changing the code like clang-format? To
> offload cognitive load to tools is usually good :).
No. Coccinelle does that really well though.
regards,
dan carpenter
___
On Thu, May 26, 2022 at 03:28:25PM +0100, Matthew Wilcox wrote:
> On Thu, May 26, 2022 at 11:48:32AM +0300, Dan Carpenter wrote:
> > On Thu, May 26, 2022 at 02:16:34AM +0100, Matthew Wilcox wrote:
> > > Bizarre this started showing up now. The recent patch was:
> > >
like because
they're likely the person who cares the most. ;)
I don't think there are any static analysis tools which will complain
about this. Smatch will complain if you return a negative literal.
It feels like returning any literal that isn't 1 or 0 should trigger a
warning... I've written that an
der() and folio_order() are 0-255. I guess because of
the "unsigned char compound_order;" in the struct page.
regards,
dan carpenter
___
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization
nsigned long type. Being able to generate
> the cpp output would be helpful. That requires the .config.
The heuristic is that "inode->i_blocks" is a u64 but this .config must
be for a 32bit CPU.
I'm just going to turn off all these warnings until I can figure out a
better heuristic.
regards,
dan carpenter
___
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization
introduce uAPI to get the number of address
spaces")
Signed-off-by: Dan Carpenter
---
drivers/vhost/vdpa.c | 8 +---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/drivers/vhost/vdpa.c b/drivers/vhost/vdpa.c
index 3e86080041fc..935a1d0ddb97 100644
--- a/drivers/vhost/vdpa.c
The > comparison needs to be >= to prevent an out of bounds access
of the vdpasim->iommu[] array. The vdpasim->iommu[] is allocated in
vdpasim_create() and it has vdpasim->dev_attr.nas elements.
Fixes: 87e5afeac247 ("vdpasim: control virtqueue support")
Signed-off-by: Da
/20220424/202204242344.jepumdzp-...@intel.com/config)
compiler: gcc-11 (Debian 11.2.0-20) 11.2.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot
Reported-by: Dan Carpenter
smatch warnings:
drivers/crypto/virtio/virtio_crypto_akcipher_algs.c:165
to apply commit 3ed21c1451a1 ("vdpa: check that offsets are
within bounds").
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=3ed21c1451a14d139e1ceb18f2fa70865ce3195a
I don't know if this affects anyone, but it seemed worth mentioning.
regards,
dan carpenter
O
/ifcvf/ifcvf_main.c:291:6: warning: ‘config_vector’ may be used
uninitialized in this function [-Wmaybe-uninitialized]
int config_vector, ret;
^
regards,
dan carpenter
___
Virtualization mailing list
Virtualization@lists.linux
On Tue, Mar 15, 2022 at 10:27:35AM +0800, Zhu, Lingshan wrote:
>
>
> On 3/14/2022 6:37 PM, Dan Carpenter wrote:
> > On Mon, Mar 14, 2022 at 10:22:03AM +0800, Zhu, Lingshan wrote:
> > > Hello Dan,
> > >
> > > Thanks for your suggestions and this auto-tes
we can catch them earlier instead of
relying on the kbuild-bot.
regards,
dan carpenter
>
> Thanks for your efforts!
> Zhu Lingshan
>
> On 3/11/2022 5:00 PM, Dan Carpenter wrote:
> > Hello Zhu Lingshan,
> >
> > The patch 79333575b8bd: "vDPA/ifcvf: implement s
cvf_free_irq(adapter);
324
325 return -EFAULT;
326 }
regards,
dan carpenter
___
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization
847err = virtio_reset_vq(sq->vq);
1848if (err) {
1849netif_start_subqueue(vi->dev, qindex);
1850goto err;
1851 }
regards,
dan carpenter
___
Virtualization
gt; https://lore.kernel.org/lkml/20220221072852.31820-1-m...@anirudhrb.com/
I wasted so much time trying to figure out what this patch fixes. :P
(It doesn't fix anything).
regards,
dan carpenter
___
Virtualization mailing list
Virtualization@lists.linux-foundati
://download.01.org/0day-ci/archive/20220222/202202220707.am3rkucp-...@intel.com/config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot
Reported-by: Dan Carpenter
smatch warnings:
drivers/vhost/vsock.c:655
deally if this could be fixed in a central way, but if not
then hopefully I've added the relevant lists to the CC.
regards,
dan carpenter
___
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization
6c59 ("vduse: Introduce VDUSE - vDPA Device in Userspace")
Signed-off-by: Dan Carpenter
---
drivers/vdpa/vdpa_user/vduse_dev.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/vdpa/vdpa_user/vduse_dev.c
b/drivers/vdpa/vdpa_user/vduse_dev.c
index c9204c62f339..
h positive u32 value and basically any "c->len" is
accepted.
Fixes: 4c8cf31885f6 ("vhost: introduce vDPA-based backend")
Reported-by: Xie Yongji
Signed-off-by: Dan Carpenter
---
v4: split into a separate patch
drivers/vhost/vdpa.c | 2 +-
1 file changed, 1 insertion
; subtraction
results in a very high u32 value. The out of bounds offset can result
in memory corruption.
Fixes: c8a6153b6c59 ("vduse: Introduce VDUSE - vDPA Device in Userspace")
Signed-off-by: Dan Carpenter
---
v2: fix reversed if statement
v3: fix vhost_vdpa_c
roduce VDUSE - vDPA Device in Userspace")
Fixes: 4c8cf31885f6 ("vhost: introduce vDPA-based backend")
Signed-off-by: Dan Carpenter
---
v2: the first version had a reversed if statement
v3: fix vhost_vdpa_config_validate() as pointed out by Yongji Xie.
drivers/vdpa/vdpa_user/vduse_
On Tue, Dec 07, 2021 at 02:21:46PM +0300, Dan Carpenter wrote:
> The "config.offset" comes from the user. There needs to a check to
> prevent it being out of bounds. The "config.offset" and
> "dev->config_size" variables are both type u32. So if t
On Tue, Dec 07, 2021 at 07:19:35PM +0800, Yongji Xie wrote:
> On Tue, Dec 7, 2021 at 6:46 PM Dan Carpenter wrote:
> >
> > The "config.offset" comes from the user. There needs to a check to
> > prevent it being out of bounds. The "config.offset" and
>
; subtraction
results in a very high u32 value.
Fixes: c8a6153b6c59 ("vduse: Introduce VDUSE - vDPA Device in Userspace")
Signed-off-by: Dan Carpenter
---
v2: version 1 had a reversed if statement
drivers/vdpa/vdpa_user/vduse_dev.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletio
On Tue, Dec 07, 2021 at 01:46:14PM +0300, Dan Carpenter wrote:
> The "config.offset" comes from the user. There needs to a check to
> prevent it being out of bounds. The "config.offset" and
> "dev->config_size" variables are both type u32. So if t
; subtraction
results in a very high u32 value.
Fixes: c8a6153b6c59 ("vduse: Introduce VDUSE - vDPA Device in Userspace")
Signed-off-by: Dan Carpenter
---
drivers/vdpa/vdpa_user/vduse_dev.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/vdpa/vdpa_user
the drivers. But somehow the vc4 chunk from your
patch was dropped. It was *NOT* dropped by Stephen Rothwell. It got
dropped earlier. I am including the `git format-patch -1 ` output
from the commit.
regards,
dan carpenter
>From 4ff22f487f8c26b99cbe1678344595734c001a39 Mon Sep 17 00:00:00 2
On Mon, Dec 06, 2021 at 12:16:24PM +0100, Thomas Zimmermann wrote:
> Hi
>
> Am 06.12.21 um 11:42 schrieb Dan Carpenter:
> > On Tue, Nov 30, 2021 at 10:52:55AM +0100, Thomas Zimmermann wrote:
> > > GEM helper libraries use struct drm_driver.gem_create_object to let
&g
d but it will break
at runtime.
For now, it's only vc4_create_object() which is broken.
regards,
dan carpenter
___
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization
; > assignment.
> > >
> > > Fixes: 33b347503f01 ("vdpa: Define vdpa mgmt device, ops and a netlink
> > > interface")
> > > Reported-by: kernel test robot
> > > Reported-by: Dan Carpenter
> > > Signed-off-by: Parav Pandit
> >
>
The drm_gem_shmem_get_sg_table() function never returns NULL. It returns
error pointers on error.
Fixes: c66df701e783 ("drm/virtio: switch from ttm to gem shmem helpers")
Signed-off-by: Dan Carpenter
---
v2: I originally sent this patch on 19 Jun 2020 but it was somehow
not appl
On Wed, Sep 29, 2021 at 02:07:12PM +0200, Stefano Garzarella wrote:
> On Wed, Sep 29, 2021 at 02:46:52PM +0300, Dan Carpenter wrote:
> > On Wed, Sep 29, 2021 at 02:37:42PM +0300, Dan Carpenter wrote:
> > > 89 /* The last byte is the status and we checked if the l
On Wed, Sep 29, 2021 at 02:37:42PM +0300, Dan Carpenter wrote:
> 89 /* The last byte is the status and we checked if the last iov
> has
> 90 * enough room for it.
> 91 */
> 92 to_push = vringh_kiov_length(>in_iov) - 1;
>
185 return false;
186
187 pushed += bytes;
188
189 /* Make sure data is wrote before advancing index */
190 smp_wmb();
191
192 vringh_complete_iotlb(>vring, vq->head, pushed);
193
194 return true;
195 }
regards,
dan carpenter
___
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization
The concern here is that "ret" can be uninitialized if we hit the
"goto next" condition on every iteration through the loop.
Fixes: 41ba1b5f9d4b ("vdpa: Support transferring virtual addressing during DMA
mapping")
Signed-off-by: Dan Carpenter
---
drivers/vhost/vd
This should return -ENOMEM if alloc_workqueue() fails. Currently it
returns success.
Fixes: b66219796563 ("vduse: Introduce VDUSE - vDPA Device in Userspace")
Signed-off-by: Dan Carpenter
---
drivers/vdpa/vdpa_user/vduse_dev.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletio
d) {
1078SetPageDirty(page);
1079/* FIXME: remove after cleanups */
1080ClearPageReserved(page);
1081}
1082}
1083page_offline_end();
1084 }
regards,
On Wed, Aug 11, 2021 at 08:51:22PM +0800, Jason Wang wrote:
> Hi Dan:
>
> On Wed, Aug 11, 2021 at 8:14 PM Dan Carpenter
> wrote:
> >
> > Hello Jason Wang,
> >
> > The patch 030881372460: "vhost_net: basic polling support" from Mar
> > 4, 20
549
550 preempt_enable();
551
552 if (poll_rx || sock_has_rx_data(sock))
553 vhost_net_busy_poll_try_queue(net, vq);
regards,
dan carpenter
___
Virtualization mailing list
Virtualization@lists.linux-foundati
On Wed, Jul 14, 2021 at 05:41:54PM +0800, Jason Wang wrote:
>
> 在 2021/7/14 下午4:05, Dan Carpenter 写道:
> > On Wed, Jul 14, 2021 at 10:14:32AM +0800, Jason Wang wrote:
> > > 在 2021/7/13 下午7:31, Dan Carpenter 写道:
> > > > On Tue, Jul 13, 2021 at 0
On Wed, Jul 14, 2021 at 10:14:32AM +0800, Jason Wang wrote:
>
> 在 2021/7/13 下午7:31, Dan Carpenter 写道:
> > On Tue, Jul 13, 2021 at 04:46:52PM +0800, Xie Yongji wrote:
> > > @@ -613,37 +618,28 @@ static void vhost_vdpa_unmap(struct vhost_vdpa *v,
>
mplicated but
I'm not sure what. It calls container_of() and that looks buggy until
you spot the BUILD_BUG_ON_ZERO() compile time assert which ensures that
the container_of() is a no-op.
Only one of the callers checks for error pointers correctly so maybe
it's too complicated or maybe there sho
g->iova + msg->size - 1 > v->range.last)
But writing integer overflow check correctly is notoriously difficult.
Do you think you could send a fix for that which is separate from the
patcheset? We'd want to backport it to stable.
regards,
dan carpenter
___
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization
bugfix? Will it have any effect on runtime at all?
To me, hearing your thoughts on this is valuable even if you have to
guess. "I noticed this mistake during review and I don't think it will
affect runtime."
regards,
dan carpenter
___
Virtualizat
Return -ENOMEM if vp_modern_map_vq_notify() fails. Currently it
returns success.
Fixes: 11d8ffed00b2 ("vp_vdpa: switch to use vp_modern_map_vq_notify()")
Signed-off-by: Dan Carpenter
---
drivers/vdpa/virtio_pci/vp_vdpa.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/dr
ct virtio_blk_config, blk_size,
> >_size);
> > - if (!err)
> > + if (!err && blk_size > 0 && blk_size <= max_size)
>
> The check here is incorrect. I will use PAGE_SIZE as the maximum
> boundary in the new ve
binder_debug(BINDER_DEBUG_TRANSACTION,
> "failed fd fixup txn %d fd %d\n",
regards,
dan carpenter
___
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization
turn -ENOMEM;
438 }
439
440 pci_set_master(pdev);
441 pci_set_drvdata(pdev, adapter);
442
regards,
dan carpenter
___
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfo
indented too far
169 }
170 vp_modern_config_vector(mdev, queues);
171 vp_vdpa->config_irq = irq;
172
173 return 0;
174 err:
175 vp_vdpa_free_irq(vp_vdpa);
176
The copy_to_user() function returns the number of bytes remaining to be
copied but this should return -EFAULT to the user.
Fixes: 1b48dc03e575 ("vhost: vdpa: report iova range")
Signed-off-by: Dan Carpenter
---
drivers/vhost/vdpa.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletio
ing.
>
> FWIW, this series has found at least one bug so far:
> https://lore.kernel.org/lkml/CAFCwf11izHF=g1mGry1fE5kvFFFrxzhPSM6qKAO8gxSp=kr...@mail.gmail.com/
This is a fallthrough to a return and not to a break. That should
trigger a warning. The fallthrough to a break should not generate a
warning.
The bug we're trying to fix is "missing break statement" but if the
result of the bug is "we hit a break statement" then now we're just
talking about style. GCC should limit itself to warning about
potentially buggy code.
regards,
dan carpenter
___
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization
t; case 0:
> ++x;
> default:
> ;
> }
Don't warn for this.
If adding a break statement changes the flow of the code then warn about
potentially missing break statements, but if it doesn't change anything
then don't warn about it.
regards,
dan carpenter
(Debian 9.3.0-15) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot
Reported-by: Dan Carpenter
smatch warnings:
drivers/vhost/vsock.c:648 vhost_vsock_dev_open() error: uninitialized symbol
'ret'.
vim +/ret +648 drivers/vhost/vsock.c
433fc58e6bf2c8b
This is freed both here and in the caller (virtio_gpu_vram_map()) so
it's a double free. The correct place is only in the caller.
Fixes: 16845c5d5409 ("drm/virtio: implement blob resources: implement vram
object")
Signed-off-by: Dan Carpenter
---
drivers/gpu/drm/virtio/virtgp
The copy_to/from_user() functions return the number of bytes which we
weren't able to copy but the ioctl should return -EFAULT if they fail.
Fixes: a127c5bbb6a8 ("vhost-vdpa: fix backend feature ioctls")
Signed-off-by: Dan Carpenter
---
drivers/vhost/vdpa.c | 10 +-
1 file
9.3.0-15) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot
Reported-by: Dan Carpenter
New smatch warnings:
drivers/vhost/vdpa.c:844 vhost_vdpa_open() error: uninitialized symbol 'r'.
Old smatch warnings:
drivers/vhost/vdpa.c:436
) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot
Reported-by: Dan Carpenter
smatch warnings:
drivers/vhost/scsi.c:606 vhost_scsi_get_cmd() error: uninitialized symbol 'cpu'.
#
https://github.com/0day-ci/linux/commit
On Mon, Sep 14, 2020 at 06:24:55PM +0300, Andy Shevchenko wrote:
> On Mon, Sep 14, 2020 at 05:48:07PM +0300, Dan Carpenter wrote:
> > Hi Jie,
> >
> > url:
> > https://github.com/0day-ci/linux/commits/Jie-Deng/i2c-virtio-add-a-virtio-i2c-frontend-driver/20200911-115
(GCC) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot
Reported-by: Dan Carpenter
smatch warnings:
drivers/i2c/busses/i2c-virtio.c:160 virtio_i2c_xfer() error: we previously
assumed 'vmsg' could be null (see line 137)
#
https://github.com
: hppa-linux-gcc (GCC) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot
Reported-by: Dan Carpenter
New smatch warnings:
drivers/vhost/vdpa.c:356 vhost_vdpa_get_backend_features() warn: maybe return
-EFAULT instead of the bytes remaining?
#
https
On Sun, Aug 09, 2020 at 06:34:04AM +, Eli Cohen wrote:
> Acked-by: Eli Cohen
>
> BTW, vdpa_sim has the same bug.
>
I sent a patch for that on April 6.
[PATCH 2/2] vdpa: Fix pointer math bug in vdpasim_get_config()
Jason acked the patch but it wasn't applied.
regards,
d
There is a pointer math bug here so if "offset" is non-zero then this
will copy memory from beyond the end of the array.
Fixes: 1a86b377aa21 ("vdpa/mlx5: Add VDPA driver for supported mlx5 devices")
Signed-off-by: Dan Carpenter
---
drivers/vdpa/mlx5/net/mlx5_vnet.c | 2 +
This should return -ENOMEM if the allocation fails. Currently it
either returns success or an uninitialized value.
Fixes: 94abbccdf291 ("vdpa/mlx5: Add shared memory registration code")
Signed-off-by: Dan Carpenter
---
drivers/vdpa/mlx5/core/mr.c | 4 +++-
1 file changed, 3 insert
The drm_gem_shmem_get_pages_sgt() function returns error pointers on
error, it never returns NULL.
Fixes: d323bb44e4d2 ("drm/virtio: Call the right shmem helpers")
Signed-off-by: Dan Carpenter
---
drivers/gpu/drm/virtio/virtgpu_object.c | 4 ++--
1 file changed, 2 insertions(+), 2
a "#define kzfree kfree_sensitive" so that things continue to
compile and we can remove it in the next kernel release?
regards,
dan carpenter
___
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoun
is a stable material. Is there any
> known instance where the memset was optimized out from kzfree?
I told him to add the stable. Otherwise it will just get reported to
me again. It's a just safer to backport it before we forget.
regards,
dan carpenter
_
le kernels.
> kfree(mem);
> }
> -EXPORT_SYMBOL(kzfree);
> +EXPORT_SYMBOL(kfree_sensitive);
>
> /**
> * ksize - get the actual amount of memory allocated for a given object
regards,
dan carpenter
___
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization
The "vma->vm_pgoff" variable is an unsigned long so if it's larger than
INT_MAX then "index" can be negative leading to an underflow. Fix this
by changing the type of "index" to "unsigned long".
Fixes: ddd89d0a059d ("vhost_vdpa: support doorbell
Smatch complains that "rc" can be uninitialized if we hit the "break;"
statement on the first iteration through the loop. I suspect that this
can't happen in real life, but returning a zero literal is cleaner and
silence the static checker warning.
Signed-off-by: Dan Car
(Debian 9.3.0-13) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kbuild test robot
Reported-by: Dan Carpenter
smatch warnings:
drivers/vhost/vdpa.c:348 vhost_vdpa_set_vring_kick() error: uninitialized
symbol 'r'.
#
https://github.com/0day-ci/linux/commit
If "offset" is non-zero then we end up copying from beyond the end of
the config because of pointer math. We can fix this by casting the
struct to a u8 pointer.
Fixes: 2c53d0f64c06 ("vdpasim: vDPA device simulator")
Signed-off-by: Dan Carpenter
---
Is it really worth le
The "read" and "write" variables need to be signed for the error
handling to work.
Fixes: 2c53d0f64c06 ("vdpasim: vDPA device simulator")
Signed-off-by: Dan Carpenter
---
drivers/vdpa/vdpa_sim/vdpa_sim.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff
Hi Jason,
url:
https://github.com/0day-ci/linux/commits/Jason-Wang/vDPA-support/20200117-170243
base: https://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost.git linux-next
If you fix the issue, kindly add following tag
Reported-by: kbuild test robot
Reported-by: Dan Carpenter
smatch
ret = 0;
131
regards,
dan carpenter
___
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization
after all.
>
It doesn't hurt to put things in linux-next for a week and then 5.0 and
-stable. Not a lot of testing happens on linux-next, but some does.
regards,
dan carpenter
___
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization
We accidentally left out this error return so it leads to some use after
free bugs later on.
Fixes: 0a0be13b8fe2 ("vhost_net: batch submitting XDP buffers to underlayer
sockets")
Signed-off-by: Dan Carpenter
diff --git a/drivers/vhost/net.c b/drivers/vhost/net.c
index dd
The first argument to WARN_ONCE() is a condition.
Fixes: 5800dc5c19f3 ("x86/paravirt: Fix spectre-v2 mitigations for paravirt
guests")
Signed-off-by: Dan Carpenter
diff --git a/arch/x86/kernel/paravirt.c b/arch/x86/kernel/paravirt.c
index bbf006fe78d7..e4d4df37922a 100644
--- a/arch/
ement beyond the end of the
vgdev->capsets[] array.
Fixes: 62fb7a5e1096 ("virtio-gpu: add 3d/virgl support")
Signed-off-by: Dan Carpenter
diff --git a/drivers/gpu/drm/virtio/virtgpu_vq.c
b/drivers/gpu/drm/virtio/virtgpu_vq.c
index 020070d483d3..4735bd1c7321 100644
--- a/drivers/gpu/drm/vi
Hi Sridhar,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on net-next/master]
url:
https://github.com/0day-ci/linux/commits/Sridhar-Samudrala/Enable-virtio_net-to-act-as-a-standby-for-a-passthru-device/20180427-183842
smatch warnings:
On Tue, Sep 12, 2017 at 03:02:04PM +0100, Emil Velikov wrote:
> That said, I'm not sure how useful the information is - perhaps it's
> better to drop it all together?
Or a WARN_ONCE().
regards,
dan carpenter
___
Virtualization mailin
ion.
See slab_out_of_memory().
regards,
dan carpenter
___
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization
There is an || vs && typo so the assert can never be triggered.
Signed-off-by: Dan Carpenter <dan.carpen...@oracle.com>
diff --git a/tools/virtio/ringtest/main.c b/tools/virtio/ringtest/main.c
index 022ae95a06bd..453ca3c21193 100644
--- a/tools/virtio/ringtest/main.c
+++ b/tools/v
We are printing a decimal value for truesize so we shouldn't use an "0x"
prefix.
Signed-off-by: Dan Carpenter <dan.carpen...@oracle.com>
diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c
index 0e6e3acf6ff1..2b5e8069d9e5 100644
--- a/drivers/net/virtio_net.c
+
(buf = virtqueue_get_buf(rq->vq, )) != NULL)
{
1048 bytes += receive_buf(vi, rq, buf, len, NULL);
1049 received++;
1050 }
1051 }
1052
regards,
dan carpenter
__
1 - 100 of 162 matches
Mail list logo