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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <202511100649.KfikwcaY-lkp@intel.com>
Date: Mon, 10 Nov 2025 06:40:17 +0800
From: kernel test robot <lkp@...el.com>
To: Sumit Kumar <sumit.kumar@....qualcomm.com>,
	Manivannan Sadhasivam <mani@...nel.org>
Cc: oe-kbuild-all@...ts.linux.dev,
	Krishna Chaitanya Chundru <krishna.chundru@....qualcomm.com>,
	Akhil Vinod <akhil.vinod@....qualcomm.com>,
	Subramanian Ananthanarayanan <subramanian.ananthanarayanan@....qualcomm.com>,
	linux-kernel@...r.kernel.org, mhi@...ts.linux.dev,
	linux-arm-msm@...r.kernel.org, quic_vpernami@...cinc.com,
	Sumit Kumar <sumit.kumar@....qualcomm.com>
Subject: Re: [PATCH v2 3/3] bus: mhi: ep: Add loopback driver for data path
 testing

Hi Sumit,

kernel test robot noticed the following build warnings:

[auto build test WARNING on e6b9dce0aeeb91dfc0974ab87f02454e24566182]

url:    https://github.com/intel-lab-lkp/linux/commits/Sumit-Kumar/bus-mhi-host-Add-loopback-driver-with-sysfs-interface/20251104-174320
base:   e6b9dce0aeeb91dfc0974ab87f02454e24566182
patch link:    https://lore.kernel.org/r/20251104-loopback_mhi-v2-3-727a3fd9aa74%40oss.qualcomm.com
patch subject: [PATCH v2 3/3] bus: mhi: ep: Add loopback driver for data path testing
config: csky-randconfig-r061-20251110 (https://download.01.org/0day-ci/archive/20251110/202511100649.KfikwcaY-lkp@intel.com/config)
compiler: csky-linux-gcc (GCC) 15.1.0

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@...el.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202511100649.KfikwcaY-lkp@intel.com/

cocci warnings: (new ones prefixed by >>)
>> drivers/bus/mhi/ep/mhi_ep_loopback.c:80:2-7: WARNING: NULL check before some freeing functions is not needed.
--
>> drivers/bus/mhi/ep/mhi_ep_loopback.c:46:8-15: WARNING opportunity for kmemdup

vim +80 drivers/bus/mhi/ep/mhi_ep_loopback.c

    37	
    38	static void mhi_ep_loopback_ul_callback(struct mhi_ep_device *mhi_dev,
    39						struct mhi_result *mhi_res)
    40	{
    41		struct mhi_ep_loopback *mhi_ep_lb = dev_get_drvdata(&mhi_dev->dev);
    42		struct mhi_ep_loopback_work *mhi_ep_lb_work;
    43		void *buf;
    44	
    45		if (!(mhi_res->transaction_status)) {
  > 46			buf = kmalloc(mhi_res->bytes_xferd, GFP_KERNEL);
    47			if (!buf) {
    48				dev_err(&mhi_dev->dev, "Failed to allocate buffer\n");
    49				return;
    50			}
    51	
    52			memcpy(buf, mhi_res->buf_addr, mhi_res->bytes_xferd);
    53	
    54			mhi_ep_lb_work = kmalloc(sizeof(*mhi_ep_lb_work), GFP_KERNEL);
    55			if (!mhi_ep_lb_work) {
    56				dev_err(&mhi_dev->dev, "Unable to allocate the work structure\n");
    57				kfree(buf);
    58				return;
    59			}
    60	
    61			INIT_WORK(&mhi_ep_lb_work->work, mhi_ep_loopback_work_handler);
    62			mhi_ep_lb_work->mdev = mhi_dev;
    63			mhi_ep_lb_work->buf = buf;
    64			mhi_ep_lb_work->len = mhi_res->bytes_xferd;
    65	
    66			queue_work(mhi_ep_lb->loopback_wq, &mhi_ep_lb_work->work);
    67		}
    68	}
    69	
    70	static void mhi_ep_loopback_dl_callback(struct mhi_ep_device *mhi_dev,
    71						struct mhi_result *mhi_res)
    72	{
    73		void *buf;
    74	
    75		if (mhi_res->transaction_status)
    76			return;
    77	
    78		buf = mhi_res->buf_addr;
    79		if (buf)
  > 80			kfree(buf);
    81	}
    82	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ