mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: kbuild test robot <lkp@intel.com>
To: Jeffy Chen <jeffy.chen@rock-chips.com>
Cc: kbuild-all@01.org, linux-kernel@vger.kernel.org,
	xiyou.wangcong@gmail.com, briannorris@chromium.org,
	dianders@chromium.org, Jeffy Chen <jeffy.chen@rock-chips.com>,
	Johan Hedberg <johan.hedberg@gmail.com>,
	Marcel Holtmann <marcel@holtmann.org>,
	Gustavo Padovan <gustavo@padovan.org>,
	linux-bluetooth@vger.kernel.org
Subject: Re: [PATCH v4] Bluetooth: btusb: Fix memory leak in play_deferred
Date: Thu, 20 Jul 2017 03:21:15 +0800	[thread overview]
Message-ID: <201707200310.zQz6lA7K%fengguang.wu@intel.com> (raw)
In-Reply-To: <1500371617-5460-1-git-send-email-jeffy.chen@rock-chips.com>

[-- Attachment #1: Type: text/plain, Size: 2374 bytes --]

Hi Jeffy,

[auto build test WARNING on bluetooth-next/master]
[also build test WARNING on v4.13-rc1 next-20170719]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url:    https://github.com/0day-ci/linux/commits/Jeffy-Chen/Bluetooth-btusb-Fix-memory-leak-in-play_deferred/20170719-044201
base:   https://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth-next.git master
config: i386-allyesconfig (attached as .config)
compiler: gcc-6 (Debian 6.2.0-3) 6.2.0 20160901
reproduce:
        # save the attached .config to linux build tree
        make ARCH=i386 

Note: it may well be a FALSE warning. FWIW you are at least aware of it now.
http://gcc.gnu.org/wiki/Better_Uninitialized_Warnings

All warnings (new ones prefixed by >>):

   drivers/bluetooth/btusb.c: In function 'btusb_resume':
>> drivers/bluetooth/btusb.c:3288:3: warning: 'err' may be used uninitialized in this function [-Wmaybe-uninitialized]
      BT_ERR("%s urb %p submission failed (%d)",
      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~                                  
   drivers/bluetooth/btusb.c:3266:6: note: 'err' was declared here
     int err;
         ^~~

vim +/err +3288 drivers/bluetooth/btusb.c

  3262	
  3263	static void play_deferred(struct btusb_data *data)
  3264	{
  3265		struct urb *urb;
  3266		int err;
  3267	
  3268		while ((urb = usb_get_from_anchor(&data->deferred))) {
  3269			usb_anchor_urb(urb, &data->tx_anchor);
  3270	
  3271			err = usb_submit_urb(urb, GFP_ATOMIC);
  3272			if (err < 0) {
  3273				if (err != -EPERM && err != -ENODEV)
  3274					BT_ERR("%s urb %p submission failed (%d)",
  3275					       data->hdev->name, urb, -err);
  3276				kfree(urb->setup_packet);
  3277				usb_unanchor_urb(urb);
  3278				usb_free_urb(urb);
  3279				break;
  3280			}
  3281	
  3282			data->tx_in_flight++;
  3283			usb_free_urb(urb);
  3284		}
  3285	
  3286		/* Cleanup the rest deferred urbs. */
  3287		while ((urb = usb_get_from_anchor(&data->deferred))) {
> 3288			BT_ERR("%s urb %p submission failed (%d)",
  3289			       data->hdev->name, urb, -err);
  3290			kfree(urb->setup_packet);
  3291			usb_free_urb(urb);
  3292		}
  3293	}
  3294	

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 59810 bytes --]

      parent reply	other threads:[~2017-07-19 19:21 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-18  9:53 Jeffy Chen
2017-07-18  9:58 ` Marcel Holtmann
2017-07-19 14:53 ` kbuild test robot
2017-07-19 19:21 ` kbuild test robot [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=201707200310.zQz6lA7K%fengguang.wu@intel.com \
    --to=lkp@intel.com \
    --cc=briannorris@chromium.org \
    --cc=dianders@chromium.org \
    --cc=gustavo@padovan.org \
    --cc=jeffy.chen@rock-chips.com \
    --cc=johan.hedberg@gmail.com \
    --cc=kbuild-all@01.org \
    --cc=linux-bluetooth@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=marcel@holtmann.org \
    --cc=xiyou.wangcong@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®