From: kernel test robot <lkp@intel.com>
To: oe-kbuild@lists.linux.dev
Cc: lkp@intel.com, Dan Carpenter <error27@gmail.com>
Subject: [linux-next:master 1128/2395] drivers/usb/serial/oti6858.c:747 oti6858_read_int_callback() error: calling 'spin_unlock_irqrestore()' with bogus flags
Date: Sun, 03 May 2026 17:11:14 +0800 [thread overview]
Message-ID: <202605031744.pbTxSj9d-lkp@intel.com> (raw)
BCC: lkp@intel.com
CC: oe-kbuild-all@lists.linux.dev
TO: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head: b9303e6bff706758c167af686b5315ad00233bf8
commit: 3b58fbbdf385303fd611abc522579c541e282b8d [1128/2395] workqueue: check kvov_mode change inside workqueue
:::::: branch date: 3 days ago
:::::: commit date: 6 days ago
config: i386-randconfig-141-20260503 (https://download.01.org/0day-ci/archive/20260503/202605031744.pbTxSj9d-lkp@intel.com/config)
compiler: gcc-13 (Debian 13.3.0-16) 13.3.0
smatch: v0.5.0-9065-ge9cc34fd
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@intel.com>
| Reported-by: Dan Carpenter <error27@gmail.com>
| Closes: https://lore.kernel.org/r/202605031744.pbTxSj9d-lkp@intel.com/
New smatch warnings:
drivers/usb/serial/oti6858.c:747 oti6858_read_int_callback() error: calling 'spin_unlock_irqrestore()' with bogus flags
drivers/thunderbolt/nhi.c:311 ring_work() error: calling 'spin_unlock_irqrestore()' with bogus flags
drivers/usb/serial/metro-usb.c:150 metrousb_read_int_callback() error: calling 'spin_unlock_irqrestore()' with bogus flags
drivers/usb/serial/metro-usb.c:288 metrousb_tiocmget() error: calling 'spin_unlock_irqrestore()' with bogus flags
drivers/usb/serial/metro-usb.c:318 metrousb_tiocmset() error: calling 'spin_unlock_irqrestore()' with bogus flags
drivers/usb/serial/ir-usb.c:278 ir_write() error: calling 'spin_unlock_irqrestore()' with bogus flags
drivers/usb/serial/garmin_gps.c:309 pkt_pop() error: calling 'spin_unlock_irqrestore()' with bogus flags
drivers/usb/serial/garmin_gps.c:326 pkt_clear() error: calling 'spin_unlock_irqrestore()' with bogus flags
drivers/usb/serial/garmin_gps.c:1014 garmin_write_bulk() error: calling 'spin_unlock_irqrestore()' with bogus flags
drivers/usb/serial/opticon.c:263 opticon_write() error: calling 'spin_unlock_irqrestore()' with bogus flags
drivers/usb/serial/opticon.c:316 opticon_tiocmget() error: calling 'spin_unlock_irqrestore()' with bogus flags
drivers/usb/serial/generic.c:192 usb_serial_generic_write_start() error: calling 'spin_unlock_irqrestore()' with bogus flags
drivers/usb/serial/generic.c:192 usb_serial_generic_write_start() error: calling 'spin_unlock_irqrestore()' with bogus flags
drivers/usb/serial/ti_usb_3410_5052.c:1231 ti_bulk_in_callback() error: calling 'spin_unlock_irqrestore()' with bogus flags
drivers/vfio/pci/vfio_pci_intrs.c:201 vfio_pci_intx_unmask_handler() error: calling 'spin_unlock_irqrestore()' with bogus flags
drivers/usb/serial/iuu_phoenix.c:692 iuu_uart_read_callback() error: calling 'spin_unlock_irqrestore()' with bogus flags
drivers/gpu/drm/arm/display/komeda/komeda_crtc.c:162 komeda_crtc_prepare() warn: 'mdev->aclk' from clk_prepare_enable() not released on lines: 162.
drivers/usb/serial/usb_wwan.c:195 usb_wwan_write() error: calling 'spin_unlock_irqrestore()' with bogus flags
drivers/usb/serial/io_ti.c:1785 edge_bulk_in_callback() error: calling 'spin_unlock_irqrestore()' with bogus flags
drivers/tty/mxser.c:749 mxser_activate() error: calling 'spin_unlock_irqrestore()' with bogus flags
drivers/usb/class/usblp.c:517 usblp_poll() error: calling 'spin_unlock_irqrestore()' with bogus flags
drivers/misc/cardreader/rtsx_pcr.c:324 rtsx_pci_add_cmd() error: calling 'spin_unlock_irqrestore()' with bogus flags
drivers/misc/cardreader/rtsx_pcr.c:381 rtsx_pci_send_cmd() error: calling 'spin_unlock_irqrestore()' with bogus flags
drivers/misc/cardreader/rtsx_pcr.c:501 rtsx_pci_dma_transfer() error: calling 'spin_unlock_irqrestore()' with bogus flags
drivers/usb/serial/sierra.c:452 sierra_write() error: calling 'spin_unlock_irqrestore()' with bogus flags
drivers/usb/host/xhci-hub.c:1314 xhci_hub_control() error: calling 'spin_unlock_irqrestore()' with bogus flags
drivers/usb/host/xhci-hub.c:1808 xhci_bus_suspend() error: calling 'spin_unlock_irqrestore()' with bogus flags
drivers/usb/host/xhci-hub.c:1956 xhci_bus_resume() error: calling 'spin_unlock_irqrestore()' with bogus flags
drivers/usb/host/xhci.c:1721 xhci_urb_enqueue() error: calling 'spin_unlock_irqrestore()' with bogus flags
drivers/usb/host/xhci.c:3457 xhci_endpoint_reset() error: calling 'spin_unlock_irqrestore()' with bogus flags
drivers/usb/host/xhci.c:3750 xhci_alloc_streams() error: calling 'spin_unlock_irqrestore()' with bogus flags
drivers/usb/host/xhci.c:3862 xhci_free_streams() error: calling 'spin_unlock_irqrestore()' with bogus flags
drivers/usb/host/xhci.c:4005 xhci_discover_or_reset_device() error: calling 'spin_unlock_irqrestore()' with bogus flags
drivers/usb/host/xhci.c:4743 xhci_set_usb2_hardware_lpm() error: calling 'spin_unlock_irqrestore()' with bogus flags
drivers/usb/serial/cypress_m8.c:1124 cypress_read_int_callback() error: calling 'spin_unlock_irqrestore()' with bogus flags
drivers/gpib/fmh_gpib/fmh_gpib.c:296 lacs_or_read_ready() error: calling 'spin_unlock_irqrestore()' with bogus flags
drivers/gpib/fmh_gpib/fmh_gpib.c:823 fmh_gpib_dma_read() error: calling 'spin_unlock_irqrestore()' with bogus flags
drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c:2983 amdgpu_vm_lock_by_pasid() error: calling 'spin_unlock_irqrestore()' with bogus flags
mm/slub.c:3700 alloc_single_from_new_slab() error: calling 'spin_unlock_irqrestore()' with bogus flags
Old smatch warnings:
drivers/usb/serial/ir-usb.c:304 ir_write() error: calling 'spin_unlock_irqrestore()' with bogus flags
drivers/usb/serial/generic.c:167 usb_serial_generic_write_start() error: calling 'spin_unlock_irqrestore()' with bogus flags
drivers/usb/serial/generic.c:172 usb_serial_generic_write_start() error: calling 'spin_unlock_irqrestore()' with bogus flags
drivers/usb/serial/generic.c:182 usb_serial_generic_write_start() error: calling 'spin_unlock_irqrestore()' with bogus flags
drivers/gpu/drm/arm/display/komeda/komeda_crtc.c:321 komeda_crtc_flush_and_wait_for_flip_done() error: calling 'spin_unlock_irqrestore()' with bogus flags
drivers/tty/mxser.c:798 mxser_activate() error: calling 'spin_unlock_irqrestore()' with bogus flags
drivers/misc/cardreader/rtsx_pcr.c:386 rtsx_pci_send_cmd() error: calling 'spin_unlock_irqrestore()' with bogus flags
drivers/misc/cardreader/rtsx_pcr.c:506 rtsx_pci_dma_transfer() error: calling 'spin_unlock_irqrestore()' with bogus flags
drivers/usb/serial/sierra.c:491 sierra_write() error: calling 'spin_unlock_irqrestore()' with bogus flags
drivers/usb/serial/sierra.c:497 sierra_write() error: calling 'spin_unlock_irqrestore()' with bogus flags
drivers/usb/serial/sierra.c:515 sierra_write() error: calling 'spin_unlock_irqrestore()' with bogus flags
drivers/usb/host/xhci-hub.c:1448 xhci_hub_control() error: calling 'spin_unlock_irqrestore()' with bogus flags
drivers/usb/host/xhci-hub.c:1599 xhci_hub_control() error: calling 'spin_unlock_irqrestore()' with bogus flags
drivers/usb/host/xhci.c:4009 xhci_discover_or_reset_device() error: calling 'spin_unlock_irqrestore()' with bogus flags
drivers/gpib/fmh_gpib/fmh_gpib.c:1475 fmh_gpib_attach_impl() warn: 'e_priv->fifo_base' from ioremap() not released on lines: 1450,1456,1464.
drivers/gpib/fmh_gpib/fmh_gpib.c:1475 fmh_gpib_attach_impl() warn: 'irq' from request_irq() not released on lines: 1464.
drivers/gpib/fmh_gpib/fmh_gpib.c:1475 fmh_gpib_attach_impl() warn: 'nec_priv->mmiobase' from ioremap() not released on lines: 1429,1435,1442,1450,1456,1464.
drivers/gpib/fmh_gpib/fmh_gpib.c:1475 fmh_gpib_attach_impl() warn: 'res->start' from __request_region() not released on lines: 1421,1429,1435,1442,1450,1456,1464.
drivers/gpib/fmh_gpib/fmh_gpib.c:1475 fmh_gpib_attach_impl() warn: 'res->start' from __request_region() not released on lines: 1442,1450,1456,1464.
drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c:851 amdgpu_vm_flush() error: we previously assumed 'ring->funcs->emit_vm_flush' could be null (see line 813)
vim +747 drivers/usb/serial/oti6858.c
49cdee0ed0fce9 Kees Lemmens 2007-03-27 638
49cdee0ed0fce9 Kees Lemmens 2007-03-27 639 static void oti6858_read_int_callback(struct urb *urb)
49cdee0ed0fce9 Kees Lemmens 2007-03-27 640 {
cdc97792289179 Ming Lei 2008-02-24 641 struct usb_serial_port *port = urb->context;
49cdee0ed0fce9 Kees Lemmens 2007-03-27 642 struct oti6858_private *priv = usb_get_serial_port_data(port);
49cdee0ed0fce9 Kees Lemmens 2007-03-27 643 int transient = 0, can_recv = 0, resubmit = 1;
78c26aebd9f4d2 Greg Kroah-Hartman 2007-06-15 644 int status = urb->status;
49cdee0ed0fce9 Kees Lemmens 2007-03-27 645
78c26aebd9f4d2 Greg Kroah-Hartman 2007-06-15 646 switch (status) {
49cdee0ed0fce9 Kees Lemmens 2007-03-27 647 case 0:
49cdee0ed0fce9 Kees Lemmens 2007-03-27 648 /* success */
49cdee0ed0fce9 Kees Lemmens 2007-03-27 649 break;
49cdee0ed0fce9 Kees Lemmens 2007-03-27 650 case -ECONNRESET:
49cdee0ed0fce9 Kees Lemmens 2007-03-27 651 case -ENOENT:
49cdee0ed0fce9 Kees Lemmens 2007-03-27 652 case -ESHUTDOWN:
49cdee0ed0fce9 Kees Lemmens 2007-03-27 653 /* this urb is terminated, clean up */
8c8e87bc23acb4 Greg Kroah-Hartman 2012-09-14 654 dev_dbg(&urb->dev->dev, "%s(): urb shutting down with status: %d\n",
441b62c1edb986 Harvey Harrison 2008-03-03 655 __func__, status);
49cdee0ed0fce9 Kees Lemmens 2007-03-27 656 return;
49cdee0ed0fce9 Kees Lemmens 2007-03-27 657 default:
8c8e87bc23acb4 Greg Kroah-Hartman 2012-09-14 658 dev_dbg(&urb->dev->dev, "%s(): nonzero urb status received: %d\n",
441b62c1edb986 Harvey Harrison 2008-03-03 659 __func__, status);
49cdee0ed0fce9 Kees Lemmens 2007-03-27 660 break;
49cdee0ed0fce9 Kees Lemmens 2007-03-27 661 }
49cdee0ed0fce9 Kees Lemmens 2007-03-27 662
78c26aebd9f4d2 Greg Kroah-Hartman 2007-06-15 663 if (status == 0 && urb->actual_length == OTI6858_CTRL_PKT_SIZE) {
49cdee0ed0fce9 Kees Lemmens 2007-03-27 664 struct oti6858_control_pkt *xs = urb->transfer_buffer;
49cdee0ed0fce9 Kees Lemmens 2007-03-27 665 unsigned long flags;
49cdee0ed0fce9 Kees Lemmens 2007-03-27 666
49cdee0ed0fce9 Kees Lemmens 2007-03-27 667 spin_lock_irqsave(&priv->lock, flags);
49cdee0ed0fce9 Kees Lemmens 2007-03-27 668
49cdee0ed0fce9 Kees Lemmens 2007-03-27 669 if (!priv->transient) {
49cdee0ed0fce9 Kees Lemmens 2007-03-27 670 if (!OTI6858_CTRL_EQUALS_PENDING(xs, priv)) {
49cdee0ed0fce9 Kees Lemmens 2007-03-27 671 if (xs->rx_bytes_avail == 0) {
49cdee0ed0fce9 Kees Lemmens 2007-03-27 672 priv->transient = 4;
49cdee0ed0fce9 Kees Lemmens 2007-03-27 673 priv->setup_done = 0;
49cdee0ed0fce9 Kees Lemmens 2007-03-27 674 resubmit = 0;
8c8e87bc23acb4 Greg Kroah-Hartman 2012-09-14 675 dev_dbg(&port->dev, "%s(): scheduling setup_line()\n", __func__);
49cdee0ed0fce9 Kees Lemmens 2007-03-27 676 schedule_delayed_work(&priv->delayed_setup_work, 0);
49cdee0ed0fce9 Kees Lemmens 2007-03-27 677 }
49cdee0ed0fce9 Kees Lemmens 2007-03-27 678 }
49cdee0ed0fce9 Kees Lemmens 2007-03-27 679 } else {
49cdee0ed0fce9 Kees Lemmens 2007-03-27 680 if (OTI6858_CTRL_EQUALS_PENDING(xs, priv)) {
49cdee0ed0fce9 Kees Lemmens 2007-03-27 681 priv->transient = 0;
49cdee0ed0fce9 Kees Lemmens 2007-03-27 682 } else if (!priv->setup_done) {
49cdee0ed0fce9 Kees Lemmens 2007-03-27 683 resubmit = 0;
49cdee0ed0fce9 Kees Lemmens 2007-03-27 684 } else if (--priv->transient == 0) {
49cdee0ed0fce9 Kees Lemmens 2007-03-27 685 if (xs->rx_bytes_avail == 0) {
49cdee0ed0fce9 Kees Lemmens 2007-03-27 686 priv->transient = 4;
49cdee0ed0fce9 Kees Lemmens 2007-03-27 687 priv->setup_done = 0;
49cdee0ed0fce9 Kees Lemmens 2007-03-27 688 resubmit = 0;
8c8e87bc23acb4 Greg Kroah-Hartman 2012-09-14 689 dev_dbg(&port->dev, "%s(): scheduling setup_line()\n", __func__);
49cdee0ed0fce9 Kees Lemmens 2007-03-27 690 schedule_delayed_work(&priv->delayed_setup_work, 0);
49cdee0ed0fce9 Kees Lemmens 2007-03-27 691 }
49cdee0ed0fce9 Kees Lemmens 2007-03-27 692 }
49cdee0ed0fce9 Kees Lemmens 2007-03-27 693 }
49cdee0ed0fce9 Kees Lemmens 2007-03-27 694
49cdee0ed0fce9 Kees Lemmens 2007-03-27 695 if (!priv->transient) {
1acc36e9c8dcd4 Johan Hovold 2014-01-02 696 u8 delta = xs->pin_state ^ priv->status.pin_state;
1acc36e9c8dcd4 Johan Hovold 2014-01-02 697
bd6383c81d5f33 Johan Hovold 2014-01-02 698 if (delta & PIN_MSR_MASK) {
bd6383c81d5f33 Johan Hovold 2014-01-02 699 if (delta & PIN_CTS)
bd6383c81d5f33 Johan Hovold 2014-01-02 700 port->icount.cts++;
bd6383c81d5f33 Johan Hovold 2014-01-02 701 if (delta & PIN_DSR)
bd6383c81d5f33 Johan Hovold 2014-01-02 702 port->icount.dsr++;
bd6383c81d5f33 Johan Hovold 2014-01-02 703 if (delta & PIN_RI)
bd6383c81d5f33 Johan Hovold 2014-01-02 704 port->icount.rng++;
bd6383c81d5f33 Johan Hovold 2014-01-02 705 if (delta & PIN_DCD)
bd6383c81d5f33 Johan Hovold 2014-01-02 706 port->icount.dcd++;
bd6383c81d5f33 Johan Hovold 2014-01-02 707
215f6f04668e80 Johan Hovold 2013-03-21 708 wake_up_interruptible(&port->port.delta_msr_wait);
bd6383c81d5f33 Johan Hovold 2014-01-02 709 }
1acc36e9c8dcd4 Johan Hovold 2014-01-02 710
49cdee0ed0fce9 Kees Lemmens 2007-03-27 711 memcpy(&priv->status, xs, OTI6858_CTRL_PKT_SIZE);
49cdee0ed0fce9 Kees Lemmens 2007-03-27 712 }
49cdee0ed0fce9 Kees Lemmens 2007-03-27 713
49cdee0ed0fce9 Kees Lemmens 2007-03-27 714 if (!priv->transient && xs->rx_bytes_avail != 0) {
49cdee0ed0fce9 Kees Lemmens 2007-03-27 715 can_recv = xs->rx_bytes_avail;
49cdee0ed0fce9 Kees Lemmens 2007-03-27 716 priv->flags.read_urb_in_use = 1;
49cdee0ed0fce9 Kees Lemmens 2007-03-27 717 }
49cdee0ed0fce9 Kees Lemmens 2007-03-27 718
49cdee0ed0fce9 Kees Lemmens 2007-03-27 719 transient = priv->transient;
49cdee0ed0fce9 Kees Lemmens 2007-03-27 720 spin_unlock_irqrestore(&priv->lock, flags);
49cdee0ed0fce9 Kees Lemmens 2007-03-27 721 }
49cdee0ed0fce9 Kees Lemmens 2007-03-27 722
49cdee0ed0fce9 Kees Lemmens 2007-03-27 723 if (can_recv) {
49cdee0ed0fce9 Kees Lemmens 2007-03-27 724 int result;
49cdee0ed0fce9 Kees Lemmens 2007-03-27 725
49cdee0ed0fce9 Kees Lemmens 2007-03-27 726 result = usb_submit_urb(port->read_urb, GFP_ATOMIC);
49cdee0ed0fce9 Kees Lemmens 2007-03-27 727 if (result != 0) {
49cdee0ed0fce9 Kees Lemmens 2007-03-27 728 priv->flags.read_urb_in_use = 0;
49cdee0ed0fce9 Kees Lemmens 2007-03-27 729 dev_err(&port->dev, "%s(): usb_submit_urb() failed,"
441b62c1edb986 Harvey Harrison 2008-03-03 730 " error %d\n", __func__, result);
49cdee0ed0fce9 Kees Lemmens 2007-03-27 731 } else {
49cdee0ed0fce9 Kees Lemmens 2007-03-27 732 resubmit = 0;
49cdee0ed0fce9 Kees Lemmens 2007-03-27 733 }
49cdee0ed0fce9 Kees Lemmens 2007-03-27 734 } else if (!transient) {
49cdee0ed0fce9 Kees Lemmens 2007-03-27 735 unsigned long flags;
28f27dcbd255b4 Johan Hovold 2010-05-16 736 int count;
28f27dcbd255b4 Johan Hovold 2010-05-16 737
28f27dcbd255b4 Johan Hovold 2010-05-16 738 spin_lock_irqsave(&port->lock, flags);
28f27dcbd255b4 Johan Hovold 2010-05-16 739 count = kfifo_len(&port->write_fifo);
28f27dcbd255b4 Johan Hovold 2010-05-16 740 spin_unlock_irqrestore(&port->lock, flags);
49cdee0ed0fce9 Kees Lemmens 2007-03-27 741
49cdee0ed0fce9 Kees Lemmens 2007-03-27 742 spin_lock_irqsave(&priv->lock, flags);
28f27dcbd255b4 Johan Hovold 2010-05-16 743 if (priv->flags.write_urb_in_use == 0 && count != 0) {
49cdee0ed0fce9 Kees Lemmens 2007-03-27 744 schedule_delayed_work(&priv->delayed_write_work, 0);
49cdee0ed0fce9 Kees Lemmens 2007-03-27 745 resubmit = 0;
49cdee0ed0fce9 Kees Lemmens 2007-03-27 746 }
49cdee0ed0fce9 Kees Lemmens 2007-03-27 @747 spin_unlock_irqrestore(&priv->lock, flags);
49cdee0ed0fce9 Kees Lemmens 2007-03-27 748 }
49cdee0ed0fce9 Kees Lemmens 2007-03-27 749
49cdee0ed0fce9 Kees Lemmens 2007-03-27 750 if (resubmit) {
49cdee0ed0fce9 Kees Lemmens 2007-03-27 751 int result;
49cdee0ed0fce9 Kees Lemmens 2007-03-27 752
:::::: The code at line 747 was first introduced by commit
:::::: 49cdee0ed0fce9e1bda81f5dcad8d5cce6aec983 USB: oti6858 usb-serial driver (in Nokia CA-42 cable)
:::::: TO: Kees Lemmens <C.W.J.Lemmens@ewi.tudelft.nl>
:::::: CC: Greg Kroah-Hartman <gregkh@suse.de>
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
reply other threads:[~2026-05-03 9:11 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=202605031744.pbTxSj9d-lkp@intel.com \
--to=lkp@intel.com \
--cc=error27@gmail.com \
--cc=oe-kbuild@lists.linux.dev \
/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.