1. 06 7月, 2022 3 次提交
  2. 28 6月, 2022 4 次提交
  3. 27 6月, 2022 1 次提交
  4. 24 6月, 2022 6 次提交
    • X
      usb: chipidea: udc: check request status before setting device address · b24346a2
      Xu Yang 提交于
      The complete() function may be called even though request is not
      completed. In this case, it's necessary to check request status so
      as not to set device address wrongly.
      
      Fixes: 10775eb1 ("usb: chipidea: udc: update gadget states according to ch9")
      cc: <stable@vger.kernel.org>
      Signed-off-by: NXu Yang <xu.yang_2@nxp.com>
      Link: https://lore.kernel.org/r/20220623030242.41796-1-xu.yang_2@nxp.comSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      b24346a2
    • A
      USB: gadget: Fix double-free bug in raw_gadget driver · 90bc2af2
      Alan Stern 提交于
      Re-reading a recently merged fix to the raw_gadget driver showed that
      it inadvertently introduced a double-free bug in a failure pathway.
      If raw_ioctl_init() encounters an error after the driver ID number has
      been allocated, it deallocates the ID number before returning.  But
      when dev_free() runs later on, it will then try to deallocate the ID
      number a second time.
      
      Closely related to this issue is another error in the recent fix: The
      ID number is stored in the raw_dev structure before the code checks to
      see whether the structure has already been initialized, in which case
      the new ID number would overwrite the earlier value.
      
      The solution to both bugs is to keep the new ID number in a local
      variable, and store it in the raw_dev structure only after the check
      for prior initialization.  No errors can occur after that point, so
      the double-free will never happen.
      
      Fixes: f2d8c260 ("usb: gadget: Fix non-unique driver names in raw-gadget driver")
      CC: Andrey Konovalov <andreyknvl@gmail.com>
      CC: <stable@vger.kernel.org>
      Signed-off-by: NAlan Stern <stern@rowland.harvard.edu>
      Link: https://lore.kernel.org/r/YrMrRw5AyIZghN0v@rowland.harvard.eduSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      90bc2af2
    • S
      gpio: mxs: Fix header comment · b0d47318
      Stefan Wahren 提交于
      This driver is about MXS GPIO support. MXC is a different platform.
      Signed-off-by: NStefan Wahren <stefan.wahren@i2se.com>
      Signed-off-by: NBartosz Golaszewski <brgl@bgdev.pl>
      b0d47318
    • M
      dm mirror log: clear log bits up to BITS_PER_LONG boundary · 90736eb3
      Mikulas Patocka 提交于
      Commit 85e123c2 ("dm mirror log: round up region bitmap size to
      BITS_PER_LONG") introduced a regression on 64-bit architectures in the
      lvm testsuite tests: lvcreate-mirror, mirror-names and vgsplit-operation.
      
      If the device is shrunk, we need to clear log bits beyond the end of the
      device. The code clears bits up to a 32-bit boundary and then calculates
      lc->sync_count by summing set bits up to a 64-bit boundary (the commit
      changed that; previously, this boundary was 32-bit too). So, it was using
      some non-zeroed bits in the calculation and this caused misbehavior.
      
      Fix this regression by clearing bits up to BITS_PER_LONG boundary.
      
      Fixes: 85e123c2 ("dm mirror log: round up region bitmap size to BITS_PER_LONG")
      Cc: stable@vger.kernel.org
      Reported-by: NBenjamin Marzinski <bmarzins@redhat.com>
      Signed-off-by: NMikulas Patocka <mpatocka@redhat.com>
      Signed-off-by: NMike Snitzer <snitzer@kernel.org>
      90736eb3
    • M
      dm: fix BLK_STS_DM_REQUEUE handling when dm_io represents split bio · 61b6e2e5
      Ming Lei 提交于
      Commit 7dd76d1f ("dm: improve bio splitting and associated IO
      accounting") removed using cloned bio when dm io splitting is needed.
      Using bio_trim()+bio_inc_remaining() rather than bio_split()+bio_chain()
      causes multiple dm_io instances to share the same original bio, and it
      works fine if IOs are completed successfully.
      
      But a regression was caused for the case when BLK_STS_DM_REQUEUE is
      returned from any one of DM's cloned bios (whose dm_io share the same
      orig_bio). In this BLK_STS_DM_REQUEUE case only the mapped subset of
      the original bio for the current exact dm_io needs to be re-submitted.
      However, since the original bio is shared among all dm_io instances,
      the ->orig_bio actually only represents the last dm_io instance, so
      requeue can't work as expected. Also when more than one dm_io is
      requeued, the same original bio is requeued from all dm_io's
      completion handler, then race is caused.
      
      Fix this issue by still allocating one clone bio for completing io
      only, then io accounting can rely on ->orig_bio being unmodified. This
      is needed because the dm_io's sector_offset and sectors members are
      recorded relative to an unmodified ->orig_bio.
      
      In the future, we can go back to using bio_trim()+bio_inc_remaining()
      for dm's io splitting but then delay needing a bio clone only when
      handling BLK_STS_DM_REQUEUE, but that approach is a bit complicated
      (so it needs a development cycle):
      1) bio clone needs to be done in task context
      2) a block interface for unwinding bio is required
      
      Fixes: 7dd76d1f ("dm: improve bio splitting and associated IO accounting")
      Reported-by: NBenjamin Marzinski <bmarzins@redhat.com>
      Signed-off-by: NMing Lei <ming.lei@redhat.com>
      Signed-off-by: NMike Snitzer <snitzer@kernel.org>
      61b6e2e5
    • P
      Revert "printk: add functions to prefer direct printing" · 07a22b61
      Petr Mladek 提交于
      This reverts commit 2bb2b7b5.
      
      The testing of 5.19 release candidates revealed missing synchronization
      between early and regular console functionality.
      
      It would be possible to start the console kthreads later as a workaround.
      But it is clear that console lock serialized console drivers between
      each other. It opens a big area of possible problems that were not
      considered by people involved in the development and review.
      
      printk() is crucial for debugging kernel issues and console output is
      very important part of it. The number of consoles is huge and a proper
      review would take some time. As a result it need to be reverted for 5.19.
      
      Link: https://lore.kernel.org/r/YrBdjVwBOVgLfHyb@alleySigned-off-by: NPetr Mladek <pmladek@suse.com>
      Link: https://lore.kernel.org/r/20220623145157.21938-7-pmladek@suse.com
      07a22b61
  5. 23 6月, 2022 20 次提交
  6. 22 6月, 2022 6 次提交