[PATCH net v2] net: ethernet: mtk_eth_soc: fix memory leak in LRO rings release
kernel test robot
lkp at intel.com
Tue Aug 13 12:05:11 PDT 2024
Hi Elad,
kernel test robot noticed the following build errors:
[auto build test ERROR on net/main]
url: https://github.com/intel-lab-lkp/linux/commits/Elad-Yifee/net-ethernet-mtk_eth_soc-fix-memory-leak-in-LRO-rings-release/20240813-015755
base: net/main
patch link: https://lore.kernel.org/r/20240812152126.14598-1-eladwf%40gmail.com
patch subject: [PATCH net v2] net: ethernet: mtk_eth_soc: fix memory leak in LRO rings release
config: arm-randconfig-003-20240813 (https://download.01.org/0day-ci/archive/20240814/202408140256.AkgMaR7u-lkp@intel.com/config)
compiler: arm-linux-gnueabi-gcc (GCC) 14.1.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240814/202408140256.AkgMaR7u-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp at intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202408140256.AkgMaR7u-lkp@intel.com/
All error/warnings (new ones prefixed by >>):
drivers/net/ethernet/mediatek/mtk_eth_soc.c: In function 'mtk_rx_put_buff':
>> drivers/net/ethernet/mediatek/mtk_eth_soc.c:1768:28: error: expected expression before 'unsigned'
1768 | free_pages(unsigned long)data, get_order(mtk_max_frag_size(ring->frag_size)));
| ^~~~~~~~
>> drivers/net/ethernet/mediatek/mtk_eth_soc.c:1768:17: error: too few arguments to function 'free_pages'
1768 | free_pages(unsigned long)data, get_order(mtk_max_frag_size(ring->frag_size)));
| ^~~~~~~~~~
In file included from include/linux/xarray.h:16,
from include/linux/radix-tree.h:21,
from include/linux/idr.h:15,
from include/linux/kernfs.h:12,
from include/linux/sysfs.h:16,
from include/linux/kobject.h:20,
from include/linux/of.h:18,
from drivers/net/ethernet/mediatek/mtk_eth_soc.c:9:
include/linux/gfp.h:372:13: note: declared here
372 | extern void free_pages(unsigned long addr, unsigned int order);
| ^~~~~~~~~~
>> drivers/net/ethernet/mediatek/mtk_eth_soc.c:1768:42: error: expected ';' before 'data'
1768 | free_pages(unsigned long)data, get_order(mtk_max_frag_size(ring->frag_size)));
| ^~~~
| ;
>> drivers/net/ethernet/mediatek/mtk_eth_soc.c:1767:9: warning: this 'else' clause does not guard... [-Wmisleading-indentation]
1767 | else
| ^~~~
drivers/net/ethernet/mediatek/mtk_eth_soc.c:1768:93: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'else'
1768 | free_pages(unsigned long)data, get_order(mtk_max_frag_size(ring->frag_size)));
| ^
>> drivers/net/ethernet/mediatek/mtk_eth_soc.c:1768:93: error: expected statement before ')' token
vim +/unsigned +1768 drivers/net/ethernet/mediatek/mtk_eth_soc.c
1759
1760 static void mtk_rx_put_buff(struct mtk_rx_ring *ring, void *data, bool napi)
1761 {
1762 if (ring->page_pool)
1763 page_pool_put_full_page(ring->page_pool,
1764 virt_to_head_page(data), napi);
1765 else if (ring->frag_size <= PAGE_SIZE)
1766 skb_free_frag(data);
> 1767 else
> 1768 free_pages(unsigned long)data, get_order(mtk_max_frag_size(ring->frag_size)));
1769 }
1770
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
More information about the Linux-mediatek
mailing list