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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ea6b8065-76e4-45c8-a51f-858abab4d639@redhat.com>
Date: Tue, 27 May 2025 11:28:50 +0200
From: Paolo Abeni <pabeni@...hat.com>
To: Haiyang Zhang <haiyangz@...rosoft.com>, linux-hyperv@...r.kernel.org,
 netdev@...r.kernel.org
Cc: decui@...rosoft.com, stephen@...workplumber.org, kys@...rosoft.com,
 paulros@...rosoft.com, olaf@...fle.de, vkuznets@...hat.com,
 davem@...emloft.net, wei.liu@...nel.org, edumazet@...gle.com,
 kuba@...nel.org, leon@...nel.org, longli@...rosoft.com,
 ssengar@...ux.microsoft.com, linux-rdma@...r.kernel.org,
 daniel@...earbox.net, john.fastabend@...il.com, bpf@...r.kernel.org,
 ast@...nel.org, hawk@...nel.org, tglx@...utronix.de,
 shradhagupta@...ux.microsoft.com, andrew+netdev@...n.ch,
 kotaranov@...rosoft.com, horms@...nel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH net-next,v5] net: mana: Add handler for hardware servicing
 events

On 5/22/25 2:22 AM, Haiyang Zhang wrote:
> @@ -400,6 +448,33 @@ static void mana_gd_process_eqe(struct gdma_queue *eq)
>  		eq->eq.callback(eq->eq.context, eq, &event);
>  		break;
>  
> +	case GDMA_EQE_HWC_FPGA_RECONFIG:
> +		dev_info(gc->dev, "Recv MANA service type:%d\n", type);
> +
> +		if (gc->in_service) {
> +			dev_info(gc->dev, "Already in service\n");
> +			break;
> +		}
> +
> +		if (!try_module_get(THIS_MODULE)) {
> +			dev_info(gc->dev, "Module is unloading\n");
> +			break;
> +		}
> +
> +		mns_wk = kzalloc(sizeof(*mns_wk), GFP_ATOMIC);
> +		if (!mns_wk) {
> +			module_put(THIS_MODULE);
> +			break;
> +		}
> +
> +		dev_info(gc->dev, "Start MANA service type:%d\n", type);
> +		gc->in_service = true;
> +		mns_wk->pdev = to_pci_dev(gc->dev);
> +		pci_dev_get(mns_wk->pdev);

Acquiring both the device and the module reference is confusing and
likely unnecessary. pci_dev_get() should suffice.

/P


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ