1. 17 Apr, 2024 7 commits
    • Uwe Kleine-König's avatar
      ipmi: kcs_bmc_aspeed: Convert to platform remove callback returning void · c61090f4
      Uwe Kleine-König authored
      The .remove() callback for a platform driver returns an int which makes
      many driver authors wrongly assume it's possible to do error handling by
      returning an error code. However the value returned is ignored (apart
      from emitting a warning) and this typically results in resource leaks.
      
      To improve here there is a quest to make the remove callback return
      void. In the first step of this quest all drivers are converted to
      .remove_new(), which already returns void. Eventually after all drivers
      are converted, .remove_new() will be renamed to .remove().
      
      Trivially convert this driver from always returning zero in the remove
      callback to the void returning variant.
      Signed-off-by: default avatarUwe Kleine-König <u.kleine-koenig@pengutronix.de>
      Message-Id: <d125e83788ddc27fc52a3f11b2c329b40cbdd6f9.1709655755.git.u.kleine-koenig@pengutronix.de>
      Reviewed-by: default avatarAndrew Jeffery <andrew@codeconstruct.com.au>
      Signed-off-by: default avatarCorey Minyard <minyard@acm.org>
      c61090f4
    • Uwe Kleine-König's avatar
      ipmi: ipmi_ssif: Convert to platform remove callback returning void · a69da502
      Uwe Kleine-König authored
      The .remove() callback for a platform driver returns an int which makes
      many driver authors wrongly assume it's possible to do error handling by
      returning an error code. However the value returned is ignored (apart
      from emitting a warning) and this typically results in resource leaks.
      
      To improve here there is a quest to make the remove callback return
      void. In the first step of this quest all drivers are converted to
      .remove_new(), which already returns void. Eventually after all drivers
      are converted, .remove_new() will be renamed to .remove().
      
      Trivially convert this driver from always returning zero in the remove
      callback to the void returning variant.
      Signed-off-by: default avatarUwe Kleine-König <u.kleine-koenig@pengutronix.de>
      Message-Id: <c8a6cd95ad7a8220e211373c44cdaba2a8c06052.1709655755.git.u.kleine-koenig@pengutronix.de>
      Signed-off-by: default avatarCorey Minyard <minyard@acm.org>
      a69da502
    • Uwe Kleine-König's avatar
      ipmi: ipmi_si_platform: Convert to platform remove callback returning void · f99a9965
      Uwe Kleine-König authored
      The .remove() callback for a platform driver returns an int which makes
      many driver authors wrongly assume it's possible to do error handling by
      returning an error code. However the value returned is ignored (apart
      from emitting a warning) and this typically results in resource leaks.
      
      To improve here there is a quest to make the remove callback return
      void. In the first step of this quest all drivers are converted to
      .remove_new(), which already returns void. Eventually after all drivers
      are converted, .remove_new() will be renamed to .remove().
      
      Trivially convert this driver from always returning zero in the remove
      callback to the void returning variant.
      Signed-off-by: default avatarUwe Kleine-König <u.kleine-koenig@pengutronix.de>
      Message-Id: <789cd7876780241430dd5604bc4322453fe4e581.1709655755.git.u.kleine-koenig@pengutronix.de>
      Signed-off-by: default avatarCorey Minyard <minyard@acm.org>
      f99a9965
    • Uwe Kleine-König's avatar
      ipmi: ipmi_powernv: Convert to platform remove callback returning void · 26edd74f
      Uwe Kleine-König authored
      The .remove() callback for a platform driver returns an int which makes
      many driver authors wrongly assume it's possible to do error handling by
      returning an error code. However the value returned is ignored (apart
      from emitting a warning) and this typically results in resource leaks.
      
      To improve here there is a quest to make the remove callback return
      void. In the first step of this quest all drivers are converted to
      .remove_new(), which already returns void. Eventually after all drivers
      are converted, .remove_new() will be renamed to .remove().
      
      Trivially convert this driver from always returning zero in the remove
      callback to the void returning variant.
      Signed-off-by: default avatarUwe Kleine-König <u.kleine-koenig@pengutronix.de>
      Message-Id: <22375be2dd616d8ccc2959586a08e49a5ad9e47b.1709655755.git.u.kleine-koenig@pengutronix.de>
      Signed-off-by: default avatarCorey Minyard <minyard@acm.org>
      26edd74f
    • Uwe Kleine-König's avatar
      ipmi: bt-bmc: Convert to platform remove callback returning void · 23489184
      Uwe Kleine-König authored
      The .remove() callback for a platform driver returns an int which makes
      many driver authors wrongly assume it's possible to do error handling by
      returning an error code. However the value returned is ignored (apart
      from emitting a warning) and this typically results in resource leaks.
      
      To improve here there is a quest to make the remove callback return
      void. In the first step of this quest all drivers are converted to
      .remove_new(), which already returns void. Eventually after all drivers
      are converted, .remove_new() will be renamed to .remove().
      
      Trivially convert this driver from always returning zero in the remove
      callback to the void returning variant.
      Signed-off-by: default avatarUwe Kleine-König <u.kleine-koenig@pengutronix.de>
      Message-Id: <dc5e67fb45c8c673cbf3cdbc4997c5deb3a700fe.1709655755.git.u.kleine-koenig@pengutronix.de>
      Signed-off-by: default avatarCorey Minyard <minyard@acm.org>
      23489184
    • Niklas Schnelle's avatar
      char: ipmi: handle HAS_IOPORT dependencies · c5c76d80
      Niklas Schnelle authored
      In a future patch HAS_IOPORT=n will disable inb()/outb() and friends at
      compile time. We thus need to add this dependency and ifdef sections of
      code using inb()/outb() as alternative access methods.
      Acked-by: default avatarCorey Minyard <cminyard@mvista.com>
      Co-developed-by: default avatarArnd Bergmann <arnd@kernel.org>
      Signed-off-by: default avatarArnd Bergmann <arnd@kernel.org>
      Signed-off-by: default avatarNiklas Schnelle <schnelle@linux.ibm.com>
      Message-Id: <20240404104506.3352637-2-schnelle@linux.ibm.com>
      Signed-off-by: default avatarCorey Minyard <minyard@acm.org>
      c5c76d80
    • Allen Pais's avatar
      ipmi: Convert from tasklet to BH workqueue · a9b5bb5c
      Allen Pais authored
      The only generic interface to execute asynchronously in the BH context is
      tasklet; however, it's marked deprecated and has some design flaws. To
      replace tasklets, BH workqueue support was recently added. A BH workqueue
      behaves similarly to regular workqueues except that the queued work items
      are executed in the BH context.
      
      This patch converts drivers/char/ipmi/* from tasklet to BH workqueue.
      
      Based on the work done by Tejun Heo <tj@kernel.org>
      Branch: https://git.kernel.org/pub/scm/linux/kernel/git/tj/wq.git for-6.10
      Signed-off-by: default avatarAllen Pais <allen.lkml@gmail.com>
      Message-Id: <20240327160314.9982-7-apais@linux.microsoft.com>
      [Removed a duplicate include of workqueue.h]
      Signed-off-by: default avatarCorey Minyard <minyard@acm.org>
      a9b5bb5c
  2. 28 Mar, 2024 1 commit
  3. 27 Mar, 2024 7 commits
    • Linus Torvalds's avatar
      Merge tag '9p-fixes-for-6.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/ericvh/v9fs · 4076fa16
      Linus Torvalds authored
      Pull 9p fixes from Eric Van Hensbergen:
       "Two of these fix syzbot reported issues, and the other fixes a unused
        variable in some configurations"
      
      * tag '9p-fixes-for-6.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/ericvh/v9fs:
        fs/9p: fix uninitialized values during inode evict
        fs/9p: remove redundant pointer v9ses
        fs/9p: fix uaf in in v9fs_stat2inode_dotl
      4076fa16
    • Linus Torvalds's avatar
      Merge tag 'for-6.9-rc1-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux · 400dd456
      Linus Torvalds authored
      Pull btrfs fixes from David Sterba:
      
       - fix race when reading extent buffer and 'uptodate' status is missed
         by one thread (introduced in 6.5)
      
       - do additional validation of devices using major:minor numbers
      
       - zoned mode fixes:
           - use zone-aware super block access during scrub
           - fix use-after-free during device replace (found by KASAN)
           - also delete zones that are 100% unusable to reclaim space
      
       - extent unpinning fixes:
           - fix extent map leak after error handling
           - print correct range in error message
      
       - error code and message updates
      
      * tag 'for-6.9-rc1-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux:
        btrfs: fix race in read_extent_buffer_pages()
        btrfs: return accurate error code on open failure in open_fs_devices()
        btrfs: zoned: don't skip block groups with 100% zone unusable
        btrfs: use btrfs_warn() to log message at btrfs_add_extent_mapping()
        btrfs: fix message not properly printing interval when adding extent map
        btrfs: fix warning messages not printing interval at unpin_extent_range()
        btrfs: fix extent map leak in unexpected scenario at unpin_extent_cache()
        btrfs: validate device maj:min during open
        btrfs: zoned: fix use-after-free in do_zone_finish()
        btrfs: zoned: use zone aware sb location for scrub
      400dd456
    • Linus Torvalds's avatar
      Merge tag 'mm-hotfixes-stable-2024-03-27-11-25' of... · dc189b8e
      Linus Torvalds authored
      Merge tag 'mm-hotfixes-stable-2024-03-27-11-25' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
      
      Pull misc fixes from Andrew Morton:
       "Various hotfixes. About half are cc:stable and the remainder address
        post-6.8 issues or aren't considered suitable for backporting.
      
        zswap figures prominently in the post-6.8 issues - folloup against the
        large amount of changes we have just made to that code.
      
        Apart from that, all over the map"
      
      * tag 'mm-hotfixes-stable-2024-03-27-11-25' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm: (21 commits)
        crash: use macro to add crashk_res into iomem early for specific arch
        mm: zswap: fix data loss on SWP_SYNCHRONOUS_IO devices
        selftests/mm: fix ARM related issue with fork after pthread_create
        hexagon: vmlinux.lds.S: handle attributes section
        userfaultfd: fix deadlock warning when locking src and dst VMAs
        tmpfs: fix race on handling dquot rbtree
        selftests/mm: sigbus-wp test requires UFFD_FEATURE_WP_HUGETLBFS_SHMEM
        mm: zswap: fix writeback shinker GFP_NOIO/GFP_NOFS recursion
        ARM: prctl: reject PR_SET_MDWE on pre-ARMv6
        prctl: generalize PR_SET_MDWE support check to be per-arch
        MAINTAINERS: remove incorrect M: tag for dm-devel@lists.linux.dev
        mm: zswap: fix kernel BUG in sg_init_one
        selftests: mm: restore settings from only parent process
        tools/Makefile: remove cgroup target
        mm: cachestat: fix two shmem bugs
        mm: increase folio batch size
        mm,page_owner: fix recursion
        mailmap: update entry for Leonard Crestez
        init: open /initrd.image with O_LARGEFILE
        selftests/mm: Fix build with _FORTIFY_SOURCE
        ...
      dc189b8e
    • Linus Torvalds's avatar
      Merge tag 'probes-fixes-v6.9-rc1' of... · 96249052
      Linus Torvalds authored
      Merge tag 'probes-fixes-v6.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace
      
      Pull probes fixlet from Masami Hiramatsu:
      
       - tracing/probes: initialize a 'val' local variable with zero.
      
         This variable is read by FETCH_OP_ST_EDATA in a loop, and is
         initialized by FETCH_OP_ARG in the same loop. Since this
         initialization is not obvious, smatch warns about it.
      
         Explicitly initializing 'val' with zero fixes this warning.
      
      * tag 'probes-fixes-v6.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace:
        tracing: probes: Fix to zero initialize a local variable
      96249052
    • Linus Torvalds's avatar
      Merge tag 'execve-v6.9-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux · f4a43291
      Linus Torvalds authored
      Pull execve fixes from Kees Cook:
      
       - Fix selftests to conform to the TAP output format (Muhammad Usama
         Anjum)
      
       - Fix NOMMU linux_binprm::exec pointer in auxv (Max Filippov)
      
       - Replace deprecated strncpy usage (Justin Stitt)
      
       - Replace another /bin/sh instance in selftests
      
      * tag 'execve-v6.9-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux:
        binfmt: replace deprecated strncpy
        exec: Fix NOMMU linux_binprm::exec in transfer_args_to_stack()
        selftests/exec: Convert remaining /bin/sh to /bin/bash
        selftests/exec: execveat: Improve debug reporting
        selftests/exec: recursion-depth: conform test to TAP format output
        selftests/exec: load_address: conform test to TAP format output
        selftests/exec: binfmt_script: Add the overall result line according to TAP
      f4a43291
    • Linus Torvalds's avatar
      Fix build errors due to new UIO_MEM_DMA_COHERENT mess · 498e47cd
      Linus Torvalds authored
      Commit 576882ef ("uio: introduce UIO_MEM_DMA_COHERENT type")
      introduced a new use-case for 'struct uio_mem' where the 'mem' field now
      contains a kernel virtual address when 'memtype' is set to
      UIO_MEM_DMA_COHERENT.
      
      That in turn causes build errors, because 'mem' is of type
      'phys_addr_t', and a virtual address is a pointer type.  When the code
      just blindly uses cast to mix the two, it caused problems when
      phys_addr_t isn't the same size as a pointer - notably on 32-bit
      architectures with PHYS_ADDR_T_64BIT.
      
      The proper thing to do would probably be to use a union member, and not
      have any casts, and make the 'mem' member be a union of 'mem.physaddr'
      and 'mem.vaddr', based on 'memtype'.
      
      This is not that proper thing.  This is just fixing the ugly casts to be
      even uglier, but at least not cause build errors on 32-bit platforms
      with 64-bit physical addresses.
      Reported-by: default avatarGuenter Roeck <linux@roeck-us.net>
      Fixes: 576882ef ("uio: introduce UIO_MEM_DMA_COHERENT type")
      Fixes: 7722151e ("uio_pruss: UIO_MEM_DMA_COHERENT conversion")
      Fixes: 01994780 ("uio_dmem_genirq: UIO_MEM_DMA_COHERENT conversion")
      Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
      Cc: Chris Leech <cleech@redhat.com>
      Cc: Nilesh Javali <njavali@marvell.com>
      Cc: Christoph Hellwig <hch@lst.de>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linuxfoundation.org>
      498e47cd
    • Linus Torvalds's avatar
      Fix memory leak in posix_clock_open() · 5b4cdd9c
      Linus Torvalds authored
      If the clk ops.open() function returns an error, we don't release the
      pccontext we allocated for this clock.
      
      Re-organize the code slightly to make it all more obvious.
      Reported-by: default avatarRohit Keshri <rkeshri@redhat.com>
      Acked-by: default avatarOleg Nesterov <oleg@redhat.com>
      Fixes: 60c69466 ("posix-clock: introduce posix_clock_context concept")
      Cc: Jakub Kicinski <kuba@kernel.org>
      Cc: David S. Miller <davem@davemloft.net>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linuxfoundation.org>
      5b4cdd9c
  4. 26 Mar, 2024 25 commits