Skip to content
  1. Nov 23, 2017
    • Linus Torvalds's avatar
      Merge tag 'rtc-4.15' of git://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux · 1b8c5cd8
      Linus Torvalds authored
      Pull RTC updates from Alexandre Belloni:
       "There is nothing scary this cycle, mostly driver fixes and updates.
      
        The core fix has been in for a while and has been tested on multiple
        kernel revisions by multiple teams.
      
        Core:
         - Fix setting the alarm to the next expiring timer
      
        New drivers:
         - Mediatek MT7622 RTC
         - NXP PCF85363
         - Spreadtrum SC27xx PMIC RTC
      
        Drivers updates:
         - Use generic nvmem to expose the Non volatile ram for ds1305,
           ds1511, m48t86 and omap
         - abx80x: solve possible race condition at probe
         - armada38x: support trimming the RTC oscillator
         - at91rm9200: fix reading the alarm value at boot
         - ds1511: allow waking platform
         - m41t80: rework square wave output
         - pcf8523: support trimming the RTC oscillator
         - pcf8563: fix clock output rate
         - pl031: make interrupt optional
         - xgene: fix suspend/resume"
      
      * tag 'rtc-4.15' of git://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux: (50 commits)
        dt-bindings: rtc: imxdi: Improve the bindings text
        rtc: sc27xx: Add Spreadtrum SC27xx PMIC RTC driver
        dt-bindings: rtc: Add Spreadtrum SC27xx RTC documentation
        rtc: at91rm9200: fix reading alarm value
        rtc: at91rm9200: stop calculating yday in at91_rtc_readalarm
        rtc: sysfs: Use time64_t variables to set time/alarm
        rtc: xgene: mark PM functions as __maybe_unused
        rtc: xgene: Fix suspend/resume
        rtc: pcf8563: don't alway enable the alarm
        rtc: pcf8563: fix output clock rate
        rtc: rx8010: Fix for incorrect return value
        rtc: rx8010: Specify correct address for RX8010_RESV31
        rtc: rx8010: Remove duplicate define
        rtc: m41t80: remove unneeded checks from m41t80_sqw_set_rate
        rtc: m41t80: avoid i2c read in m41t80_sqw_is_prepared
        rtc: m41t80: avoid i2c read in m41t80_sqw_recalc_rate
        rtc: m41t80: fix m41t80_sqw_round_rate return value
        rtc: m41t80: m41t80_sqw_set_rate should return 0 on success
        rtc: add support for NXP PCF85363 real-time clock
        rtc: omap: Support scratch registers
        ...
      1b8c5cd8
    • Linus Torvalds's avatar
      Merge tag 'for-linus-20171120' of git://git.infradead.org/linux-mtd · 14b661eb
      Linus Torvalds authored
      Pull MTD updates from Richard Weinberger:
       "General changes:
         -  Unconfuse get_unmapped_area and point/unpoint driver methods
         -  New partition parser: sharpslpart
         -  Kill GENERIC_IO
         -  Various fixes
      
        NAND changes:
         -  Add a flag to mark NANDs that require 3 address cycles to encode a
            page address
         -  Set a default ECC/free layout when NAND_ECC_NONE is requested
         -  Fix a bug in panic_nand_write()
         -  Another batch of cleanups for the denali driver
         -  Fix PM support in the atmel driver
         -  Remove support for platform data in the omap driver
         -  Fix subpage write in the omap driver
         -  Fix irq handling in the mtk driver
         -  Change link order of mtk_ecc and mtk_nand drivers to speed up boot
            time
         -  Change log level of ECC error messages in the mxc driver
         -  Patch the pxa3xx driver to support Armada 8k platforms
         -  Add BAM DMA support to the qcom driver
         -  Convert gpio-nand to the GPIO desc API
         -  Fix ECC handling in the mt29f driver
      
        SPI-NOR changes:
         -  Introduce system power management support
         -  New mechanism to select the proper .quad_enable() hook by JEDEC
            ID, when needed, instead of only by manufacturer ID
         -  Add support to new memory parts from Gigadevice, Winbond, Macronix
            and Everspin
         -  Maintainance for Cadence, Intel, Mediatek and STM32 drivers"
      
      *  tag 'for-linus-20171120' of git://git.infradead.org/linux-mtd: (85 commits)
        mtd: Avoid probe failures when mtd->dbg.dfs_dir is invalid
        mtd: sharpslpart: Add sharpslpart partition parser
        mtd: Add sanity checks in mtd_write/read_oob()
        mtd: remove the get_unmapped_area method
        mtd: implement mtd_get_unmapped_area() using the point method
        mtd: chips/map_rom.c: implement point and unpoint methods
        mtd: chips/map_ram.c: implement point and unpoint methods
        mtd: mtdram: properly handle the phys argument in the point method
        mtd: mtdswap: fix spelling mistake: 'TRESHOLD' -> 'THRESHOLD'
        mtd: slram: use memremap() instead of ioremap()
        kconfig: kill off GENERIC_IO option
        mtd: Fix C++ comment in include/linux/mtd/mtd.h
        mtd: constify mtd_partition
        mtd: plat-ram: Replace manual resource management by devm
        mtd: nand: Fix writing mtdoops to nand flash.
        mtd: intel-spi: Add Intel Lewisburg PCH SPI super SKU PCI ID
        mtd: nand: mtk: fix infinite ECC decode IRQ issue
        mtd: spi-nor: Add support for mr25h128
        mtd: nand: mtk: change the compile sequence of mtk_nand.o and mtk_ecc.o
        mtd: spi-nor: enable 4B opcodes for mx66l51235l
        ...
      14b661eb
    • Linus Torvalds's avatar
      Merge tag 'xfs-4.15-merge-3' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux · 3f3211e7
      Linus Torvalds authored
      Pull xfs fixes from Darrick Wong:
      
       - Fix a memory leak in the new in-core extent map
      
       - Refactor the xfs_dev_t conversions for easier xfsprogs porting
      
      * tag 'xfs-4.15-merge-3' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux:
        xfs: abstract out dev_t conversions
        xfs: fix memory leak in xfs_iext_free_last_leaf
      3f3211e7
    • Linus Torvalds's avatar
      Merge branch 'work.whack-a-mole' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs · 27532785
      Linus Torvalds authored
      Pull mode_t whack-a-mole from Al Viro:
       "For all internal uses we want umode_t, which is arch-independent;
        mode_t (or __kernel_mode_t, for that matter) is wrong outside of
        userland ABI.
      
        Unfortunately, that crap keeps coming back and needs to be put down
        from time to time..."
      
      * 'work.whack-a-mole' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs:
        mode_t whack-a-mole: task_dump_owner()
      27532785
    • Linus Torvalds's avatar
      Merge branch '9p-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs · d18bee42
      Linus Torvalds authored
      Pull 9p filesystemfixes from Al Viro:
       "Several 9p fixes"
      
      * '9p-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs:
        9p: Fix missing commas in mount options
        net/9p: Switch to wait_event_killable()
        fs/9p: Compare qid.path in v9fs_test_inode
      d18bee42
  2. Nov 21, 2017
  3. Nov 20, 2017
    • Ben Hutchings's avatar
      mac80211_hwsim: Fix memory leak in hwsim_new_radio_nl() · 67bd5238
      Ben Hutchings authored
      
      
      hwsim_new_radio_nl() now copies the name attribute in order to add a
      null-terminator.  mac80211_hwsim_new_radio() (indirectly) copies it
      again into the net_device structure, so the first copy is not used or
      freed later.  Free the first copy before returning.
      
      Fixes: ff4dd73d ("mac80211_hwsim: check HWSIM_ATTR_RADIO_NAME length")
      Signed-off-by: default avatarBen Hutchings <ben.hutchings@codethink.co.uk>
      Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
      67bd5238
    • Johannes Berg's avatar
      cfg80211: initialize regulatory keys/database later · d7be102f
      Johannes Berg authored
      
      
      When cfg80211 is built as a module, everything is fine, and we
      can keep the code as is; in fact, we have to, because there can
      only be a single module_init().
      
      When cfg80211 is built-in, however, it needs to initialize
      before drivers (device_initcall/module_init), and thus used to
      be at subsys_initcall(). I'd moved it to fs_initcall() earlier,
      where it can remain. However, this is still too early because at
      that point the key infrastructure hasn't been initialized yet,
      so X.509 certificates can't be parsed yet.
      
      To work around this problem, load the regdb keys only later in
      a late_initcall(), at which point the necessary infrastructure
      has been initialized.
      
      Fixes: 90a53e44 ("cfg80211: implement regdb signature checking")
      Reported-by: default avatarXiaolong Ye <xiaolong.ye@intel.com>
      Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
      d7be102f
    • Kees Cook's avatar
      mac80211: aggregation: Convert timers to use timer_setup() · 7cca2acd
      Kees Cook authored
      
      
      In preparation for unconditionally passing the struct timer_list pointer to
      all timer callbacks, switch to using the new timer_setup() and from_timer()
      to pass the timer pointer explicitly.
      
      This removes the tid mapping array and expands the tid structures to
      add a pointer back to the station, along with the tid index itself.
      
      Cc: Johannes Berg <johannes@sipsolutions.net>
      Cc: "David S. Miller" <davem@davemloft.net>
      Cc: linux-wireless@vger.kernel.org
      Cc: netdev@vger.kernel.org
      Signed-off-by: default avatarKees Cook <keescook@chromium.org>
      [switch tid variables to u8, the valid range is 0-15 at most,
       initialize tid_tx->sta/tid properly]
      Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
      7cca2acd
    • Johannes Berg's avatar
      nl80211: don't expose wdev->ssid for most interfaces · 44905265
      Johannes Berg authored
      
      
      For mesh, this is simply wrong - there's no SSID, only the
      mesh ID, so don't expose it at all.
      For (P2P) client, it's wrong, because it exposes an internal
      value that's only used when certain APIs are used.
      For AP, it's actually the only correct case, so leave that.
      All other interface types shouldn't be setting this anyway,
      so there it won't change anything.
      
      Fixes: b84e7a05 ("nl80211: send the NL80211_ATTR_SSID in nl80211_send_iface()")
      Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
      44905265
    • Kees Cook's avatar
      mac80211: Convert timers to use timer_setup() · 34f11cd3
      Kees Cook authored
      
      
      In preparation for unconditionally passing the struct timer_list pointer to
      all timer callbacks, switch to using the new timer_setup() and from_timer()
      to pass the timer pointer explicitly.
      
      Cc: Johannes Berg <johannes@sipsolutions.net>
      Cc: "David S. Miller" <davem@davemloft.net>
      Cc: linux-wireless@vger.kernel.org
      Cc: netdev@vger.kernel.org
      Signed-off-by: default avatarKees Cook <keescook@chromium.org>
      Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
      34f11cd3
    • Linus Torvalds's avatar
      Merge tag 'ntb-4.15' of git://github.com/jonmason/ntb · c8a0739b
      Linus Torvalds authored
      Pull ntb updates from Jon Mason:
       "Support for the switchtec ntb and related changes. Also, a couple of
        bug fixes"
      
      [ The timing isn't great. I had asked people to send me pull requests
        before my family vacation, and this code has not even been in
        linux-next as far as I can tell. But Logan Gunthorpe pleaded for its
        inclusion because the Switchtec driver has apparently been around for
        a while, just never in linux-next - Linus ]
      
      * tag 'ntb-4.15' of git://github.com/jonmason/ntb:
        ntb: intel: remove b2b memory window workaround for Skylake NTB
        NTB: make idt_89hpes_cfg const
        NTB: switchtec_ntb: Update switchtec documentation with notes for NTB
        NTB: switchtec_ntb: Add memory window support
        NTB: switchtec_ntb: Implement scratchpad registers
        NTB: switchtec_ntb: Implement doorbell registers
        NTB: switchtec_ntb: Add link management
        NTB: switchtec_ntb: Add skeleton NTB driver
        NTB: switchtec_ntb: Initialize hardware for doorbells and messages
        NTB: switchtec_ntb: Initialize hardware for memory windows
        NTB: switchtec_ntb: Introduce initial NTB driver
        NTB: Add check and comment for link up to mw_count() and mw_get_align()
        NTB: Ensure ntb_mw_get_align() is only called when the link is up
        NTB: switchtec: Add link event notifier callback
        NTB: switchtec: Add NTB hardware register definitions
        NTB: switchtec: Export class symbol for use in upper layer driver
        NTB: switchtec: Move structure definitions into a common header
        ntb: update maintainer list for Intel NTB driver
      c8a0739b
    • Christophe JAILLET's avatar
      net: vxge: Fix some indentation issues · 32a72bbd
      Christophe JAILLET authored
      
      
      Some statements are not enough or too much indented.
      Fix it to improve readalbility.
      
      Signed-off-by: default avatarChristophe JAILLET <christophe.jaillet@wanadoo.fr>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      32a72bbd
    • Netanel Belgazal's avatar
      net: ena: fix race condition between device reset and link up setup · d18e4f68
      Netanel Belgazal authored
      
      
      In rare cases, ena driver would reset and re-start the device,
      for example, in case of misbehaving application that causes
      transmit timeout
      
      The first step in the reset procedure is to stop the Tx traffic by
      calling ena_carrier_off().
      
      After the driver have just started the device reset procedure, device
      happens to send an asynchronous notification (via AENQ) to the driver
      than there was a link change (to link-up state).
      This link change is mapped to a call to netif_carrier_on() which
      re-activates the Tx queues, violating the assumption of no tx traffic
      until device reset is completed, as the reset task might still be in
      the process of queues initialization, leading to an access to
      uninitialized memory.
      
      Signed-off-by: default avatarNetanel Belgazal <netanel@amazon.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      d18e4f68
    • Tuomas Tynkkynen's avatar
      9p: Fix missing commas in mount options · 61b272c3
      Tuomas Tynkkynen authored
      
      
      Since commit c4fac910 ("9p: Implement show_options"), the mount
      options of 9p filesystems are printed out with some missing commas
      between the individual options:
      
      p9-scratch on /mnt/scratch type 9p (rw,dirsync,loose,access=clienttrans=virtio)
      
      Add them back.
      
      Cc: stable@vger.kernel.org # 4.13+
      Fixes: c4fac910 ("9p: Implement show_options")
      Signed-off-by: default avatarTuomas Tynkkynen <tuomas@tuxera.com>
      Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
      61b272c3
    • Roberto Sassu's avatar
      ima: do not update security.ima if appraisal status is not INTEGRITY_PASS · 020aae3e
      Roberto Sassu authored
      
      
      Commit b65a9cfc ("Untangling ima mess, part 2: deal with counters")
      moved the call of ima_file_check() from may_open() to do_filp_open() at a
      point where the file descriptor is already opened.
      
      This breaks the assumption made by IMA that file descriptors being closed
      belong to files whose access was granted by ima_file_check(). The
      consequence is that security.ima and security.evm are updated with good
      values, regardless of the current appraisal status.
      
      For example, if a file does not have security.ima, IMA will create it after
      opening the file for writing, even if access is denied. Access to the file
      will be allowed afterwards.
      
      Avoid this issue by checking the appraisal status before updating
      security.ima.
      
      Cc: stable@vger.kernel.org
      Signed-off-by: default avatarRoberto Sassu <roberto.sassu@huawei.com>
      Signed-off-by: default avatarMimi Zohar <zohar@linux.vnet.ibm.com>
      Signed-off-by: default avatarJames Morris <james.l.morris@oracle.com>
      020aae3e
    • Linus Torvalds's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/ide · ed30b147
      Linus Torvalds authored
      Pull small IDE cleanup from David Miller.
      
      * git://git.kernel.org/pub/scm/linux/kernel/git/davem/ide:
        PNP: ide: constify pnp_device_id
      ed30b147
  4. Nov 19, 2017
    • Heiner Kallweit's avatar
      r8169: use same RTL8111EVL green settings as in vendor driver · b399a394
      Heiner Kallweit authored
      
      
      Adjust the code to use the same green settings as in the latest
      vendor driver.
      
      Signed-off-by: default avatarHeiner Kallweit <hkallweit1@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      b399a394
    • Heiner Kallweit's avatar
      r8169: fix RTL8111EVL EEE and green settings · 1814d6a8
      Heiner Kallweit authored
      
      
      Name of functions rtl_w0w1_eri and rtl_w0w1_phy is somewhat misleading
      regarding order of arguments. One could assume that w0w1 means
      argument with bits to be reset comes before argument with bits to set.
      However this is not the case.
      So fix the order of arguments in several statements.
      
      In addition fix EEE advertisement. The current code resets the bits
      for 100BaseT and 1000BaseT EEE advertisement what is not what we want.
      
      I have a little of a hard time to find a proper "Fixes" line as the
      issue seems to have been there forever (at least it existed already
      when the driver was moved to the current place in 2011).
      
      The patch was tested on a Zotac Mini-PC with a RTL8111E-VL chip.
      Before the patch EEE was disabled, now it's properly advertised and
      works fine.
      
      Signed-off-by: default avatarHeiner Kallweit <hkallweit1@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      1814d6a8
    • Xin Long's avatar
      tun: fix rcu_read_lock imbalance in tun_build_skb · 654d5738
      Xin Long authored
      
      
      rcu_read_lock in tun_build_skb is used to rcu_dereference tun->xdp_prog
      safely, rcu_read_unlock should be done in every return path.
      
      Now I could see one place missing it, where it returns NULL in switch-case
      XDP_REDIRECT,  another palce using rcu_read_lock wrongly, where it returns
      NULL in if (xdp_xmit) chunk.
      
      So fix both in this patch.
      
      Fixes: 761876c8 ("tap: XDP support")
      Signed-off-by: default avatarXin Long <lucien.xin@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      654d5738
    • Neal Cardwell's avatar
      tcp: when scheduling TLP, time of RTO should account for current ACK · ed66dfaf
      Neal Cardwell authored
      
      
      Fix the TLP scheduling logic so that when scheduling a TLP probe, we
      ensure that the estimated time at which an RTO would fire accounts for
      the fact that ACKs indicating forward progress should push back RTO
      times.
      
      After the following fix:
      
      df92c839 ("tcp: fix xmit timer to only be reset if data ACKed/SACKed")
      
      we had an unintentional behavior change in the following kind of
      scenario: suppose the RTT variance has been very low recently. Then
      suppose we send out a flight of N packets and our RTT is 100ms:
      
      t=0: send a flight of N packets
      t=100ms: receive an ACK for N-1 packets
      
      The response before df92c839 that was:
        -> schedule a TLP for now + RTO_interval
      
      The response after df92c839 is:
        -> schedule a TLP for t=0 + RTO_interval
      
      Since RTO_interval = srtt + RTT_variance, this means that we have
      scheduled a TLP timer at a point in the future that only accounts for
      RTT_variance. If the RTT_variance term is small, this means that the
      timer fires soon.
      
      Before df92c839 this would not happen, because in that code, when
      we receive an ACK for a prefix of flight, we did:
      
          1) Near the top of tcp_ack(), switch from TLP timer to RTO
             at write_queue_head->paket_tx_time + RTO_interval:
                  if (icsk->icsk_pending == ICSK_TIME_LOSS_PROBE)
                         tcp_rearm_rto(sk);
      
          2) In tcp_clean_rtx_queue(), update the RTO to now + RTO_interval:
                  if (flag & FLAG_ACKED) {
                         tcp_rearm_rto(sk);
      
          3) In tcp_ack() after tcp_fastretrans_alert() switch from RTO
             to TLP at now + RTO_interval:
                  if (icsk->icsk_pending == ICSK_TIME_RETRANS)
                         tcp_schedule_loss_probe(sk);
      
      In df92c839 we removed that 3-phase dance, and instead directly
      set the TLP timer once: we set the TLP timer in cases like this to
      write_queue_head->packet_tx_time + RTO_interval. So if the RTT
      variance is small, then this means that this is setting the TLP timer
      to fire quite soon. This means if the ACK for the tail of the flight
      takes longer than an RTT to arrive (often due to delayed ACKs), then
      the TLP timer fires too quickly.
      
      Fixes: df92c839 ("tcp: fix xmit timer to only be reset if data ACKed/SACKed")
      Signed-off-by: default avatarNeal Cardwell <ncardwell@google.com>
      Signed-off-by: default avatarYuchung Cheng <ycheng@google.com>
      Signed-off-by: default avatarEric Dumazet <edumazet@google.com>
      Acked-by: default avatarSoheil Hassas Yeganeh <soheil@google.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      ed66dfaf