Patch "dpaa_eth: fix the access method for the dpaa_napi_portal" has been added to the 5.11-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    dpaa_eth: fix the access method for the dpaa_napi_portal

to the 5.11-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     dpaa_eth-fix-the-access-method-for-the-dpaa_napi_por.patch
and it can be found in the queue-5.11 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit f40ca77d1893bbf7e9d958f393e524e7738393bf
Author: Camelia Groza <camelia.groza@xxxxxxx>
Date:   Thu Feb 18 20:21:06 2021 +0200

    dpaa_eth: fix the access method for the dpaa_napi_portal
    
    [ Upstream commit 433dfc99aa3e0acbf655b961d98eb690162f758f ]
    
    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@xxxxxxxxxxxxxx>
    Signed-off-by: Camelia Groza <camelia.groza@xxxxxxx>
    Acked-by: Madalin Bucur <madalin.bucur@xxxxxxxxxxx>
    Acked-by: Jesper Dangaard Brouer <brouer@xxxxxxxxxx>
    Link: https://lore.kernel.org/r/20210218182106.22613-1-camelia.groza@xxxxxxx
    Signed-off-by: Jakub Kicinski <kuba@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/net/ethernet/freescale/dpaa/dpaa_eth.c b/drivers/net/ethernet/freescale/dpaa/dpaa_eth.c
index 6faa20bed4885..9905caeaeee3e 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;



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux