The parenthesis are in the wrong place so the original code is
equivalent to:
if (!xen_feature(XENFEAT_writable_descriptor_tables)) { ...
Which obviously was not intended.
Signed-off-by: Dan Carpenter
diff --git a/drivers/xen/privcmd.c b/drivers/xen/privcmd.c
index b9d0898..6011f3b
We recently added locking in fill_balloon() but there was one error path
which was missed.
Signed-off-by: Dan Carpenter
---
Only needed in linux-next.
diff --git a/drivers/virtio/virtio_balloon.c b/drivers/virtio/virtio_balloon.c
index f70151b..1c50e98 100644
--- a/drivers/virtio
f you have poisoning
enabled it will have an easy to debug crash.
811 }
regards,
dan carpenter
___
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization
ret = gnttab_unmap_refs(unmap, NULL, pages,
240 segs_to_unmap);
regards,
dan carpenter
___
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization
On Tue, Dec 04, 2012 at 12:11:48AM +0300, Dan Carpenter wrote:
> Hello Roger Pau Monne,
>
> The patch 4d4f270f1880: "xen-blkback: move free persistent grants
> code" from Nov 16, 2012, leads to the following warning:
> drivers/block/xen-blkback/blkback.c:238 free_persis
pr_warn(PREFIX "Cannot add acpi bus\n");
194 return -EINVAL;
195 }
196
197 end:
198 *mem_device = acpi_driver_data(device);
^^
Dereference.
199 if (!(*mem_d
The parenthesis are in the wrong place so the original code is
equivalent to:
if (!xen_feature(0x1)) { ...
Or:
if (!xen_feature(XENFEAT_writable_descriptor_tables)) { ...
Which obviously was not intended.
Signed-off-by: Dan Carpenter
---
I sent this last November but it was
debugfs_create_dir() returns ERR_PTR(-ENODEV) if debugfs is disabled.
Also my static checker doesn't like it when we print the error code, but
it's always just NULL.
Signed-off-by: Dan Carpenter
diff --git a/drivers/char/virtio_console.c b/drivers/char/virtio_console.c
index 1b456f
On Fri, Jul 19, 2013 at 12:28:41PM +0200, Arnd Bergmann wrote:
> On Friday 19 July 2013, Dan Carpenter wrote:
> > debugfs_create_dir() returns ERR_PTR(-ENODEV) if debugfs is disabled.
> > Also my static checker doesn't like it when we print the error code, but
>
eems intentional
> and correct to me.
Ah. Ok. You're right.
regards,
dan carpenter
___
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization
The PTR_ERR(NULL) here is not useful.
Signed-off-by: Dan Carpenter
---
v2: completely different
diff --git a/drivers/char/virtio_console.c b/drivers/char/virtio_console.c
index 1b456fe..4cf46d8 100644
--- a/drivers/char/virtio_console.c
+++ b/drivers/char/virtio_console.c
@@ -2215,10 +2215,8
On Mon, Jul 29, 2013 at 06:12:31AM -0700, Greg Kroah-Hartman wrote:
> On Mon, Jul 29, 2013 at 12:41:31PM +0530, Amit Shah wrote:
> > On (Mon) 22 Jul 2013 [23:41:00], Dan Carpenter wrote:
> > > The PTR_ERR(NULL) here is not useful.
> > >
> > > Signed-off-b
ext whether this code is safe.
180 vringh_kiov_advance(&vq->in_iov, to_push - pushed);
181
182 /* Last byte is the status */
183 bytes = vringh_iov_push_iotlb(&vq->vring, &vq->in_iov, &status,
1);
184 if (
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(&vq->in_iov) - 1;
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
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
; > 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
> >
>
e and build 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
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
pdated all 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
; 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
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
---
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 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
>
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
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_
; 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_confi
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
9 ("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..
ideally 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
://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
re:
> 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.linu
1847err = virtio_reset_vq(sq->vq);
1848if (err) {
1849netif_start_subqueue(vi->dev, qindex);
1850goto err;
1851 }
regards,
dan carpenter
___
Virtualiza
urn 0;
322 err:
323 ifcvf_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
d it's better if 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: &quo
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
/vdpa/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.
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 carpent
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
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/v
(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
433fc
h (x) {
> 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,
d
of a warning.
>
> 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
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
If devm_request_mem_region() fails this code currently returns success
but it should return -EBUSY.
Fixes: 6076a9711dc5 ("drm/virtio: implement blob resources: probe for host
visible region")
Signed-off-by: Dan Carpenter
---
drivers/gpu/drm/virtio/virtgpu_kms.c | 1 +
1 file
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);
17
e");
437 return -ENOMEM;
438 }
439
440 pci_set_master(pdev);
441 pci_set_drvdata(pdev, adapter);
442
regards,
dan carpenter
___
Virtualization mailing list
Virtualization@lists.linux-foundati
t; 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
in the new version.
What does this bug look like to the user? A minimum block size of 1
seems pretty crazy. Surely the minimum should be higher?
regards,
dan carpenter
___
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization
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
a 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
e ||
msg->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
ng very complicated 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 m
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,
>
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
cpu_relax();
548 }
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
_
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
d) {
1078SetPageDirty(page);
1079/* FIXME: remove after cleanups */
1080ClearPageReserved(page);
1081}
1082}
1083page_offline_end();
1084 }
regards,
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
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
--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
_config *config)
> > 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
es(node->ucast_rule);
1521 err_ucast:
1522 remove_steering_counters(ndev, node);
1523 out_free:
1524 kvfree(spec);
1525 return err;
1526 }
regards,
dan carpenter
___
Virtualization mailing list
Virtua
/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
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
troduce 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
>
> so the RHS here should have unsigned 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
() 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
esponded feels 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
wa
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:
> > >
to write that code... :/
>
> I find 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 c
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 that
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 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;
> >
> &
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
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
OR: 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,
t they
can'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
as to be true and this is a false positive but I don't know
the code well enough to be sure.
2673
2674 out:
2675 up_write(&ndev->reslock);
--> 2676 return err;
2677 }
regards,
dan carpenter
___
Virtua
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:
>
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
irtio: implement 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 3b17
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.
> >
> >
irtio: implement 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
et into
the vs_tpg[] array which has VHOST_SCSI_MAX_TARGET (256) elements so
anything higher than 255 then it is invalid. I have made that the limit
now.
In vhost_scsi_send_evt() we mask away values higher than 255, but now
that the limit has changed, we don't need the mask.
Signed-off-by: Dan
a bugfix
> 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
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:
net/core/net_failover.c
ne element 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/d
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/
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
alues are.
Anyway, it's simple enough to make the buffer larger and I changed it to
snprintf() as well.
Signed-off-by: Dan Carpenter
diff --git a/drivers/char/virtio_console.c b/drivers/char/virtio_console.c
index 50754d20..8283989 100644
--- a/drivers/char/virtio_console.c
+++ b/driver
My static checker complains that this sprintf() can overflow but really
it can't. Just silence the warning by using snprintf().
Signed-off-by: Dan Carpenter
---
v2: the overflow is not possible so just leave the buffer size alone and
silence the warning with snprintf().
diff --
On Fri, May 08, 2015 at 11:30:09AM +0200, walter harms wrote:
>
>
> Am 08.05.2015 11:16, schrieb Dan Carpenter:
> > My static checker complains that this sprintf() can overflow but really
> > it can't. Just silence the warning by using snprintf().
> >
space.
How are you calculating the %3?
The max for "id" is currently 31. To be honest, I'm not certain the max
for ->index. It's something in qemu but I'm not sure what. Who is
going to keep it updated?
The %3 is sort of meaningless. The lower levels of th
virtio_gpu_alloc_object() returns an error pointer, it never returns
NULL.
Fixes: dc5698e80cf7 ('Add virtio gpu driver.')
Signed-off-by: Dan Carpenter
diff --git a/drivers/gpu/drm/virtio/virtgpu_fb.c
b/drivers/gpu/drm/virtio/virtgpu_fb.c
index 25bf333..df198d9 100644
--- a/drive
The goto is correct, and we never reach the return statement so just
delete the dead code.
Signed-off-by: Dan Carpenter
diff --git a/drivers/gpu/drm/virtio/virtgpu_ttm.c
b/drivers/gpu/drm/virtio/virtgpu_ttm.c
index e0e74c6..b092d7b 100644
--- a/drivers/gpu/drm/virtio/virtgpu_ttm.c
+++ b
There is only one caller for vhost_kvzalloc() and it expects NULL on
allocation failure. Most people would probably expect that so let's
change ERR_PTR(-ENOMEM) to NULL.
Fixes: 4de7255f7d2b ('vhost: extend memory regions allocation to vmalloc')
Signed-off-by: Dan Carpenter
diff
On Wed, Jul 15, 2015 at 01:35:16PM +0200, walter harms wrote:
> Is this function needed at all ?
>
It tries to kmalloc() memory and if it can't then it tries to vmalloc()
it. There are a bunch of these functions. Eventually someone should
put one in a common header.
regards,
da
on and we
will delete this one.
regards,
dan carpenter
___
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization
Most ->get() functions seem to call BUG_ON() if offset + len is out of
range, but rproc_virtio_get() returns early without initializing ret.
Presumably it can't actually happen but it leads to a static checker
warning. Let's just initialize "ret".
Signed-off-by: Dan C
1 - 100 of 165 matches
Mail list logo