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: <ZJ09N2TI4wHrA4rB@nanopsycho>
Date: Thu, 29 Jun 2023 10:13:43 +0200
From: Jiri Pirko <jiri@...nulli.us>
To: Arkadiusz Kubalewski <arkadiusz.kubalewski@...el.com>
Cc: kuba@...nel.org, vadfed@...a.com, jonathan.lemon@...il.com,
	pabeni@...hat.com, corbet@....net, davem@...emloft.net,
	edumazet@...gle.com, vadfed@...com, jesse.brandeburg@...el.com,
	anthony.l.nguyen@...el.com, saeedm@...dia.com, leon@...nel.org,
	richardcochran@...il.com, sj@...nel.org, javierm@...hat.com,
	ricardo.canuelo@...labora.com, mst@...hat.com, tzimmermann@...e.de,
	michal.michalik@...el.com, gregkh@...uxfoundation.org,
	jacek.lawrynowicz@...ux.intel.com, airlied@...hat.com,
	ogabbay@...nel.org, arnd@...db.de, nipun.gupta@....com,
	axboe@...nel.dk, linux@...y.sk, masahiroy@...nel.org,
	benjamin.tissoires@...hat.com, geert+renesas@...der.be,
	milena.olech@...el.com, kuniyu@...zon.com, liuhangbin@...il.com,
	hkallweit1@...il.com, andy.ren@...cruise.com, razor@...ckwall.org,
	idosch@...dia.com, lucien.xin@...il.com, nicolas.dichtel@...nd.com,
	phil@....cc, claudiajkang@...il.com, linux-doc@...r.kernel.org,
	linux-kernel@...r.kernel.org, netdev@...r.kernel.org,
	intel-wired-lan@...ts.osuosl.org, linux-rdma@...r.kernel.org,
	linux-arm-kernel@...ts.infradead.org, poros@...hat.com,
	mschmidt@...hat.com, linux-clk@...r.kernel.org,
	vadim.fedorenko@...ux.dev
Subject: Re: [RFC PATCH v9 03/10] dpll: core: Add DPLL framework base
 functions

Fri, Jun 23, 2023 at 02:38:13PM CEST, arkadiusz.kubalewski@...el.com wrote:
>From: Vadim Fedorenko <vadim.fedorenko@...ux.dev>
>

One thing I forgot to point out the last time:

[...]	
	
>+int
>+dpll_pin_register(struct dpll_device *dpll, struct dpll_pin *pin,
>+		  const struct dpll_pin_ops *ops, void *priv)
>+{
>+	int ret;
>+
>+	if (WARN_ON(!ops) ||
>+	    WARN_ON(!ops->state_on_dpll_get) ||
>+	    WARN_ON(!ops->direction_get))

Please add check that you don't register to dpll instance which is
unregistered. Similar check needs to be added to pin_on_pin register.

Also, make sure you don't unregister dpll device/pin which has child
pins registered under it.


>+		return -EINVAL;
>+
>+	mutex_lock(&dpll_lock);
>+	if (WARN_ON(!(dpll->module == pin->module &&
>+		      dpll->clock_id == pin->clock_id)))
>+		ret = -EINVAL;
>+	else
>+		ret = __dpll_pin_register(dpll, pin, ops, priv);
>+	mutex_unlock(&dpll_lock);
>+
>+	return ret;
>+}

[...]

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ