1. 04 1月, 2023 2 次提交
  2. 21 12月, 2022 1 次提交
  3. 20 12月, 2022 4 次提交
    • J
      efi: random: fix NULL-deref when refreshing seed · 41a15855
      Johan Hovold 提交于
      Do not try to refresh the RNG seed in case the firmware does not support
      setting variables.
      
      This is specifically needed to prevent a NULL-pointer dereference on the
      Lenovo X13s with some firmware revisions, or more generally, whenever
      the runtime services have been disabled (e.g. efi=noruntime or with
      PREEMPT_RT).
      
      Fixes: e7b813b3 ("efi: random: refresh non-volatile random seed when RNG is initialized")
      Reported-by: NSteev Klimaszewski <steev@kali.org>
      Reported-by: NBjorn Andersson <andersson@kernel.org>
      Tested-by: NSteev Klimaszewski <steev@kali.org>
      Tested-by: Andrew Halaney <ahalaney@redhat.com> # sc8280xp-lenovo-thinkpad-x13s
      Signed-off-by: NJohan Hovold <johan+linaro@kernel.org>
      Signed-off-by: NJason A. Donenfeld <Jason@zx2c4.com>
      41a15855
    • J
      random: do not include <asm/archrandom.h> from random.h · 6bb20c15
      Jason A. Donenfeld 提交于
      The <asm/archrandom.h> header is a random.c private detail, not
      something to be called by other code. As such, don't make it
      automatically available by way of random.h.
      
      Cc: Michael Ellerman <mpe@ellerman.id.au>
      Acked-by: NHeiko Carstens <hca@linux.ibm.com>
      Reviewed-by: NChristophe Leroy <christophe.leroy@csgroup.eu>
      Signed-off-by: NJason A. Donenfeld <Jason@zx2c4.com>
      6bb20c15
    • B
      Treewide: Stop corrupting socket's task_frag · 98123866
      Benjamin Coddington 提交于
      Since moving to memalloc_nofs_save/restore, SUNRPC has stopped setting the
      GFP_NOIO flag on sk_allocation which the networking system uses to decide
      when it is safe to use current->task_frag.  The results of this are
      unexpected corruption in task_frag when SUNRPC is involved in memory
      reclaim.
      
      The corruption can be seen in crashes, but the root cause is often
      difficult to ascertain as a crashing machine's stack trace will have no
      evidence of being near NFS or SUNRPC code.  I believe this problem to
      be much more pervasive than reports to the community may indicate.
      
      Fix this by having kernel users of sockets that may corrupt task_frag due
      to reclaim set sk_use_task_frag = false.  Preemptively correcting this
      situation for users that still set sk_allocation allows them to convert to
      memalloc_nofs_save/restore without the same unexpected corruptions that are
      sure to follow, unlikely to show up in testing, and difficult to bisect.
      
      CC: Philipp Reisner <philipp.reisner@linbit.com>
      CC: Lars Ellenberg <lars.ellenberg@linbit.com>
      CC: "Christoph Böhmwalder" <christoph.boehmwalder@linbit.com>
      CC: Jens Axboe <axboe@kernel.dk>
      CC: Josef Bacik <josef@toxicpanda.com>
      CC: Keith Busch <kbusch@kernel.org>
      CC: Christoph Hellwig <hch@lst.de>
      CC: Sagi Grimberg <sagi@grimberg.me>
      CC: Lee Duncan <lduncan@suse.com>
      CC: Chris Leech <cleech@redhat.com>
      CC: Mike Christie <michael.christie@oracle.com>
      CC: "James E.J. Bottomley" <jejb@linux.ibm.com>
      CC: "Martin K. Petersen" <martin.petersen@oracle.com>
      CC: Valentina Manea <valentina.manea.m@gmail.com>
      CC: Shuah Khan <shuah@kernel.org>
      CC: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
      CC: David Howells <dhowells@redhat.com>
      CC: Marc Dionne <marc.dionne@auristor.com>
      CC: Steve French <sfrench@samba.org>
      CC: Christine Caulfield <ccaulfie@redhat.com>
      CC: David Teigland <teigland@redhat.com>
      CC: Mark Fasheh <mark@fasheh.com>
      CC: Joel Becker <jlbec@evilplan.org>
      CC: Joseph Qi <joseph.qi@linux.alibaba.com>
      CC: Eric Van Hensbergen <ericvh@gmail.com>
      CC: Latchesar Ionkov <lucho@ionkov.net>
      CC: Dominique Martinet <asmadeus@codewreck.org>
      CC: Ilya Dryomov <idryomov@gmail.com>
      CC: Xiubo Li <xiubli@redhat.com>
      CC: Chuck Lever <chuck.lever@oracle.com>
      CC: Jeff Layton <jlayton@kernel.org>
      CC: Trond Myklebust <trond.myklebust@hammerspace.com>
      CC: Anna Schumaker <anna@kernel.org>
      CC: Steffen Klassert <steffen.klassert@secunet.com>
      CC: Herbert Xu <herbert@gondor.apana.org.au>
      Suggested-by: NGuillaume Nault <gnault@redhat.com>
      Signed-off-by: NBenjamin Coddington <bcodding@redhat.com>
      Reviewed-by: NGuillaume Nault <gnault@redhat.com>
      Signed-off-by: NJakub Kicinski <kuba@kernel.org>
      98123866
    • A
      net: dsa: microchip: remove IRQF_TRIGGER_FALLING in request_threaded_irq · 62e027fb
      Arun Ramadoss 提交于
      KSZ swithes used interrupts for detecting the phy link up and down.
      During registering the interrupt handler, it used IRQF_TRIGGER_FALLING
      flag. But this flag has to be retrieved from device tree instead of hard
      coding in the driver, so removing the flag.
      
      Fixes: ff319a64 ("net: dsa: microchip: move interrupt handling logic from lan937x to ksz_common")
      Reported-by: NChristian Eggers <ceggers@arri.de>
      Signed-off-by: NArun Ramadoss <arun.ramadoss@microchip.com>
      Link: https://lore.kernel.org/r/20221213101440.24667-1-arun.ramadoss@microchip.comSigned-off-by: NJakub Kicinski <kuba@kernel.org>
      62e027fb
  4. 19 12月, 2022 9 次提交
  5. 18 12月, 2022 1 次提交
    • S
      parisc: led: Fix potential null-ptr-deref in start_task() · 41f563ab
      Shang XiaoJing 提交于
      start_task() calls create_singlethread_workqueue() and not checked the
      ret value, which may return NULL. And a null-ptr-deref may happen:
      
      start_task()
          create_singlethread_workqueue() # failed, led_wq is NULL
          queue_delayed_work()
              queue_delayed_work_on()
                  __queue_delayed_work()  # warning here, but continue
                      __queue_work()      # access wq->flags, null-ptr-deref
      
      Check the ret value and return -ENOMEM if it is NULL.
      
      Fixes: 34994952 ("[PARISC] Use work queue in LED/LCD driver instead of tasklet.")
      Signed-off-by: NShang XiaoJing <shangxiaojing@huawei.com>
      Signed-off-by: NHelge Deller <deller@gmx.de>
      Cc: <stable@vger.kernel.org>
      41f563ab
  6. 17 12月, 2022 4 次提交
  7. 16 12月, 2022 18 次提交
  8. 15 12月, 2022 1 次提交
    • J
      RDMA/rxe: Fix compile warnings on 32-bit · 5fc24e60
      Jason Gunthorpe 提交于
      Move the conditional code into a function, with two varients so it is
      harder to make these kinds of mistakes.
      
       drivers/infiniband/sw/rxe/rxe_resp.c: In function 'atomic_write_reply':
       drivers/infiniband/sw/rxe/rxe_resp.c:794:13: error: unused variable 'payload' [-Werror=unused-variable]
         794 |         int payload = payload_size(pkt);
             |             ^~~~~~~
       drivers/infiniband/sw/rxe/rxe_resp.c:793:24: error: unused variable 'mr' [-Werror=unused-variable]
         793 |         struct rxe_mr *mr = qp->resp.mr;
             |                        ^~
       drivers/infiniband/sw/rxe/rxe_resp.c:791:19: error: unused variable 'dst' [-Werror=unused-variable]
         791 |         u64 src, *dst;
             |                   ^~~
       drivers/infiniband/sw/rxe/rxe_resp.c:791:13: error: unused variable 'src' [-Werror=unused-variable]
         791 |         u64 src, *dst;
      
      Fixes: 034e285f ("RDMA/rxe: Make responder support atomic write on RC service")
      Link: https://lore.kernel.org/linux-rdma/Y5s+EVE7eLWQqOwv@nvidia.com/Reported-by: NGuenter Roeck <linux@roeck-us.net>
      Signed-off-by: NJason Gunthorpe <jgg@nvidia.com>
      5fc24e60