1. 29 6月, 2018 2 次提交
  2. 28 6月, 2018 13 次提交
    • H
      parisc: Wire up io_pgetevents syscall · 2765b3ed
      Helge Deller 提交于
      Signed-off-by: NHelge Deller <deller@gmx.de>
      2765b3ed
    • H
      parisc: Default to 4 SMP CPUs · 435d34c7
      Helge Deller 提交于
      I haven't seen any real SMP machine yet with > 4 CPUs (we don't suport
      SuperDomes yet), so reducing the default maximum number of CPUs may speed up
      various bitop functions which depend on number of CPUs in the system.
      
      bload-o-meter on a typical 64-bit kernel shows:
      
      Data: add/remove: 0/0 grow/shrink: 0/10 up/down: 0/-3724 (-3724)
      Total: Before=1910404, After=1906680, chg -0.19%
      
      Code: add/remove: 0/2 grow/shrink: 42/38 up/down: 2320/-3500 (-1180)
      Total: Before=11053099, After=11051919, chg -0.01%
      Signed-off-by: NHelge Deller <deller@gmx.de>
      435d34c7
    • A
      parisc: Convert printk(KERN_LEVEL) to pr_lvl() · 5e791d2e
      Andy Shevchenko 提交于
      Convert printk(KERN_LEVEL) type of calls to pr_lvl() macros.
      
      While here,
        - convert printk() to pr_info()
        - join back string literal to be on one line
        - use %*phN (note, it gives 1 byte more for sake of simplicity)
      Signed-off-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com>
      Signed-off-by: NHelge Deller <deller@gmx.de>
      5e791d2e
    • H
      parisc: Mark 16kB and 64kB page sizes BROKEN · 1c971f39
      Helge Deller 提交于
      A full boot only succeeds with 4kB page sizes currently.
      For 16kB and 64kB page size support somone needs to fix the LBA PCI code
      at least, so mark those broken for now.
      Signed-off-by: NHelge Deller <deller@gmx.de>
      1c971f39
    • H
      parisc: Drop struct sigaction from not exported header file · 704e3830
      Helge Deller 提交于
      This header file isn't exported to userspace, so there is no benefit in
      defining struct sigaction for userspace here.
      Signed-off-by: NHelge Deller <deller@gmx.de>
      704e3830
    • L
      Merge tag 'xfs-4.18-fixes-2' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux · f5749432
      Linus Torvalds 提交于
      Pull xfs fixes from Darrick Wong:
       "Here are some patches for 4.18 to fix regressions, accounting
        problems, overflow problems, and to strengthen metadata validation to
        prevent corruption.
      
        This series has been run through a full xfstests run over the weekend
        and through a quick xfstests run against this morning's master, with
        no major failures reported.
      
        Changes since last update:
      
         - more metadata validation strengthening to prevent crashes.
      
         - fix extent offset overflow problem when insert_range on a 512b
           block fs
      
         - fix some off-by-one errors in the realtime fsmap code
      
         - fix some math errors in the default resblks calculation when free
           space is low
      
         - fix a problem where stale page contents are exposed via mmap read
           after a zero_range at eof
      
         - fix accounting problems with per-ag reservations causing statfs
           reports to vary incorrectly"
      
      * tag 'xfs-4.18-fixes-2' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux:
        xfs: fix fdblocks accounting w/ RMAPBT per-AG reservation
        xfs: ensure post-EOF zeroing happens after zeroing part of a file
        xfs: fix off-by-one error in xfs_rtalloc_query_range
        xfs: fix uninitialized field in rtbitmap fsmap backend
        xfs: recheck reflink state after grabbing ILOCK_SHARED for a write
        xfs: don't allow insert-range to shift extents past the maximum offset
        xfs: don't trip over negative free space in xfs_reserve_blocks
        xfs: allow empty transactions while frozen
        xfs: xfs_iflush_abort() can be called twice on cluster writeback failure
        xfs: More robust inode extent count validation
        xfs: simplify xfs_bmap_punch_delalloc_range
      f5749432
    • T
      MAINTAINERS: Timur has a kernel.org address · 0e49740c
      Timur Tabi 提交于
      Timur Tabi no longer works for Qualcomm, and he now has a kernel.org
      email address, so update MAINTAINERS accordingly.
      Signed-off-by: NTimur Tabi <timur@kernel.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      0e49740c
    • L
      Merge tag 'mips_fixes_4.18_2' of git://git.kernel.org/pub/scm/linux/kernel/git/mips/linux · 59ec39fe
      Linus Torvalds 提交于
      Pull MIPS build fix from Paul Burton:
       "A single build fix for 4.18:
      
        Adjust rseq_signal_deliver() & rseq_handle_notify_resume() calls to
        add the ksig argument introduced in v4.18-rc2, around the same time as
        the unadjusted MIPS rseq support"
      
      * tag 'mips_fixes_4.18_2' of git://git.kernel.org/pub/scm/linux/kernel/git/mips/linux:
        MIPS: Add ksig argument to rseq_{signal_deliver,handle_notify_resume}
      59ec39fe
    • L
      Merge tag 'armsoc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc · f8a78bdb
      Linus Torvalds 提交于
      Pull ARM SoC fixes from Olof Johansson:
       "A handful of fixes, nothing really concerning and most touching
        devicetree files for various platforms.
      
        I also regenerated the shared multiplatform defconfigs; they have
        drifted quite a bit due to Kconfig changes and reordering, and several
        platform maintainers tried doing the same which resulted in a lot of
        conflict pain -- this way we get everybody onto the same base for next
        merge window"
      
      * tag 'armsoc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (31 commits)
        arm64: dts: uniphier: fix widget name of headphone for LD11/LD20 boards
        ARM: dts: Fix SPI node for Arria10
        arm64: dts: stratix10: Fix SPI nodes for Stratix10
        qcom: cmd-db: enforce CONFIG_OF_RESERVED_MEM dependency
        ARM: Always build secure_cntvoff.S on ARM V7 to fix shmobile !SMP build
        ARM: multi_v7_defconfig: renormalize based on recent additions
        arm64: defconfig: renormalize based on recent additions
        arm64: dts: msm8916: fix Coresight ETF graph connections
        arm64: dts: apq8096-db820c: disable uart0 by default
        ARM: dts: imx6sx: fix irq for pcie bridge
        arm64: dts: Stingray: Fix I2C controller interrupt type
        arm64: dts: ns2: Fix PCIe controller interrupt type
        arm64: dts: ns2: Fix I2C controller interrupt type
        arm64: dts: specify 1.8V EMMC capabilities for bcm958742t
        arm64: dts: specify 1.8V EMMC capabilities for bcm958742k
        ARM: dts: Cygnus: Fix PCIe controller interrupt type
        ARM: dts: Cygnus: Fix I2C controller interrupt type
        ARM: dts: BCM5301x: Fix i2c controller interrupt type
        ARM: dts: HR2: Fix interrupt types for i2c and PCIe
        ARM: dts: NSP: Fix PCIe controllers interrupt types
        ...
      f8a78bdb
    • L
      Merge tag 'microblaze-v4.18-rc3' of git://git.monstr.eu/linux-2.6-microblaze · 22c3b152
      Linus Torvalds 提交于
      Pull microblaze fixes from Michal Simek:
      
       - fix architecture gpio heart beat code
      
       - add new syscalls
      
       - remove unused xlnx,compound handling
      
       - remove platform.c
      
      * tag 'microblaze-v4.18-rc3' of git://git.monstr.eu/linux-2.6-microblaze:
        microblaze: consolidate GPIO reset handling
        microblaze: remove unecessary of_platform_bus_probe call
        microblaze: Add new syscalls io_pgetevents and rseq
        microblaze: Remove architecture heart beat code
        microblaze: heartbeat: fix missing prom.h include
      22c3b152
    • L
      Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi · debd52a0
      Linus Torvalds 提交于
      Pull SCSI fixes from James Bottomley:
       "Three small bug fixes (barrier elimination, memory leak on unload,
        spinlock recursion) and a technical enhancement left over from the
        merge window: the TCMU read length support is required for tape
        devices read when the length of the read is greater than the tape
        block size"
      
      * tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi:
        scsi: scsi_debug: Fix memory leak on module unload
        scsi: qla2xxx: Spinlock recursion in qla_target
        scsi: ipr: Eliminate duplicate barriers
        scsi: target: tcmu: add read length support
      debd52a0
    • L
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input · c92067ae
      Linus Torvalds 提交于
      Pull input updates from Dmitry Torokhov:
      
       - the main change is a fix for my brain-dead patch to PS/2 button
         reporting for some protocols that made it in 4.17
      
       - there is a new driver for Spreadtum vibrator that I intended to send
         during merge window but ended up not sending the 2nd pull request.
         Given that this is a brand new driver we should not see regressions
         here
      
       - a fixup to Elantech PS/2 driver to avoid decoding errors on Thinkpad
         P52
      
       - addition of few more ACPI IDs for Silead and Elan drivers
      
       - RMI4 is switched to using IRQ domain code instead of rolling its own
         implementation
      
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input:
        Input: psmouse - fix button reporting for basic protocols
        Input: xpad - fix GPD Win 2 controller name
        Input: elan_i2c_smbus - fix more potential stack buffer overflows
        Input: elan_i2c - add ELAN0618 (Lenovo v330 15IKB) ACPI ID
        Input: elantech - fix V4 report decoding for module with middle key
        Input: elantech - enable middle button of touchpads on ThinkPad P52
        Input: do not assign new tracking ID when changing tool type
        Input: make input_report_slot_state() return boolean
        Input: synaptics-rmi4 - fix axis-swap behavior
        Input: synaptics-rmi4 - fix the error return code in rmi_probe_interrupts()
        Input: synaptics-rmi4 - convert irq distribution to irq_domain
        Input: silead - add MSSL0002 ACPI HID
        Input: goldfish_events - fix checkpatch warnings
        Input: add Spreadtrum vibrator driver
      c92067ae
    • L
      Merge branch 'fixes-v4.18-rc3' of... · 896a3492
      Linus Torvalds 提交于
      Merge branch 'fixes-v4.18-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security
      
      Pull more security subsystem fixes from James Morris:
       "Two further fixes for the keys subsystem"
      
      * 'fixes-v4.18-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security:
        dh key: fix rounding up KDF output length
        certs/blacklist: fix const confusion
      896a3492
  3. 27 6月, 2018 8 次提交
  4. 26 6月, 2018 5 次提交
    • L
      Merge branch 'fixes-v4.18-rc2' of... · 81383502
      Linus Torvalds 提交于
      Merge branch 'fixes-v4.18-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security
      
      Pull security subsystem fixes from James Morris:
      
       - Smack: fix a regression caused by 1bbc5513
      
       - X.509: fix a (usually un-seen) bug in RSA signature parsing
      
      * 'fixes-v4.18-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security:
        X.509: unpack RSA signatureValue field from BIT STRING
        Smack: Mark inode instant in smack_task_to_inode
      81383502
    • L
      Merge tag 'for-4.18-rc1-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux · 84bfed40
      Linus Torvalds 提交于
      Pull btrfs fixes from David Sterba:
       "Two regression fixes and an incorrect error value propagation fix from
        'rename exchange'"
      
      * tag 'for-4.18-rc1-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux:
        Btrfs: fix return value on rename exchange failure
        btrfs: fix invalid-free in btrfs_extent_same
        Btrfs: fix physical offset reported by fiemap for inline extents
      84bfed40
    • A
      qcom: cmd-db: enforce CONFIG_OF_RESERVED_MEM dependency · 0ea3fa15
      Arnd Bergmann 提交于
      Without CONFIG_OF_RESERVED_MEM, gcc sees that the global cmd_db_header
      variable is never initialized, and through code optimization concludes
      that a lot of other code cannot possibly work after that:
      
      drivers/soc/qcom/cmd-db.c: In function 'cmd_db_read_addr':
      drivers/soc/qcom/cmd-db.c:197:21: error: 'ent.addr' may be used uninitialized in this function [-Werror=maybe-uninitialized]
        return ret < 0 ? 0 : le32_to_cpu(ent.addr);
      drivers/soc/qcom/cmd-db.c: In function 'cmd_db_read_aux_data':
      drivers/soc/qcom/cmd-db.c:224:10: error: 'ent.len' may be used uninitialized in this function [-Werror=maybe-uninitialized]
        ent_len = le16_to_cpu(ent.len);
      drivers/soc/qcom/cmd-db.c:115:6: error: 'rsc_hdr.data_offset' may be used uninitialized in this function [-Werror=maybe-uninitialized]
        u16 offset = le16_to_cpu(hdr->data_offset);
            ^~~~~~
      drivers/soc/qcom/cmd-db.c:116:6: error: 'ent.offset' may be used uninitialized in this function [-Werror=maybe-uninitialized]
        u16 loffset = le16_to_cpu(ent->offset);
            ^~~~~~~
      drivers/soc/qcom/cmd-db.c: In function 'cmd_db_read_aux_data_len':
      drivers/soc/qcom/cmd-db.c:250:38: error: 'ent.len' may be used uninitialized in this function [-Werror=maybe-uninitialized]
        return ret < 0 ? 0 : le16_to_cpu(ent.len);
                                            ^
      drivers/soc/qcom/cmd-db.c: In function 'cmd_db_read_slave_id':
      drivers/soc/qcom/cmd-db.c:272:7: error: 'ent.addr' may be used uninitialized in this function [-Werror=maybe-uninitialized]
      
      Using a hard CONFIG_OF_RESERVED_MEM dependency avoids this warning,
      and we can remove the CONFIG_OF dependency.
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      Reviewed-by: NBjorn Andersson <bjorn.andersson@linaro.org>
      Signed-off-by: NAndy Gross <andy.gross@linaro.org>
      0ea3fa15
    • A
      Merge tag 'qcom-fixes-for-4.18-rc1' into linus · 9573ce74
      Andy Gross 提交于
      Qualcomm Fixes for v4.18-rc1
      
      * Fix coresight graph on msm8916
      * Disable uart0 on db820c by default
      9573ce74
    • M
      X.509: unpack RSA signatureValue field from BIT STRING · b65c32ec
      Maciej S. Szmigiero 提交于
      The signatureValue field of a X.509 certificate is encoded as a BIT STRING.
      For RSA signatures this BIT STRING is of so-called primitive subtype, which
      contains a u8 prefix indicating a count of unused bits in the encoding.
      
      We have to strip this prefix from signature data, just as we already do for
      key data in x509_extract_key_data() function.
      
      This wasn't noticed earlier because this prefix byte is zero for RSA key
      sizes divisible by 8. Since BIT STRING is a big-endian encoding adding zero
      prefixes has no bearing on its value.
      
      The signature length, however was incorrect, which is a problem for RSA
      implementations that need it to be exactly correct (like AMD CCP).
      Signed-off-by: NMaciej S. Szmigiero <mail@maciej.szmigiero.name>
      Fixes: c26fd69f ("X.509: Add a crypto key parser for binary (DER) X.509 certificates")
      Cc: stable@vger.kernel.org
      Signed-off-by: NJames Morris <james.morris@microsoft.com>
      b65c32ec
  5. 25 6月, 2018 10 次提交
    • L
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net · 6f0d349d
      Linus Torvalds 提交于
      Pull networking fixes from David Miller:
      
       1) Fix netpoll OOPS in r8169, from Ville Syrjälä.
      
       2) Fix bpf instruction alignment on powerpc et al., from Eric Dumazet.
      
       3) Don't ignore IFLA_MTU attribute when creating new ipvlan links. From
          Xin Long.
      
       4) Fix use after free in AF_PACKET, from Eric Dumazet.
      
       5) Mis-matched RTNL unlock in xen-netfront, from Ross Lagerwall.
      
       6) Fix VSOCK loopback on big-endian, from Claudio Imbrenda.
      
       7) Missing RX buffer offset correction when computing DMA addresses in
          mvneta driver, from Antoine Tenart.
      
       8) Fix crashes in DCCP's ccid3_hc_rx_send_feedback, from Eric Dumazet.
      
      * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (34 commits)
        sfc: make function efx_rps_hash_bucket static
        strparser: Corrected typo in documentation.
        qmi_wwan: add support for the Dell Wireless 5821e module
        cxgb4: when disabling dcb set txq dcb priority to 0
        net_sched: remove a bogus warning in hfsc
        net: dccp: switch rx_tstamp_last_feedback to monotonic clock
        net: dccp: avoid crash in ccid3_hc_rx_send_feedback()
        net: Remove depends on HAS_DMA in case of platform dependency
        MAINTAINERS: Add file patterns for dsa device tree bindings
        net: mscc: make sparse happy
        net: mvneta: fix the Rx desc DMA address in the Rx path
        Documentation: e1000: Fix docs build error
        Documentation: e100: Fix docs build error
        Documentation: e1000: Use correct heading adornment
        Documentation: e100: Use correct heading adornment
        ipv6: mcast: fix unsolicited report interval after receiving querys
        vhost_net: validate sock before trying to put its fd
        VSOCK: fix loopback on big-endian systems
        net: ethernet: ti: davinci_cpdma: make function cpdma_desc_pool_create static
        xen-netfront: Update features after registering netdev
        ...
      6f0d349d
    • D
      xfs: fix fdblocks accounting w/ RMAPBT per-AG reservation · d8cb5e42
      Darrick J. Wong 提交于
      In __xfs_ag_resv_init we incorrectly calculate the amount by which to
      decrease fdblocks when reserving blocks for the rmapbt.  Because rmapbt
      allocations do not decrease fdblocks, we must decrease fdblocks by the
      entire size of the requested reservation in order to achieve our goal of
      always having enough free blocks to satisfy an rmapbt expansion.
      
      This is in contrast to the refcountbt/finobt, which /do/ subtract from
      fdblocks whenever they allocate a block.  For this allocation type we
      preserve the existing behavior where we decrease fdblocks only by the
      requested reservation minus the size of the existing tree.
      
      This fixes the problem where the available block counts reported by
      statfs change across a remount if there had been an rmapbt size change
      since mount time.
      Signed-off-by: NDarrick J. Wong <darrick.wong@oracle.com>
      Reviewed-by: NAllison Henderson <allison.henderson@oracle.com>
      d8cb5e42
    • D
      xfs: ensure post-EOF zeroing happens after zeroing part of a file · e53c4b59
      Darrick J. Wong 提交于
      If a user asks us to zero_range part of a file, the end of the range is
      EOF, and not aligned to a page boundary, invoke writeback of the EOF
      page to ensure that the post-EOF part of the page is zeroed.  This
      ensures that we don't expose stale memory contents via mmap, if in a
      clumsy manner.
      
      Found by running generic/127 when it runs zero_range and mapread at EOF
      one after the other.
      Signed-off-by: NDarrick J. Wong <darrick.wong@oracle.com>
      Reviewed-by: NChristoph Hellwig <hch@lst.de>
      Reviewed-by: NAllison Henderson <allison.henderson@oracle.com>
      e53c4b59
    • D
      xfs: fix off-by-one error in xfs_rtalloc_query_range · a3a374bf
      Darrick J. Wong 提交于
      In commit 8ad560d2 ("xfs: strengthen rtalloc query range checks")
      we strengthened the input parameter checks in the rtbitmap range query
      function, but introduced an off-by-one error in the process.  The call
      to xfs_rtfind_forw deals with the high key being rextents, but we clamp
      the high key to rextents - 1.  This causes the returned results to stop
      one block short of the end of the rtdev, which is incorrect.
      Signed-off-by: NDarrick J. Wong <darrick.wong@oracle.com>
      Reviewed-by: NAllison Henderson <allison.henderson@oracle.com>
      Reviewed-by: NChristoph Hellwig <hch@lst.de>
      a3a374bf
    • D
      xfs: fix uninitialized field in rtbitmap fsmap backend · 232d0a24
      Darrick J. Wong 提交于
      Initialize the extent count field of the high key so that when we use
      the high key to synthesize an 'unknown owner' record (i.e. used space
      record) at the end of the queried range we have a field with which to
      compute rm_blockcount.  This is not strictly necessary because the
      synthesizer never uses the rm_blockcount field, but we can shut up the
      static code analysis anyway.
      
      Coverity-id: 1437358
      Signed-off-by: NDarrick J. Wong <darrick.wong@oracle.com>
      Reviewed-by: NAllison Henderson <allison.henderson@oracle.com>
      Reviewed-by: NChristoph Hellwig <hch@lst.de>
      232d0a24
    • D
      xfs: recheck reflink state after grabbing ILOCK_SHARED for a write · 5bd88d15
      Darrick J. Wong 提交于
      The reflink iflag could have changed since the earlier unlocked check,
      so if we got ILOCK_SHARED for a write and but we're now a reflink inode
      we have to switch to ILOCK_EXCL and relock.
      
      This helps us avoid blowing lock assertions in things like generic/166:
      
      XFS: Assertion failed: xfs_isilocked(ip, XFS_ILOCK_EXCL), file: fs/xfs/xfs_reflink.c, line: 383
      WARNING: CPU: 1 PID: 24707 at fs/xfs/xfs_message.c:104 assfail+0x25/0x30 [xfs]
      Modules linked in: deadline_iosched dm_snapshot dm_bufio ext4 mbcache jbd2 dm_flakey xfs libcrc32c dax_pmem device_dax nd_pmem sch_fq_codel af_packet [last unloaded: scsi_debug]
      CPU: 1 PID: 24707 Comm: xfs_io Not tainted 4.18.0-rc1-djw #1
      Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.10.2-1ubuntu1 04/01/2014
      RIP: 0010:assfail+0x25/0x30 [xfs]
      Code: ff 0f 0b c3 90 66 66 66 66 90 48 89 f1 41 89 d0 48 c7 c6 e8 ef 1b a0 48 89 fa 31 ff e8 54 f9 ff ff 80 3d fd ba 0f 00 00 75 03 <0f> 0b c3 0f 0b 66 0f 1f 44 00 00 66 66 66 66 90 48 63 f6 49 89 f9
      RSP: 0018:ffffc90006423ad8 EFLAGS: 00010246
      RAX: 0000000000000000 RBX: ffff880030b65e80 RCX: 0000000000000000
      RDX: 00000000ffffffc0 RSI: 000000000000000a RDI: ffffffffa01b0447
      RBP: ffffc90006423c10 R08: 0000000000000000 R09: 0000000000000000
      R10: ffff88003d43fc30 R11: f000000000000000 R12: ffff880077cda000
      R13: 0000000000000000 R14: ffffc90006423c30 R15: ffffc90006423bf9
      FS:  00007feba8986800(0000) GS:ffff88003ec00000(0000) knlGS:0000000000000000
      CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
      CR2: 000000000138ab58 CR3: 000000003d40a000 CR4: 00000000000006a0
      Call Trace:
       xfs_reflink_allocate_cow+0x24c/0x3d0 [xfs]
       xfs_file_iomap_begin+0x6d2/0xeb0 [xfs]
       ? iomap_to_fiemap+0x80/0x80
       iomap_apply+0x5e/0x130
       iomap_dio_rw+0x2e0/0x400
       ? iomap_to_fiemap+0x80/0x80
       ? xfs_file_dio_aio_write+0x133/0x4a0 [xfs]
       xfs_file_dio_aio_write+0x133/0x4a0 [xfs]
       xfs_file_write_iter+0x7b/0xb0 [xfs]
       __vfs_write+0x16f/0x1f0
       vfs_write+0xc8/0x1c0
       ksys_pwrite64+0x74/0x90
       do_syscall_64+0x56/0x180
       entry_SYSCALL_64_after_hwframe+0x49/0xbe
      Signed-off-by: NDarrick J. Wong <darrick.wong@oracle.com>
      Reviewed-by: NChristoph Hellwig <hch@lst.de>
      5bd88d15
    • D
      xfs: don't allow insert-range to shift extents past the maximum offset · f62cb48e
      Darrick J. Wong 提交于
      Zorro Lang reports that generic/485 blows an assert on a filesystem with
      512 byte blocks.  The test tries to fallocate a post-eof extent at the
      maximum file size and calls insert range to shift the extents right by
      two blocks.  On a 512b block filesystem this causes startoff to overflow
      the 54-bit startoff field, leading to the assert.
      
      Therefore, always check the rightmost extent to see if it would overflow
      prior to invoking the insert range machinery.
      
      Reported-by: zlang@redhat.com
      Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=200137Signed-off-by: NDarrick J. Wong <darrick.wong@oracle.com>
      Reviewed-by: NAllison Henderson <allison.henderson@oracle.com>
      Reviewed-by: NChristoph Hellwig <hch@lst.de>
      f62cb48e
    • D
      xfs: don't trip over negative free space in xfs_reserve_blocks · aafe12ce
      Darrick J. Wong 提交于
      If we somehow end up with a filesystem that has fewer free blocks than
      the blocks set aside to avoid ENOSPC deadlocks, it's possible that the
      free space calculation in xfs_reserve_blocks will spit out a negative
      number (because percpu_counter_sum returns s64).  We fail to notice
      this negative number and set fdblks_delta to it.  Now we increment
      fdblocks(!) and the unsigned type of m_resblks means that we end up
      setting a ridiculously huge m_resblks reservation.
      
      Avoid this comedy of errors by detecting the negative free space and
      returning -ENOSPC.
      Signed-off-by: NDarrick J. Wong <darrick.wong@oracle.com>
      Reviewed-by: NAllison Henderson <allison.henderson@oracle.com>
      Reviewed-by: NChristoph Hellwig <hch@lst.de>
      aafe12ce
    • D
      xfs: allow empty transactions while frozen · 10ee2526
      Darrick J. Wong 提交于
      In commit e89c0413 ("xfs: implement the GETFSMAP ioctl") we
      created the ability to obtain empty transactions.  These transactions
      have no log or block reservations and therefore can't modify anything.
      Since they're also NO_WRITECOUNT they can run while the fs is frozen,
      so we don't need to WARN_ON about that usage.
      Signed-off-by: NDarrick J. Wong <darrick.wong@oracle.com>
      Reviewed-by: NAllison Henderson <allison.henderson@oracle.com>
      Reviewed-by: NChristoph Hellwig <hch@lst.de>
      10ee2526
    • P
      MIPS: Add ksig argument to rseq_{signal_deliver,handle_notify_resume} · 662d855c
      Paul Burton 提交于
      Commit 784e0300 ("rseq: Avoid infinite recursion when delivering
      SIGSEGV") added a new ksig argument to the rseq_signal_deliver() &
      rseq_handle_notify_resume() functions, and was merged in v4.18-rc2.
      Meanwhile MIPS support for restartable sequences was also merged in
      v4.18-rc2 with commit 9ea141ad ("MIPS: Add support for restartable
      sequences"), and therefore didn't get updated for the API change.
      
      This results in build failures like the following:
      
          CC      arch/mips/kernel/signal.o
        arch/mips/kernel/signal.c: In function 'handle_signal':
        arch/mips/kernel/signal.c:804:22: error: passing argument 1 of
          'rseq_signal_deliver' from incompatible pointer type
          [-Werror=incompatible-pointer-types]
          rseq_signal_deliver(regs);
                              ^~~~
        In file included from ./include/linux/context_tracking.h:5,
                         from arch/mips/kernel/signal.c:12:
        ./include/linux/sched.h:1811:56: note: expected 'struct ksignal *' but
          argument is of type 'struct pt_regs *'
          static inline void rseq_signal_deliver(struct ksignal *ksig,
                                                 ~~~~~~~~~~~~~~~~^~~~
        arch/mips/kernel/signal.c:804:2: error: too few arguments to function
          'rseq_signal_deliver'
          rseq_signal_deliver(regs);
          ^~~~~~~~~~~~~~~~~~~
      
      Fix this by adding the ksig argument as was done for other architectures
      in commit 784e0300 ("rseq: Avoid infinite recursion when delivering
      SIGSEGV").
      Signed-off-by: NPaul Burton <paul.burton@mips.com>
      Acked-by: NMathieu Desnoyers <mathieu.desnoyers@efficios.com>
      Patchwork: https://patchwork.linux-mips.org/patch/19603/
      Cc: James Hogan <jhogan@kernel.org>
      Cc: Ralf Baechle <ralf@linux-mips.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
      Cc: Boqun Feng <boqun.feng@gmail.com>
      Cc: Will Deacon <will.deacon@arm.com>
      Cc: linux-mips@linux-mips.org
      Cc: linux-kernel@vger.kernel.org
      662d855c
  6. 24 6月, 2018 2 次提交