1. 08 1月, 2020 10 次提交
    • Y
      random: remove unnecessary unlikely() · 870e05b1
      Yangtao Li 提交于
      WARN_ON() already contains an unlikely(), so it's not necessary to use
      unlikely.
      Signed-off-by: NYangtao Li <tiny.windzz@gmail.com>
      Link: https://lore.kernel.org/r/20190607182517.28266-1-tiny.windzz@gmail.comSigned-off-by: NTheodore Ts'o <tytso@mit.edu>
      870e05b1
    • A
      random: remove kernel.random.read_wakeup_threshold · c95ea0c6
      Andy Lutomirski 提交于
      It has no effect any more, so remove it.  We can revert this if
      there is some user code that expects to be able to set this sysctl.
      Signed-off-by: NAndy Lutomirski <luto@kernel.org>
      Link: https://lore.kernel.org/r/a74ed2cf0b5a5451428a246a9239f5bc4e29358f.1577088521.git.luto@kernel.orgSigned-off-by: NTheodore Ts'o <tytso@mit.edu>
      c95ea0c6
    • A
      random: delete code to pull data into pools · 84df7cdf
      Andy Lutomirski 提交于
      There is no pool that pulls, so it was just dead code.
      Signed-off-by: NAndy Lutomirski <luto@kernel.org>
      Link: https://lore.kernel.org/r/4a05fe0c7a5c831389ef4aea51d24528ac8682c7.1577088521.git.luto@kernel.orgSigned-off-by: NTheodore Ts'o <tytso@mit.edu>
      84df7cdf
    • A
      random: remove the blocking pool · 90ea1c64
      Andy Lutomirski 提交于
      There is no longer any interface to read data from the blocking
      pool, so remove it.
      
      This enables quite a bit of code deletion, much of which will be
      done in subsequent patches.
      Signed-off-by: NAndy Lutomirski <luto@kernel.org>
      Link: https://lore.kernel.org/r/511225a224bf0a291149d3c0b8b45393cd03ab96.1577088521.git.luto@kernel.orgSigned-off-by: NTheodore Ts'o <tytso@mit.edu>
      90ea1c64
    • A
      random: make /dev/random be almost like /dev/urandom · 30c08efe
      Andy Lutomirski 提交于
      This patch changes the read semantics of /dev/random to be the same
      as /dev/urandom except that reads will block until the CRNG is
      ready.
      
      None of the cleanups that this enables have been done yet.  As a
      result, this gives a warning about an unused function.
      Signed-off-by: NAndy Lutomirski <luto@kernel.org>
      Link: https://lore.kernel.org/r/5e6ac8831c6cf2e56a7a4b39616d1732b2bdd06c.1577088521.git.luto@kernel.orgSigned-off-by: NTheodore Ts'o <tytso@mit.edu>
      30c08efe
    • A
      random: ignore GRND_RANDOM in getentropy(2) · 48446f19
      Andy Lutomirski 提交于
      The separate blocking pool is going away.  Start by ignoring
      GRND_RANDOM in getentropy(2).
      
      This should not materially break any API.  Any code that worked
      without this change should work at least as well with this change.
      Signed-off-by: NAndy Lutomirski <luto@kernel.org>
      Link: https://lore.kernel.org/r/705c5a091b63cc5da70c99304bb97e0109be0a26.1577088521.git.luto@kernel.orgSigned-off-by: NTheodore Ts'o <tytso@mit.edu>
      48446f19
    • A
    • A
      random: Add a urandom_read_nowait() for random APIs that don't warn · c6f1deb1
      Andy Lutomirski 提交于
      /dev/random and getrandom() never warn.  Split the meat of
      urandom_read() into urandom_read_nowarn() and leave the warning code
      in urandom_read().
      
      This has no effect on kernel behavior, but it makes subsequent
      patches more straightforward.  It also makes the fact that
      getrandom() never warns more obvious.
      Signed-off-by: NAndy Lutomirski <luto@kernel.org>
      Link: https://lore.kernel.org/r/c87ab200588de746431d9f916501ef11e5242b13.1577088521.git.luto@kernel.orgSigned-off-by: NTheodore Ts'o <tytso@mit.edu>
      c6f1deb1
    • A
      random: Don't wake crng_init_wait when crng_init == 1 · 4c8d0621
      Andy Lutomirski 提交于
      crng_init_wait is only used to wayt for crng_init to be set to 2, so
      there's no point to waking it when crng_init is set to 1.  Remove the
      unnecessary wake_up_interruptible() call.
      Signed-off-by: NAndy Lutomirski <luto@kernel.org>
      Link: https://lore.kernel.org/r/6fbc0bfcbfc1fa2c76fd574f5b6f552b11be7fde.1577088521.git.luto@kernel.orgSigned-off-by: NTheodore Ts'o <tytso@mit.edu>
      4c8d0621
    • S
      char/random: silence a lockdep splat with printk() · 1b710b1b
      Sergey Senozhatsky 提交于
      Sergey didn't like the locking order,
      
      uart_port->lock  ->  tty_port->lock
      
      uart_write (uart_port->lock)
        __uart_start
          pl011_start_tx
            pl011_tx_chars
              uart_write_wakeup
                tty_port_tty_wakeup
                  tty_port_default
                    tty_port_tty_get (tty_port->lock)
      
      but those code is so old, and I have no clue how to de-couple it after
      checking other locks in the splat. There is an onging effort to make all
      printk() as deferred, so until that happens, workaround it for now as a
      short-term fix.
      
      LTP: starting iogen01 (export LTPROOT; rwtest -N iogen01 -i 120s -s
      read,write -Da -Dv -n 2 500b:$TMPDIR/doio.f1.$$
      1000b:$TMPDIR/doio.f2.$$)
      WARNING: possible circular locking dependency detected
      ------------------------------------------------------
      doio/49441 is trying to acquire lock:
      ffff008b7cff7290 (&(&zone->lock)->rlock){..-.}, at: rmqueue+0x138/0x2050
      
      but task is already holding lock:
      60ff000822352818 (&pool->lock/1){-.-.}, at: start_flush_work+0xd8/0x3f0
      
        which lock already depends on the new lock.
      
        the existing dependency chain (in reverse order) is:
      
        -> #4 (&pool->lock/1){-.-.}:
             lock_acquire+0x320/0x360
             _raw_spin_lock+0x64/0x80
             __queue_work+0x4b4/0xa10
             queue_work_on+0xac/0x11c
             tty_schedule_flip+0x84/0xbc
             tty_flip_buffer_push+0x1c/0x28
             pty_write+0x98/0xd0
             n_tty_write+0x450/0x60c
             tty_write+0x338/0x474
             __vfs_write+0x88/0x214
             vfs_write+0x12c/0x1a4
             redirected_tty_write+0x90/0xdc
             do_loop_readv_writev+0x140/0x180
             do_iter_write+0xe0/0x10c
             vfs_writev+0x134/0x1cc
             do_writev+0xbc/0x130
             __arm64_sys_writev+0x58/0x8c
             el0_svc_handler+0x170/0x240
             el0_sync_handler+0x150/0x250
             el0_sync+0x164/0x180
      
        -> #3 (&(&port->lock)->rlock){-.-.}:
             lock_acquire+0x320/0x360
             _raw_spin_lock_irqsave+0x7c/0x9c
             tty_port_tty_get+0x24/0x60
             tty_port_default_wakeup+0x1c/0x3c
             tty_port_tty_wakeup+0x34/0x40
             uart_write_wakeup+0x28/0x44
             pl011_tx_chars+0x1b8/0x270
             pl011_start_tx+0x24/0x70
             __uart_start+0x5c/0x68
             uart_write+0x164/0x1c8
             do_output_char+0x33c/0x348
             n_tty_write+0x4bc/0x60c
             tty_write+0x338/0x474
             redirected_tty_write+0xc0/0xdc
             do_loop_readv_writev+0x140/0x180
             do_iter_write+0xe0/0x10c
             vfs_writev+0x134/0x1cc
             do_writev+0xbc/0x130
             __arm64_sys_writev+0x58/0x8c
             el0_svc_handler+0x170/0x240
             el0_sync_handler+0x150/0x250
             el0_sync+0x164/0x180
      
        -> #2 (&port_lock_key){-.-.}:
             lock_acquire+0x320/0x360
             _raw_spin_lock+0x64/0x80
             pl011_console_write+0xec/0x2cc
             console_unlock+0x794/0x96c
             vprintk_emit+0x260/0x31c
             vprintk_default+0x54/0x7c
             vprintk_func+0x218/0x254
             printk+0x7c/0xa4
             register_console+0x734/0x7b0
             uart_add_one_port+0x734/0x834
             pl011_register_port+0x6c/0xac
             sbsa_uart_probe+0x234/0x2ec
             platform_drv_probe+0xd4/0x124
             really_probe+0x250/0x71c
             driver_probe_device+0xb4/0x200
             __device_attach_driver+0xd8/0x188
             bus_for_each_drv+0xbc/0x110
             __device_attach+0x120/0x220
             device_initial_probe+0x20/0x2c
             bus_probe_device+0x54/0x100
             device_add+0xae8/0xc2c
             platform_device_add+0x278/0x3b8
             platform_device_register_full+0x238/0x2ac
             acpi_create_platform_device+0x2dc/0x3a8
             acpi_bus_attach+0x390/0x3cc
             acpi_bus_attach+0x108/0x3cc
             acpi_bus_attach+0x108/0x3cc
             acpi_bus_attach+0x108/0x3cc
             acpi_bus_scan+0x7c/0xb0
             acpi_scan_init+0xe4/0x304
             acpi_init+0x100/0x114
             do_one_initcall+0x348/0x6a0
             do_initcall_level+0x190/0x1fc
             do_basic_setup+0x34/0x4c
             kernel_init_freeable+0x19c/0x260
             kernel_init+0x18/0x338
             ret_from_fork+0x10/0x18
      
        -> #1 (console_owner){-...}:
             lock_acquire+0x320/0x360
             console_lock_spinning_enable+0x6c/0x7c
             console_unlock+0x4f8/0x96c
             vprintk_emit+0x260/0x31c
             vprintk_default+0x54/0x7c
             vprintk_func+0x218/0x254
             printk+0x7c/0xa4
             get_random_u64+0x1c4/0x1dc
             shuffle_pick_tail+0x40/0xac
             __free_one_page+0x424/0x710
             free_one_page+0x70/0x120
             __free_pages_ok+0x61c/0xa94
             __free_pages_core+0x1bc/0x294
             memblock_free_pages+0x38/0x48
             __free_pages_memory+0xcc/0xfc
             __free_memory_core+0x70/0x78
             free_low_memory_core_early+0x148/0x18c
             memblock_free_all+0x18/0x54
             mem_init+0xb4/0x17c
             mm_init+0x14/0x38
             start_kernel+0x19c/0x530
      
        -> #0 (&(&zone->lock)->rlock){..-.}:
             validate_chain+0xf6c/0x2e2c
             __lock_acquire+0x868/0xc2c
             lock_acquire+0x320/0x360
             _raw_spin_lock+0x64/0x80
             rmqueue+0x138/0x2050
             get_page_from_freelist+0x474/0x688
             __alloc_pages_nodemask+0x3b4/0x18dc
             alloc_pages_current+0xd0/0xe0
             alloc_slab_page+0x2b4/0x5e0
             new_slab+0xc8/0x6bc
             ___slab_alloc+0x3b8/0x640
             kmem_cache_alloc+0x4b4/0x588
             __debug_object_init+0x778/0x8b4
             debug_object_init_on_stack+0x40/0x50
             start_flush_work+0x16c/0x3f0
             __flush_work+0xb8/0x124
             flush_work+0x20/0x30
             xlog_cil_force_lsn+0x88/0x204 [xfs]
             xfs_log_force_lsn+0x128/0x1b8 [xfs]
             xfs_file_fsync+0x3c4/0x488 [xfs]
             vfs_fsync_range+0xb0/0xd0
             generic_write_sync+0x80/0xa0 [xfs]
             xfs_file_buffered_aio_write+0x66c/0x6e4 [xfs]
             xfs_file_write_iter+0x1a0/0x218 [xfs]
             __vfs_write+0x1cc/0x214
             vfs_write+0x12c/0x1a4
             ksys_write+0xb0/0x120
             __arm64_sys_write+0x54/0x88
             el0_svc_handler+0x170/0x240
             el0_sync_handler+0x150/0x250
             el0_sync+0x164/0x180
      
             other info that might help us debug this:
      
       Chain exists of:
         &(&zone->lock)->rlock --> &(&port->lock)->rlock --> &pool->lock/1
      
       Possible unsafe locking scenario:
      
             CPU0                    CPU1
             ----                    ----
        lock(&pool->lock/1);
                                     lock(&(&port->lock)->rlock);
                                     lock(&pool->lock/1);
        lock(&(&zone->lock)->rlock);
      
                      *** DEADLOCK ***
      
      4 locks held by doio/49441:
       #0: a0ff00886fc27408 (sb_writers#8){.+.+}, at: vfs_write+0x118/0x1a4
       #1: 8fff00080810dfe0 (&xfs_nondir_ilock_class){++++}, at:
      xfs_ilock+0x2a8/0x300 [xfs]
       #2: ffff9000129f2390 (rcu_read_lock){....}, at:
      rcu_lock_acquire+0x8/0x38
       #3: 60ff000822352818 (&pool->lock/1){-.-.}, at:
      start_flush_work+0xd8/0x3f0
      
                     stack backtrace:
      CPU: 48 PID: 49441 Comm: doio Tainted: G        W
      Hardware name: HPE Apollo 70             /C01_APACHE_MB         , BIOS
      L50_5.13_1.11 06/18/2019
      Call trace:
       dump_backtrace+0x0/0x248
       show_stack+0x20/0x2c
       dump_stack+0xe8/0x150
       print_circular_bug+0x368/0x380
       check_noncircular+0x28c/0x294
       validate_chain+0xf6c/0x2e2c
       __lock_acquire+0x868/0xc2c
       lock_acquire+0x320/0x360
       _raw_spin_lock+0x64/0x80
       rmqueue+0x138/0x2050
       get_page_from_freelist+0x474/0x688
       __alloc_pages_nodemask+0x3b4/0x18dc
       alloc_pages_current+0xd0/0xe0
       alloc_slab_page+0x2b4/0x5e0
       new_slab+0xc8/0x6bc
       ___slab_alloc+0x3b8/0x640
       kmem_cache_alloc+0x4b4/0x588
       __debug_object_init+0x778/0x8b4
       debug_object_init_on_stack+0x40/0x50
       start_flush_work+0x16c/0x3f0
       __flush_work+0xb8/0x124
       flush_work+0x20/0x30
       xlog_cil_force_lsn+0x88/0x204 [xfs]
       xfs_log_force_lsn+0x128/0x1b8 [xfs]
       xfs_file_fsync+0x3c4/0x488 [xfs]
       vfs_fsync_range+0xb0/0xd0
       generic_write_sync+0x80/0xa0 [xfs]
       xfs_file_buffered_aio_write+0x66c/0x6e4 [xfs]
       xfs_file_write_iter+0x1a0/0x218 [xfs]
       __vfs_write+0x1cc/0x214
       vfs_write+0x12c/0x1a4
       ksys_write+0xb0/0x120
       __arm64_sys_write+0x54/0x88
       el0_svc_handler+0x170/0x240
       el0_sync_handler+0x150/0x250
       el0_sync+0x164/0x180
      Reviewed-by: NSergey Senozhatsky <sergey.senozhatsky.work@gmail.com>
      Signed-off-by: NQian Cai <cai@lca.pw>
      Link: https://lore.kernel.org/r/1573679785-21068-1-git-send-email-cai@lca.pwSigned-off-by: NTheodore Ts'o <tytso@mit.edu>
      1b710b1b
  2. 23 12月, 2019 9 次提交
    • L
      Linux 5.5-rc3 · 46cf053e
      Linus Torvalds 提交于
      46cf053e
    • L
      Merge branch 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs · 9efa3ed5
      Linus Torvalds 提交于
      Pull vfs fixes from Al Viro:
       "Eric's s_inodes softlockup fixes + Jan's fix for recent regression
        from pipe rework"
      
      * 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs:
        fs: call fsnotify_sb_delete after evict_inodes
        fs: avoid softlockups in s_inodes iterators
        pipe: Fix bogus dereference in iov_iter_alignment()
      9efa3ed5
    • L
      Merge tag 'xfs-5.5-fixes-2' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux · c6017471
      Linus Torvalds 提交于
      Pull xfs fixes from Darrick Wong:
       "Fix a few bugs that could lead to corrupt files, fsck complaints, and
        filesystem crashes:
      
         - Minor documentation fixes
      
         - Fix a file corruption due to read racing with an insert range
           operation.
      
         - Fix log reservation overflows when allocating large rt extents
      
         - Fix a buffer log item flags check
      
         - Don't allow administrators to mount with sunit= options that will
           cause later xfs_repair complaints about the root directory being
           suspicious because the fs geometry appeared inconsistent
      
         - Fix a non-static helper that should have been static"
      
      * tag 'xfs-5.5-fixes-2' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux:
        xfs: Make the symbol 'xfs_rtalloc_log_count' static
        xfs: don't commit sunit/swidth updates to disk if that would cause repair failures
        xfs: split the sunit parameter update into two parts
        xfs: refactor agfl length computation function
        libxfs: resync with the userspace libxfs
        xfs: use bitops interface for buf log item AIL flag check
        xfs: fix log reservation overflows when allocating large rt extents
        xfs: stabilize insert range start boundary to avoid COW writeback race
        xfs: fix Sphinx documentation warning
      c6017471
    • L
      Merge tag 'ext4_for_linus_stable' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4 · a3965607
      Linus Torvalds 提交于
      Pull ext4 bug fixes from Ted Ts'o:
       "Ext4 bug fixes, including a regression fix"
      
      * tag 'ext4_for_linus_stable' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4:
        ext4: clarify impact of 'commit' mount option
        ext4: fix unused-but-set-variable warning in ext4_add_entry()
        jbd2: fix kernel-doc notation warning
        ext4: use RCU API in debug_print_tree
        ext4: validate the debug_want_extra_isize mount option at parse time
        ext4: reserve revoke credits in __ext4_new_inode
        ext4: unlock on error in ext4_expand_extra_isize()
        ext4: optimize __ext4_check_dir_entry()
        ext4: check for directory entries too close to block end
        ext4: fix ext4_empty_dir() for directories with holes
      a3965607
    • L
      Merge tag 'block-5.5-20191221' of git://git.kernel.dk/linux-block · 44579f35
      Linus Torvalds 提交于
      Pull block fixes from Jens Axboe:
       "Let's try this one again, this time without the compat_ioctl changes.
        We've got those fixed up, but that can go out next week.
      
        This contains:
      
         - block queue flush lockdep annotation (Bart)
      
         - Type fix for bsg_queue_rq() (Bart)
      
         - Three dasd fixes (Stefan, Jan)
      
         - nbd deadlock fix (Mike)
      
         - Error handling bio user map fix (Yang)
      
         - iocost fix (Tejun)
      
         - sbitmap waitqueue addition fix that affects the kyber IO scheduler
           (David)"
      
      * tag 'block-5.5-20191221' of git://git.kernel.dk/linux-block:
        sbitmap: only queue kyber's wait callback if not already active
        block: fix memleak when __blk_rq_map_user_iov() is failed
        s390/dasd: fix typo in copyright statement
        s390/dasd: fix memleak in path handling error case
        s390/dasd/cio: Interpret ccw_device_get_mdc return value correctly
        block: Fix a lockdep complaint triggered by request queue flushing
        block: Fix the type of 'sts' in bsg_queue_rq()
        block: end bio with BLK_STS_AGAIN in case of non-mq devs and REQ_NOWAIT
        nbd: fix shutdown and recv work deadlock v2
        iocost: over-budget forced IOs should schedule async delay
      44579f35
    • L
      Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm · a313c8e0
      Linus Torvalds 提交于
      Pull KVM fixes from Paolo Bonzini:
       "PPC:
         - Fix a bug where we try to do an ultracall on a system without an
           ultravisor
      
        KVM:
         - Fix uninitialised sysreg accessor
         - Fix handling of demand-paged device mappings
         - Stop spamming the console on IMPDEF sysregs
         - Relax mappings of writable memslots
         - Assorted cleanups
      
        MIPS:
         - Now orphan, James Hogan is stepping down
      
        x86:
         - MAINTAINERS change, so long Radim and thanks for all the fish
         - supported CPUID fixes for AMD machines without SPEC_CTRL"
      
      * tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm:
        MAINTAINERS: remove Radim from KVM maintainers
        MAINTAINERS: Orphan KVM for MIPS
        kvm: x86: Host feature SSBD doesn't imply guest feature AMD_SSBD
        kvm: x86: Host feature SSBD doesn't imply guest feature SPEC_CTRL_SSBD
        KVM: PPC: Book3S HV: Don't do ultravisor calls on systems without ultravisor
        KVM: arm/arm64: Properly handle faulting of device mappings
        KVM: arm64: Ensure 'params' is initialised when looking up sys register
        KVM: arm/arm64: Remove excessive permission check in kvm_arch_prepare_memory_region
        KVM: arm64: Don't log IMP DEF sysreg traps
        KVM: arm64: Sanely ratelimit sysreg messages
        KVM: arm/arm64: vgic: Use wrapper function to lock/unlock all vcpus in kvm_vgic_create()
        KVM: arm/arm64: vgic: Fix potential double free dist->spis in __kvm_vgic_destroy()
        KVM: arm/arm64: Get rid of unused arg in cpu_init_hyp_mode()
      a313c8e0
    • L
      Merge tag 'riscv/for-v5.5-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux · 7214618c
      Linus Torvalds 提交于
      Pull RISC-V fixes from Paul Walmsley:
       "Several fixes, and one cleanup, for RISC-V.
      
        Fixes:
      
         - Fix an error in a Kconfig file that resulted in an undefined
           Kconfig option "CONFIG_CONFIG_MMU"
      
         - Fix undefined Kconfig option "CONFIG_CONFIG_MMU"
      
         - Fix scratch register clearing in M-mode (affects nommu users)
      
         - Fix a mismerge on my part that broke the build for
           CONFIG_SPARSEMEM_VMEMMAP users
      
        Cleanup:
      
         - Move SiFive L2 cache-related code to drivers/soc, per request"
      
      * tag 'riscv/for-v5.5-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux:
        riscv: move sifive_l2_cache.c to drivers/soc
        riscv: define vmemmap before pfn_to_page calls
        riscv: fix scratch register clearing in M-mode.
        riscv: Fix use of undefined config option CONFIG_CONFIG_MMU
      7214618c
    • L
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net · 78bac77b
      Linus Torvalds 提交于
      Pull networking fixes from David Miller:
      
       1) Several nf_flow_table_offload fixes from Pablo Neira Ayuso,
          including adding a missing ipv6 match description.
      
       2) Several heap overflow fixes in mwifiex from qize wang and Ganapathi
          Bhat.
      
       3) Fix uninit value in bond_neigh_init(), from Eric Dumazet.
      
       4) Fix non-ACPI probing of nxp-nci, from Stephan Gerhold.
      
       5) Fix use after free in tipc_disc_rcv(), from Tuong Lien.
      
       6) Enforce limit of 33 tail calls in mips and riscv JIT, from Paul
          Chaignon.
      
       7) Multicast MAC limit test is off by one in qede, from Manish Chopra.
      
       8) Fix established socket lookup race when socket goes from
          TCP_ESTABLISHED to TCP_LISTEN, because there lacks an intervening
          RCU grace period. From Eric Dumazet.
      
       9) Don't send empty SKBs from tcp_write_xmit(), also from Eric Dumazet.
      
      10) Fix active backup transition after link failure in bonding, from
          Mahesh Bandewar.
      
      11) Avoid zero sized hash table in gtp driver, from Taehee Yoo.
      
      12) Fix wrong interface passed to ->mac_link_up(), from Russell King.
      
      13) Fix DSA egress flooding settings in b53, from Florian Fainelli.
      
      14) Memory leak in gmac_setup_txqs(), from Navid Emamdoost.
      
      15) Fix double free in dpaa2-ptp code, from Ioana Ciornei.
      
      16) Reject invalid MTU values in stmmac, from Jose Abreu.
      
      17) Fix refcount leak in error path of u32 classifier, from Davide
          Caratti.
      
      18) Fix regression causing iwlwifi firmware crashes on boot, from Anders
          Kaseorg.
      
      19) Fix inverted return value logic in llc2 code, from Chan Shu Tak.
      
      20) Disable hardware GRO when XDP is attached to qede, frm Manish
          Chopra.
      
      21) Since we encode state in the low pointer bits, dst metrics must be
          at least 4 byte aligned, which is not necessarily true on m68k. Add
          annotations to fix this, from Geert Uytterhoeven.
      
      * git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net: (160 commits)
        sfc: Include XDP packet headroom in buffer step size.
        sfc: fix channel allocation with brute force
        net: dst: Force 4-byte alignment of dst_metrics
        selftests: pmtu: fix init mtu value in description
        hv_netvsc: Fix unwanted rx_table reset
        net: phy: ensure that phy IDs are correctly typed
        mod_devicetable: fix PHY module format
        qede: Disable hardware gro when xdp prog is installed
        net: ena: fix issues in setting interrupt moderation params in ethtool
        net: ena: fix default tx interrupt moderation interval
        net/smc: unregister ib devices in reboot_event
        net: stmmac: platform: Fix MDIO init for platforms without PHY
        llc2: Fix return statement of llc_stat_ev_rx_null_dsap_xid_c (and _test_c)
        net: hisilicon: Fix a BUG trigered by wrong bytes_compl
        net: dsa: ksz: use common define for tag len
        s390/qeth: don't return -ENOTSUPP to userspace
        s390/qeth: fix promiscuous mode after reset
        s390/qeth: handle error due to unsupported transport mode
        cxgb4: fix refcount init for TC-MQPRIO offload
        tc-testing: initial tdc selftests for cls_u32
        ...
      78bac77b
    • J
      pipe: fix empty pipe check in pipe_write() · 0dd1e377
      Jan Stancek 提交于
      LTP pipeio_1 test is hanging with v5.5-rc2-385-gb8e382a1,
      with read side observing empty pipe and sleeping and write
      side running out of space and then sleeping as well. In this
      scenario there are 5 writers and 1 reader.
      
      Problem is that after pipe_write() reacquires pipe lock, it
      re-checks for empty pipe with potentially stale 'head' and
      doesn't wake up read side anymore. pipe->tail can advance
      beyond 'head', because there are multiple writers.
      
      Use pipe->head for empty pipe check after reacquiring lock
      to observe current state.
      
      Testing: With patch, LTP pipeio_1 ran successfully in loop for 1 hour.
               Without patch it hanged within a minute.
      
      Fixes: 1b6b26ae ("pipe: fix and clarify pipe write wakeup logic")
      Reported-by: NRachel Sibley <rasibley@redhat.com>
      Signed-off-by: NJan Stancek <jstancek@redhat.com>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      0dd1e377
  3. 22 12月, 2019 14 次提交
  4. 21 12月, 2019 7 次提交
    • M
      kbuild: clarify the difference between obj-y and obj-m w.r.t. descending · 28f94a44
      Masahiro Yamada 提交于
      Kbuild descends into a directory by either 'y' or 'm', but there is an
      important difference.
      
      Kbuild combines the built-in objects into built-in.a in each directory.
      The built-in.a in the directory visited by obj-y is merged into the
      built-in.a in the parent directory. This merge happens recursively
      when Kbuild is ascending back towards the top directory, then built-in
      objects are linked into vmlinux eventually. This works properly only
      when the Makefile specifying obj-y is reachable by the chain of obj-y.
      
      On the other hand, Kbuild does not take built-in.a from the directory
      visited by obj-m. This it, all the objects in that directory are
      supposed to be modular. If Kbuild descends into a directory by obj-m,
      but the Makefile in the sub-directory specifies obj-y, those objects
      are just left orphan.
      
      The current statement "Kbuild only uses this information to decide that
      it needs to visit the directory" is misleading. Clarify the difference.
      Reported-by: NJohan Hovold <johan@kernel.org>
      Signed-off-by: NMasahiro Yamada <masahiroy@kernel.org>
      Reviewed-by: NJohan Hovold <johan@kernel.org>
      28f94a44
    • L
      Merge branch 'parisc-5.5-2' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux · 62104694
      Linus Torvalds 提交于
      Pul parisc fixes from Helge Deller:
       "Two build error fixes, one for the soft_offline_page() parameter
        change and one for a specific KEXEC/KEXEC_FILE configuration, as well
        as a compiler and a linker warning fix"
      
      * 'parisc-5.5-2' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux:
        parisc: Fix compiler warnings in debug_core.c
        parisc: soft_offline_page() now takes the pfn
        parisc: add missing __init annotation
        parisc: fix compilation when KEXEC=n and KEXEC_FILE=y
      62104694
    • L
      Merge tag 'for-linus-5.5b-rc3-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip · 62af608b
      Linus Torvalds 提交于
      Pull xen fixes from Juergen Gross:
       "This contains two cleanup patches and a small series for supporting
        reloading the Xen block backend driver"
      
      * tag 'for-linus-5.5b-rc3-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip:
        xen/grant-table: remove multiple BUG_ON on gnttab_interface
        xen-blkback: support dynamic unbind/bind
        xen/interface: re-define FRONT/BACK_RING_ATTACH()
        xenbus: limit when state is forced to closed
        xenbus: move xenbus_dev_shutdown() into frontend code...
        xen/blkfront: Adjust indentation in xlvbd_alloc_gendisk
      62af608b
    • L
      Merge tag 'powerpc-5.5-4' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux · 6d04182d
      Linus Torvalds 提交于
      Pull powerpc fixes from Michael Ellerman:
       "Two weeks worth of accumulated fixes:
      
         - A fix for a performance regression seen on PowerVM LPARs using
           dedicated CPUs, caused by our vcpu_is_preempted() returning true
           even for idle CPUs.
      
         - One of the ultravisor support patches broke KVM on big endian hosts
           in v5.4.
      
         - Our KUAP (Kernel User Access Prevention) code missed allowing
           access in __clear_user(), which could lead to an oops or erroneous
           SEGV when triggered via PTRACE_GETREGSET.
      
         - Two fixes for the ocxl driver, an open/remove race, and a memory
           leak in an error path.
      
         - A handful of other small fixes.
      
        Thanks to: Andrew Donnellan, Christian Zigotzky, Christophe Leroy,
        Christoph Hellwig, Daniel Axtens, David Hildenbrand, Frederic Barrat,
        Gautham R. Shenoy, Greg Kurz, Ihor Pasichnyk, Juri Lelli, Marcus
        Comstedt, Mike Rapoport, Parth Shah, Srikar Dronamraju, Vaidyanathan
        Srinivasan"
      
      * tag 'powerpc-5.5-4' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux:
        KVM: PPC: Book3S HV: Fix regression on big endian hosts
        powerpc: Fix __clear_user() with KUAP enabled
        powerpc/pseries/cmm: fix managed page counts when migrating pages between zones
        powerpc/8xx: fix bogus __init on mmu_mapin_ram_chunk()
        ocxl: Fix potential memory leak on context creation
        powerpc/irq: fix stack overflow verification
        powerpc: Ensure that swiotlb buffer is allocated from low memory
        powerpc/shared: Use static key to detect shared processor
        powerpc/vcpu: Assume dedicated processors as non-preempt
        ocxl: Fix concurrent AFU open and device removal
      6d04182d
    • L
      Merge branch 'ras-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 5c741e25
      Linus Torvalds 提交于
      Pull x86 RAS fixes from Borislav Petkov:
       "Three urgent RAS fixes for the AMD side of things:
      
         - initialize struct mce.bank so that calculated error severity on AMD
           SMCA machines is correct
      
         - do not send IPIs early during bank initialization, when interrupts
           are disabled
      
         - a fix for when only a subset of MCA banks are enabled, which led to
           boot hangs on some new AMD CPUs"
      
      * 'ras-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        x86/mce: Fix possibly incorrect severity calculation on AMD
        x86/MCE/AMD: Allow Reserved types to be overwritten in smca_banks[]
        x86/MCE/AMD: Do not use rdmsr_safe_on_cpu() in smca_configure()
      5c741e25
    • L
      Merge tag 'clk-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux · 12ac9a08
      Linus Torvalds 提交于
      Pull clk fixes from Stephen Boyd:
       "One core framework fix to walk the orphan list and match up clks to
        parents when clk providers register the DT provider after registering
        all their clks (as they should).
      
        Then a handful of driver fixes for the qcom, imx, and at91 drivers.
      
        The driver fixes are relatively small fixes for incorrect register
        settings or missing locks causing race conditions"
      
      * tag 'clk-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux:
        clk: qcom: Avoid SMMU/cx gdsc corner cases
        clk: qcom: gcc-sc7180: Fix setting flag for votable GDSCs
        clk: Move clk_core_reparent_orphans() under CONFIG_OF
        clk: at91: fix possible deadlock
        clk: walk orphan list on clock provider registration
        clk: imx: pll14xx: fix clk_pll14xx_wait_lock
        clk: imx: clk-imx7ulp: Add missing sentinel of ulp_div_table
        clk: imx: clk-composite-8m: add lock to gate/mux
      12ac9a08
    • D
      Merge branch 'sfc-fix-bugs-introduced-by-XDP-patches' · 4bfeadfc
      David S. Miller 提交于
      Edward Cree says:
      
      ====================
      sfc: fix bugs introduced by XDP patches
      
      Two fixes for bugs introduced by the XDP support in the sfc driver.
      ====================
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      4bfeadfc