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: <AM6PR04MB3976150FC8E94B63F3907467EC849@AM6PR04MB3976.eurprd04.prod.outlook.com>
Date:   Fri, 19 Feb 2021 10:14:45 +0000
From:   "Madalin Bucur (OSS)" <madalin.bucur@....nxp.com>
To:     Camelia Alexandra Groza <camelia.groza@....com>,
        "kuba@...nel.org" <kuba@...nel.org>,
        "davem@...emloft.net" <davem@...emloft.net>,
        "s.hauer@...gutronix.de" <s.hauer@...gutronix.de>
CC:     "brouer@...hat.com" <brouer@...hat.com>,
        "Madalin Bucur (OSS)" <madalin.bucur@....nxp.com>,
        "netdev@...r.kernel.org" <netdev@...r.kernel.org>
Subject: RE: [PATCH net] dpaa_eth: fix the access method for the
 dpaa_napi_portal

> -----Original Message-----
> From: Camelia Alexandra Groza <camelia.groza@....com>
> Sent: 18 February 2021 20:21
> To: kuba@...nel.org; davem@...emloft.net; s.hauer@...gutronix.de
> Cc: brouer@...hat.com; Madalin Bucur (OSS) <madalin.bucur@....nxp.com>;
> netdev@...r.kernel.org; Camelia Alexandra Groza <camelia.groza@....com>
> Subject: [PATCH net] dpaa_eth: fix the access method for the
> dpaa_napi_portal
> 
> The current use of container_of is flawed and unnecessary. Obtain
> the dpaa_napi_portal reference from the private percpu data instead.
> 
> Fixes: a1e031ffb422 ("dpaa_eth: add XDP_REDIRECT support")
> Reported-by: Sascha Hauer <s.hauer@...gutronix.de>
> Signed-off-by: Camelia Groza <camelia.groza@....com>
> ---
>  drivers/net/ethernet/freescale/dpaa/dpaa_eth.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/net/ethernet/freescale/dpaa/dpaa_eth.c
> b/drivers/net/ethernet/freescale/dpaa/dpaa_eth.c
> index 6faa20bed488..9905caeaeee3 100644
> --- a/drivers/net/ethernet/freescale/dpaa/dpaa_eth.c
> +++ b/drivers/net/ethernet/freescale/dpaa/dpaa_eth.c
> @@ -2672,7 +2672,6 @@ static enum qman_cb_dqrr_result
> rx_default_dqrr(struct qman_portal *portal,
>  	u32 hash;
>  	u64 ns;
> 
> -	np = container_of(&portal, struct dpaa_napi_portal, p);
>  	dpaa_fq = container_of(fq, struct dpaa_fq, fq_base);
>  	fd_status = be32_to_cpu(fd->status);
>  	fd_format = qm_fd_get_format(fd);
> @@ -2687,6 +2686,7 @@ static enum qman_cb_dqrr_result
> rx_default_dqrr(struct qman_portal *portal,
> 
>  	percpu_priv = this_cpu_ptr(priv->percpu_priv);
>  	percpu_stats = &percpu_priv->stats;
> +	np = &percpu_priv->np;
> 
>  	if (unlikely(dpaa_eth_napi_schedule(percpu_priv, portal,
> sched_napi)))
>  		return qman_cb_dqrr_stop;
> --
> 2.17.1

Acked-by: Madalin Bucur <madalin.bucur@....nxp.com>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ