lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <0ac86e50-b252-4d7d-b905-06fb928e7f70@nvidia.com>
Date: Thu, 6 Nov 2025 21:38:34 -0600
From: Dan Jurgens <danielj@...dia.com>
To: Simon Horman <horms@...nel.org>
Cc: netdev@...r.kernel.org, mst@...hat.com, jasowang@...hat.com,
 alex.williamson@...hat.com, pabeni@...hat.com,
 virtualization@...ts.linux.dev, parav@...dia.com, shshitrit@...dia.com,
 yohadt@...dia.com, xuanzhuo@...ux.alibaba.com, eperezma@...hat.com,
 shameerali.kolothum.thodi@...wei.com, jgg@...pe.ca, kevin.tian@...el.com,
 kuba@...nel.org, andrew+netdev@...n.ch, edumazet@...gle.com
Subject: Re: [PATCH net-next v7 05/12] virtio_net: Query and set flow filter
 caps

On 11/5/25 8:19 AM, Simon Horman wrote:
> On Mon, Nov 03, 2025 at 04:55:07PM -0600, Daniel Jurgens wrote:
> 
> ...
> 
>> diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c
> 
> ...
> 
>> +static int virtnet_ff_init(struct virtnet_ff *ff, struct virtio_device *vdev)
>> +{
>> +	size_t ff_mask_size = sizeof(struct virtio_net_ff_cap_mask_data) +
>> +			      sizeof(struct virtio_net_ff_selector) *

>> +
>> +	ff->ff_caps = kzalloc(sizeof(*ff->ff_caps), GFP_KERNEL);
>> +	if (!ff->ff_caps)
> 
> Hi Daniel,
> 
> I think that err needs to be set to a negative error value here...
> 
>> +		goto err_cap_list;
>> +
>> +	err = virtio_admin_cap_get(vdev,
>> +				   VIRTIO_NET_FF_RESOURCE_CAP,
>> +				   ff->ff_caps,
>> +				   sizeof(*ff->ff_caps));
>> +

>> +	ff->ff_actions = kzalloc(sizeof(*ff->ff_actions) +
>> +					VIRTIO_NET_FF_ACTION_MAX,
>> +					GFP_KERNEL);
>> +	if (!ff->ff_actions)
> 
> ... and here.
> 
> Flagged by Smatch.
> 
>> +		goto err_ff_mask;

Thanks Simon, missed that when I changed it to return a value. I'll spin
a v9.



Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ