All of lore.kernel.org
 help / color / mirror / Atom feed
From: kbuild test robot <lkp@intel.com>
To: vladimir.stankovic@displaylink.com
Cc: kbuild-all@lists.01.org, gregkh@linuxfoundation.org,
	linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org,
	mausb-host-devel@displaylink.com
Subject: Re: [PATCH v4 7/8] usb: mausb_host: MA-USB PAL events processing
Date: Sun, 5 Apr 2020 00:07:08 +0800	[thread overview]
Message-ID: <202004050038.meqL6HAk%lkp@intel.com> (raw)
In-Reply-To: <20200327152614.26833-8-vladimir.stankovic@displaylink.com>

Hi,

I love your patch! Perhaps something to improve:

[auto build test WARNING on usb/usb-testing]
[also build test WARNING on balbi-usb/next peter.chen-usb/ci-for-usb-next linus/master linux/master v5.6 next-20200403]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see https://stackoverflow.com/a/37406982]

url:    https://github.com/0day-ci/linux/commits/vladimir-stankovic-displaylink-com/Add-MA-USB-Host-driver/20200328-042436
base:   https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-testing

If you fix the issue, kindly add following tag as appropriate
Reported-by: kbuild test robot <lkp@intel.com>


coccinelle warnings: (new ones prefixed by >>)

>> drivers/usb/mausb_host/utils.c:209:1-18: ERROR: nested lock+irqsave that reuses flags from line 201.
--
>> drivers/usb/mausb_host/hpal_events.c:86:46-49: ERROR: reference preceded by free on line 85

vim +209 drivers/usb/mausb_host/utils.c

   182	
   183	static ssize_t mausb_file_write(struct file *filp, const char __user *buffer,
   184					size_t size, loff_t *offset)
   185	{
   186		ssize_t num_of_bytes_to_write =
   187					sizeof(struct mausb_events_notification);
   188		struct mausb_events_notification notification;
   189		unsigned long flags;
   190		struct mausb_device *dev;
   191	
   192		if (size != (size_t)num_of_bytes_to_write) {
   193			mausb_pr_alert("Different expected bytes to write (%ld) from actual size (%ld)",
   194				       num_of_bytes_to_write, size);
   195			return MAUSB_DRIVER_WRITE_ERROR;
   196		}
   197	
   198		if (copy_from_user(&notification, buffer, size))
   199			return MAUSB_DRIVER_WRITE_ERROR;
   200	
 > 201		spin_lock_irqsave(&mss.lock, flags);
   202		dev = mausb_get_dev_from_addr_unsafe(notification.madev_addr);
   203	
   204		if (!dev) {
   205			spin_unlock_irqrestore(&mss.lock, flags);
   206			return 0;
   207		}
   208	
 > 209		spin_lock_irqsave(&dev->num_of_user_events_lock, flags);
   210		dev->num_of_user_events += notification.num_of_events;
   211		dev->num_of_completed_events += notification.num_of_completed_events;
   212		spin_unlock_irqrestore(&dev->num_of_user_events_lock, flags);
   213	
   214		queue_work(dev->workq, &dev->work);
   215		spin_unlock_irqrestore(&mss.lock, flags);
   216	
   217		return num_of_bytes_to_write;
   218	}
   219	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

WARNING: multiple messages have this Message-ID (diff)
From: kbuild test robot <lkp@intel.com>
To: kbuild-all@lists.01.org
Subject: Re: [PATCH v4 7/8] usb: mausb_host: MA-USB PAL events processing
Date: Sun, 05 Apr 2020 00:07:08 +0800	[thread overview]
Message-ID: <202004050038.meqL6HAk%lkp@intel.com> (raw)
In-Reply-To: <20200327152614.26833-8-vladimir.stankovic@displaylink.com>

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

Hi,

I love your patch! Perhaps something to improve:

[auto build test WARNING on usb/usb-testing]
[also build test WARNING on balbi-usb/next peter.chen-usb/ci-for-usb-next linus/master linux/master v5.6 next-20200403]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see https://stackoverflow.com/a/37406982]

url:    https://github.com/0day-ci/linux/commits/vladimir-stankovic-displaylink-com/Add-MA-USB-Host-driver/20200328-042436
base:   https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-testing

If you fix the issue, kindly add following tag as appropriate
Reported-by: kbuild test robot <lkp@intel.com>


coccinelle warnings: (new ones prefixed by >>)

>> drivers/usb/mausb_host/utils.c:209:1-18: ERROR: nested lock+irqsave that reuses flags from line 201.
--
>> drivers/usb/mausb_host/hpal_events.c:86:46-49: ERROR: reference preceded by free on line 85

vim +209 drivers/usb/mausb_host/utils.c

   182	
   183	static ssize_t mausb_file_write(struct file *filp, const char __user *buffer,
   184					size_t size, loff_t *offset)
   185	{
   186		ssize_t num_of_bytes_to_write =
   187					sizeof(struct mausb_events_notification);
   188		struct mausb_events_notification notification;
   189		unsigned long flags;
   190		struct mausb_device *dev;
   191	
   192		if (size != (size_t)num_of_bytes_to_write) {
   193			mausb_pr_alert("Different expected bytes to write (%ld) from actual size (%ld)",
   194				       num_of_bytes_to_write, size);
   195			return MAUSB_DRIVER_WRITE_ERROR;
   196		}
   197	
   198		if (copy_from_user(&notification, buffer, size))
   199			return MAUSB_DRIVER_WRITE_ERROR;
   200	
 > 201		spin_lock_irqsave(&mss.lock, flags);
   202		dev = mausb_get_dev_from_addr_unsafe(notification.madev_addr);
   203	
   204		if (!dev) {
   205			spin_unlock_irqrestore(&mss.lock, flags);
   206			return 0;
   207		}
   208	
 > 209		spin_lock_irqsave(&dev->num_of_user_events_lock, flags);
   210		dev->num_of_user_events += notification.num_of_events;
   211		dev->num_of_completed_events += notification.num_of_completed_events;
   212		spin_unlock_irqrestore(&dev->num_of_user_events_lock, flags);
   213	
   214		queue_work(dev->workq, &dev->work);
   215		spin_unlock_irqrestore(&mss.lock, flags);
   216	
   217		return num_of_bytes_to_write;
   218	}
   219	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org

  parent reply	other threads:[~2020-04-04 16:07 UTC|newest]

Thread overview: 65+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-12 14:42 [PATCH v3 0/8] Add MA USB Host driver Vladimir Stankovic
2020-03-27 15:26 ` [PATCH v4 " vladimir.stankovic
2020-03-27 15:26   ` [PATCH v4 1/8] usb: Add MA-USB Host kernel module vladimir.stankovic
2020-03-27 16:25     ` Alan Stern
2020-03-27 15:26   ` [PATCH v4 2/8] usb: mausb_host: Add link layer implementation vladimir.stankovic
2020-03-27 15:26   ` [PATCH v4 3/8] usb: mausb_host: HCD initialization vladimir.stankovic
2020-03-27 15:26   ` [PATCH v4 4/8] usb: mausb_host: Implement initial hub handlers vladimir.stankovic
2020-03-27 16:37     ` Alan Stern
2020-04-13 15:16       ` Vladimir Stankovic
2020-03-27 15:26   ` [PATCH v4 5/8] usb: mausb_host: Introduce PAL processing vladimir.stankovic
2020-03-27 16:35     ` Alan Stern
2020-03-28  3:56     ` kbuild test robot
2020-03-28  3:56       ` kbuild test robot
2020-03-27 15:26   ` [PATCH v4 6/8] usb: mausb_host: Add logic for PAL-to-PAL communication vladimir.stankovic
2020-03-27 15:26   ` [PATCH v4 7/8] usb: mausb_host: MA-USB PAL events processing vladimir.stankovic
2020-03-28 10:35     ` kbuild test robot
2020-03-28 10:35       ` kbuild test robot
2020-04-04 16:07     ` kbuild test robot [this message]
2020-04-04 16:07       ` kbuild test robot
2020-03-27 15:26   ` [PATCH v4 8/8] usb: mausb_host: Process MA-USB data packets vladimir.stankovic
2020-04-25  9:19   ` [PATCH v5 0/8] Add MA USB Host driver vladimir.stankovic
2020-04-25  9:19     ` [PATCH v5 1/8] usb: Add MA-USB Host kernel module vladimir.stankovic
2020-04-28 11:03       ` Greg KH
2020-04-25  9:19     ` [PATCH v5 2/8] usb: mausb_host: Add link layer implementation vladimir.stankovic
2020-04-25  9:19     ` [PATCH v5 3/8] usb: mausb_host: HCD initialization vladimir.stankovic
2020-04-28 11:07       ` Greg KH
2020-04-25  9:19     ` [PATCH v5 4/8] usb: mausb_host: Implement initial hub handlers vladimir.stankovic
2020-04-25  9:19     ` [PATCH v5 5/8] usb: mausb_host: Introduce PAL processing vladimir.stankovic
2020-04-26  0:32       ` Alan Stern
2020-04-26 12:32         ` Vladimir Stankovic
2020-04-26 14:31           ` Alan Stern
2020-04-26 14:45             ` [External] " Vladimir Stankovic
2020-04-26 20:56               ` Alan Stern
2020-04-30 14:37                 ` Vladimir Stankovic
2020-04-30 15:18                   ` Alan Stern
2020-04-30 15:34                     ` Vladimir Stankovic
2020-04-30 15:41                       ` Alan Stern
2020-04-25  9:19     ` [PATCH v5 6/8] usb: mausb_host: Add logic for PAL-to-PAL communication vladimir.stankovic
2020-04-25  9:19     ` [PATCH v5 7/8] usb: mausb_host: MA-USB PAL events processing vladimir.stankovic
2020-04-28 11:08       ` Greg KH
2020-04-25  9:19     ` [PATCH v5 8/8] usb: mausb_host: Process MA-USB data packets vladimir.stankovic
2020-04-28 11:04     ` [PATCH v5 0/8] Add MA USB Host driver Greg KH
2020-04-30 16:51       ` [External] " Vladimir Stankovic
2020-04-30 20:02         ` Greg KH
2020-05-15 13:04           ` Vladimir Stankovic
2020-05-29 12:48             ` Pavel Machek
2020-05-15 12:34     ` [PATCH v6 " Vladimir Stankovic
2020-05-15 12:34       ` [PATCH v6 1/8] usb: Add MA-USB Host kernel module Vladimir Stankovic
2020-05-15 13:01         ` Greg KH
2020-06-11 18:20           ` Vladimir Stankovic
2020-05-15 13:02         ` Greg KH
2020-06-11 18:19           ` [External] " Vladimir Stankovic
2020-05-15 12:34       ` [PATCH v6 2/8] usb: mausb_host: Add link layer implementation Vladimir Stankovic
2020-05-15 12:34       ` [PATCH v6 3/8] usb: mausb_host: HCD initialization Vladimir Stankovic
2020-05-15 13:03         ` Greg KH
2020-06-11 18:19           ` Vladimir Stankovic
2020-05-15 13:07         ` Greg KH
2020-06-11 18:18           ` [External] " Vladimir Stankovic
2020-06-18  8:18             ` Greg KH
2020-05-15 12:34       ` [PATCH v6 4/8] usb: mausb_host: Implement initial hub handlers Vladimir Stankovic
2020-05-15 12:34       ` [PATCH v6 5/8] usb: mausb_host: Introduce PAL processing Vladimir Stankovic
2020-05-15 12:35       ` [PATCH v6 6/8] usb: mausb_host: Add logic for PAL-to-PAL communication Vladimir Stankovic
2020-05-15 12:35       ` [PATCH v6 7/8] usb: mausb_host: MA-USB PAL events processing Vladimir Stankovic
2020-05-15 12:35       ` [PATCH v6 8/8] usb: mausb_host: Process MA-USB data packets Vladimir Stankovic
2020-05-15 13:08       ` [PATCH v6 0/8] Add MA USB Host driver Greg KH

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=202004050038.meqL6HAk%lkp@intel.com \
    --to=lkp@intel.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=kbuild-all@lists.01.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=mausb-host-devel@displaylink.com \
    --cc=vladimir.stankovic@displaylink.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.