1. 12 Sep, 2014 40 commits
    • Geert Uytterhoeven's avatar
      Documentation: Update stable address in Chinese and Japanese translations · 24513747
      Geert Uytterhoeven authored
      The English and Korean translations were updated, the Chinese and Japanese
      weren't.
      Signed-off-by: default avatarGeert Uytterhoeven <geert+renesas@glider.be>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      
      (cherry picked from commit 98b0f811)
      Signed-off-by: default avatarSasha Levin <sasha.levin@oracle.com>
      24513747
    • Liu Hua's avatar
      ARM: 8012/1: kdump: Avoid overflow when converting pfn to physaddr · 2cd77365
      Liu Hua authored
      When we configure CONFIG_ARM_LPAE=y, pfn << PAGE_SHIFT will
      overflow if pfn >= 0x100000 in copy_oldmem_page.
      So use __pfn_to_phys for converting.
      Signed-off-by: default avatarLiu Hua <sdu.liu@huawei.com>
      Signed-off-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
      
      (cherry picked from commit 8fad87bc)
      Signed-off-by: default avatarSasha Levin <sasha.levin@oracle.com>
      2cd77365
    • Jean-Jacques Hiblot's avatar
      usb: gadget: at91-udc: fix irq and iomem resource retrieval · 9e34d057
      Jean-Jacques Hiblot authored
      When using dt resources retrieval (interrupts and reg properties) there is
      no predefined order for these resources in the platform dev resource
      table. Also don't expect the number of resource to be always 2.
      Signed-off-by: default avatarJean-Jacques Hiblot <jjhiblot@traphandler.com>
      Acked-by: default avatarBoris BREZILLON <b.brezillon@overkiz.com>
      Acked-by: default avatarNicolas Ferre <nicolas.ferre@atmel.com>
      Cc: stable <stable@vger.kernel.org> # 3.4
      Signed-off-by: default avatarFelipe Balbi <balbi@ti.com>
      
      (cherry picked from commit 886c7c42)
      Signed-off-by: default avatarSasha Levin <sasha.levin@oracle.com>
      9e34d057
    • Corey Minyard's avatar
      ipmi: Reset the KCS timeout when starting error recovery · f4b6caff
      Corey Minyard authored
      The OBF timer in KCS was not reset in one situation when error recovery
      was started, resulting in an immediate timeout.
      Reported-by: default avatarBodo Stroesser <bstroesser@ts.fujitsu.com>
      Signed-off-by: default avatarCorey Minyard <cminyard@mvista.com>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      
      (cherry picked from commit eb6d78ec)
      Signed-off-by: default avatarSasha Levin <sasha.levin@oracle.com>
      f4b6caff
    • Bodo Stroesser's avatar
      ipmi: Fix a race restarting the timer · 5910e763
      Bodo Stroesser authored
      With recent changes it is possible for the timer handler to detect an
      idle interface and not start the timer, but the thread to start an
      operation at the same time.  The thread will not start the timer in that
      instance, resulting in the timer not running.
      
      Instead, move all timer operations under the lock and start the timer in
      the thread if it detect non-idle and the timer is not already running.
      Moving under locks allows the last timeout to be set in both the thread
      and the timer.  'Timer is not running' means that the timer is not
      pending and smi_timeout() is not running.  So we need a flag to detect
      this correctly.
      
      Also fix a few other timeout bugs: setting the last timeout when the
      interrupt has to be disabled and the timer started, and setting the last
      timeout in check_start_timer_thread possibly racing with the timer
      Signed-off-by: default avatarCorey Minyard <cminyard@mvista.com>
      Signed-off-by: default avatarBodo Stroesser <bstroesser@ts.fujitsu.com>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      
      (cherry picked from commit 48e8ac29)
      Signed-off-by: default avatarSasha Levin <sasha.levin@oracle.com>
      5910e763
    • Andreas Schwab's avatar
      powerpc: Add vr save/restore functions · 927299fa
      Andreas Schwab authored
      GCC 4.8 now generates out-of-line vr save/restore functions when
      optimizing for size.  They are needed for the raid6 altivec support.
      Signed-off-by: default avatarAndreas Schwab <schwab@linux-m68k.org>
      Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
      
      (cherry picked from commit 8fe9c93e)
      Signed-off-by: default avatarSasha Levin <sasha.levin@oracle.com>
      927299fa
    • Steven Rostedt (Red Hat)'s avatar
      tracepoint: Do not waste memory on mods with no tracepoints · 897bf439
      Steven Rostedt (Red Hat) authored
      No reason to allocate tp_module structures for modules that have no
      tracepoints. This just wastes memory.
      
      Fixes: b75ef8b4 "Tracepoint: Dissociate from module mutex"
      Acked-by: default avatarMathieu Desnoyers <mathieu.desnoyers@efficios.com>
      Signed-off-by: default avatarSteven Rostedt <rostedt@goodmis.org>
      
      (cherry picked from commit 7dec935a)
      Signed-off-by: default avatarSasha Levin <sasha.levin@oracle.com>
      897bf439
    • Thomas Graf's avatar
      netfilter: Can't fail and free after table replacement · f1a1821b
      Thomas Graf authored
      All xtables variants suffer from the defect that the copy_to_user()
      to copy the counters to user memory may fail after the table has
      already been exchanged and thus exposed. Return an error at this
      point will result in freeing the already exposed table. Any
      subsequent packet processing will result in a kernel panic.
      
      We can't copy the counters before exposing the new tables as we
      want provide the counter state after the old table has been
      unhooked. Therefore convert this into a silent error.
      
      Cc: Florian Westphal <fw@strlen.de>
      Signed-off-by: default avatarThomas Graf <tgraf@suug.ch>
      Signed-off-by: default avatarPablo Neira Ayuso <pablo@netfilter.org>
      
      (cherry picked from commit c58dd2dd)
      Signed-off-by: default avatarSasha Levin <sasha.levin@oracle.com>
      f1a1821b
    • Andrey Vagin's avatar
      netfilter: nf_conntrack: reserve two bytes for nf_ct_ext->len · 0e64aee6
      Andrey Vagin authored
      "len" contains sizeof(nf_ct_ext) and size of extensions. In a worst
      case it can contain all extensions. Bellow you can find sizes for all
      types of extensions. Their sum is definitely bigger than 256.
      
      nf_ct_ext_types[0]->len = 24
      nf_ct_ext_types[1]->len = 32
      nf_ct_ext_types[2]->len = 24
      nf_ct_ext_types[3]->len = 32
      nf_ct_ext_types[4]->len = 152
      nf_ct_ext_types[5]->len = 2
      nf_ct_ext_types[6]->len = 16
      nf_ct_ext_types[7]->len = 8
      
      I have seen "len" up to 280 and my host has crashes w/o this patch.
      
      The right way to fix this problem is reducing the size of the ecache
      extension (4) and Florian is going to do this, but these changes will
      be quite large to be appropriate for a stable tree.
      
      Fixes: 5b423f6a (netfilter: nf_conntrack: fix racy timer handling with reliable)
      Cc: Pablo Neira Ayuso <pablo@netfilter.org>
      Cc: Patrick McHardy <kaber@trash.net>
      Cc: Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>
      Cc: "David S. Miller" <davem@davemloft.net>
      Signed-off-by: default avatarAndrey Vagin <avagin@openvz.org>
      Signed-off-by: default avatarPablo Neira Ayuso <pablo@netfilter.org>
      
      (cherry picked from commit 223b02d9)
      Signed-off-by: default avatarSasha Levin <sasha.levin@oracle.com>
      0e64aee6
    • Dan Carpenter's avatar
      SCSI: megaraid: missing bounds check in mimd_to_kioc() · a8d187f8
      Dan Carpenter authored
      commit 3de22601 upstream.
      
      pthru32->dataxferlen comes from the user so we need to check that it's
      not too large so we don't overflow the buffer.
      Reported-by: default avatarNico Golde <nico@ngolde.de>
      Reported-by: default avatarFabian Yamaguchi <fabs@goesec.de>
      Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
      Acked-by: default avatarSumit Saxena <sumit.saxena@lsi.com>
      Signed-off-by: default avatarJames Bottomley <JBottomley@Parallels.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      
      (cherry picked from commit 3307c63b)
      
      (cherry picked from commit HEAD)
      Signed-off-by: default avatarSasha Levin <sasha.levin@oracle.com>
      a8d187f8
    • Dan Carpenter's avatar
      mtd: sm_ftl: heap corruption in sm_create_sysfs_attributes() · 4d34c844
      Dan Carpenter authored
      We always put a NUL terminator one space past the end of the "vendor"
      buffer.  Walter Harms also pointed out that this should just use
      kstrndup().
      
      Fixes: 7d17c02a ('mtd: Add new SmartMedia/xD FTL')
      Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
      Signed-off-by: default avatarBrian Norris <computersforpeace@gmail.com>
      
      (cherry picked from commit b4c23305)
      Signed-off-by: default avatarSasha Levin <sasha.levin@oracle.com>
      4d34c844
    • Dan Carpenter's avatar
      mtd: nuc900_nand: NULL dereference in nuc900_nand_enable() · c3dab066
      Dan Carpenter authored
      Instead of writing to "nand->reg + REG_FMICSR" we write to "REG_FMICSR"
      which is NULL and not a valid register.
      
      Fixes: 8bff82cb ('mtd: add nand support for w90p910 (v2)')
      Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
      Signed-off-by: default avatarBrian Norris <computersforpeace@gmail.com>
      
      (cherry picked from commit c69dbbf3)
      Signed-off-by: default avatarSasha Levin <sasha.levin@oracle.com>
      c3dab066
    • Ard Biesheuvel's avatar
      crypto: ghash-clmulni-intel - use C implementation for setkey() · c3d411f3
      Ard Biesheuvel authored
      The GHASH setkey() function uses SSE registers but fails to call
      kernel_fpu_begin()/kernel_fpu_end(). Instead of adding these calls, and
      then having to deal with the restriction that they cannot be called from
      interrupt context, move the setkey() implementation to the C domain.
      
      Note that setkey() does not use any particular SSE features and is not
      expected to become a performance bottleneck.
      Signed-off-by: default avatarArd Biesheuvel <ard.biesheuvel@linaro.org>
      Acked-by: default avatarH. Peter Anvin <hpa@linux.intel.com>
      Fixes: 0e1227d3 (crypto: ghash - Add PCLMULQDQ accelerated implementation)
      Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
      
      (cherry picked from commit 8ceee728)
      Signed-off-by: default avatarSasha Levin <sasha.levin@oracle.com>
      c3d411f3
    • David Cohen's avatar
      usb/xhci: fix compilation warning when !CONFIG_PCI && !CONFIG_PM · 228081ce
      David Cohen authored
      When CONFIG_PCI and CONFIG_PM are not selected, xhci.c gets this
      warning:
      drivers/usb/host/xhci.c:409:13: warning: ‘xhci_msix_sync_irqs’ defined
      but not used [-Wunused-function]
      
      Instead of creating nested #ifdefs, this patch fixes it by defining the
      xHCI PCI stubs as inline.
      
      This warning has been in since 3.2 kernel and was
      caused by commit 421aa841
      "usb/xhci: hide MSI code behind PCI bars", but wasn't noticed
      until 3.13 when a configuration with these options was tried
      Signed-off-by: default avatarDavid Cohen <david.a.cohen@linux.intel.com>
      Cc: stable@vger.kernel.org # 3.2
      Signed-off-by: default avatarMathias Nyman <mathias.nyman@linux.intel.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      
      (cherry picked from commit 01bb59eb)
      Signed-off-by: default avatarSasha Levin <sasha.levin@oracle.com>
      228081ce
    • Igor Gnatenko's avatar
      xhci: extend quirk for Renesas cards · 9bda7a55
      Igor Gnatenko authored
      After suspend another Renesas PCI-X USB 3.0 card doesn't work.
      [root@fedora-20 ~]# lspci -vmnnd 1912:
      Device:	03:00.0
      Class:	USB controller [0c03]
      Vendor:	Renesas Technology Corp. [1912]
      Device:	uPD720202 USB 3.0 Host Controller [0015]
      SVendor:	Renesas Technology Corp. [1912]
      SDevice:	uPD720202 USB 3.0 Host Controller [0015]
      Rev:	02
      ProgIf:	30
      
      This patch should be applied to stable kernel 3.14 that contain
      the commit 1aa9578c
      "xhci: Fix resume issues on Renesas chips in Samsung laptops"
      Reported-and-tested-by: default avatarAnatoly Kharchenko <rfr-bugs@yandex.ru>
      Reference: http://redmine.russianfedora.pro/issues/1315Signed-off-by: default avatarIgor Gnatenko <i.gnatenko.brain@gmail.com>
      Cc: stable@vger.kernel.org # 3.14
      Signed-off-by: default avatarMathias Nyman <mathias.nyman@linux.intel.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      
      (cherry picked from commit 6db249eb)
      Signed-off-by: default avatarSasha Levin <sasha.levin@oracle.com>
      9bda7a55
    • supriya karanth's avatar
      usb: musb: set TXMAXP and AUTOSET for full speed bulk in device mode · 9905308a
      supriya karanth authored
      The TXMAXP register is not set correctly for full speed bulk case
      when the can_bulk_split() is used. Without this PIO transfers will
      not take place correctly
      
      The "mult" factor needs to be updated correctly for the
      can_bulk_split() case
      
      The AUTOSET bit in the TXCSR is not being set if the "mult"
      factor is greater than 0 for the High Bandwidth ISO case.
      But the "mult" factor is also greater than 0 in case of Full speed
      bulk transfers with the packet splitting in TXMAXP register
      
      Without the AUTOSET the DMA transfers will not progress in mode1
      
      [ balbi@ti.com : add braces to both branches ]
      Signed-off-by: default avatarsupriya karanth <supriya.karanth@stericsson.com>
      Signed-off-by: default avatarPraveena NADAHALLY <praveen.nadahally@stericsson.com>
      Acked-by: default avatarLinus Walleij <linus.walleij@linaro.org>
      Signed-off-by: default avatarFelipe Balbi <balbi@ti.com>
      
      (cherry picked from commit bb3a2ef2)
      Signed-off-by: default avatarSasha Levin <sasha.levin@oracle.com>
      9905308a
    • Dan Carpenter's avatar
      SCSI: arcmsr: upper 32 of dma address lost · dac73e9c
      Dan Carpenter authored
      commit e2c70425 upstream.
      
      The original code always set the upper 32 bits to zero because it was
      doing a shift of the wrong variable.
      
      Fixes: 1a4f550a ('[SCSI] arcmsr: 1.20.00.15: add SATA RAID plus other fixes')
      Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
      Signed-off-by: default avatarJames Bottomley <JBottomley@Parallels.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      
      (cherry picked from commit 8ba4bc76)
      
      (cherry picked from commit HEAD)
      Signed-off-by: default avatarSasha Levin <sasha.levin@oracle.com>
      dac73e9c
    • Roger Quadros's avatar
      ARM: OMAP3: hwmod data: Correct clock domains for USB modules · a869b1eb
      Roger Quadros authored
      OMAP3 doesn't contain "l3_init_clkdm" clock domain. Use the
      proper clock domains for USB Host and USB TLL modules.
      
      Gets rid of the following warnings during boot
       omap_hwmod: usb_host_hs: could not associate to clkdm l3_init_clkdm
       omap_hwmod: usb_tll_hs: could not associate to clkdm l3_init_clkdm
      Reported-by: default avatarNishanth Menon <nm@ti.com>
      Cc: Paul Walmsley <paul@pwsan.com>
      Signed-off-by: default avatarRoger Quadros <rogerq@ti.com>
      Fixes: de231388 ("ARM: OMAP: USB: EHCI and OHCI hwmod structures for OMAP3")
      Cc: Keshava Munegowda <keshava_mgowda@ti.com>
      Cc: Partha Basak <parthab@india.ti.com>
      Signed-off-by: default avatarPaul Walmsley <paul@pwsan.com>
      
      (cherry picked from commit c6c56697)
      Signed-off-by: default avatarSasha Levin <sasha.levin@oracle.com>
      a869b1eb
    • Jiri Slaby's avatar
      Char: ipmi_bt_sm, fix infinite loop · 5cf80c0f
      Jiri Slaby authored
      In read_all_bytes, we do
      
        unsigned char i;
        ...
        bt->read_data[0] = BMC2HOST;
        bt->read_count = bt->read_data[0];
        ...
        for (i = 1; i <= bt->read_count; i++)
          bt->read_data[i] = BMC2HOST;
      
      If bt->read_data[0] == bt->read_count == 255, we loop infinitely in the
      'for' loop.  Make 'i' an 'int' instead of 'char' to get rid of the
      overflow and finish the loop after 255 iterations every time.
      Signed-off-by: default avatarJiri Slaby <jslaby@suse.cz>
      Reported-and-debugged-by: default avatarRui Hui Dian <rhdian@novell.com>
      Cc: Tomas Cech <tcech@suse.cz>
      Cc: Corey Minyard <minyard@acm.org>
      Cc: <openipmi-developer@lists.sourceforge.net>
      Signed-off-by: default avatarCorey Minyard <cminyard@mvista.com>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      
      (cherry picked from commit a94cdd1f)
      Signed-off-by: default avatarSasha Levin <sasha.levin@oracle.com>
      5cf80c0f
    • Mikulas Patocka's avatar
      powernow-k6: reorder frequencies · aebd870f
      Mikulas Patocka authored
      This patch reorders reported frequencies from the highest to the lowest,
      just like in other frequency drivers.
      Signed-off-by: default avatarMikulas Patocka <mpatocka@redhat.com>
      Acked-by: default avatarViresh Kumar <viresh.kumar@linaro.org>
      Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
      
      (cherry picked from commit 22c73795)
      Signed-off-by: default avatarSasha Levin <sasha.levin@oracle.com>
      aebd870f
    • Mikulas Patocka's avatar
      powernow-k6: correctly initialize default parameters · 1ec3b01b
      Mikulas Patocka authored
      The powernow-k6 driver used to read the initial multiplier from the
      powernow register. However, there is a problem with this:
      
      * If there was a frequency transition before, the multiplier read from the
        register corresponds to the current multiplier.
      * If there was no frequency transition since reset, the field in the
        register always reads as zero, regardless of the current multiplier that
        is set using switches on the mainboard and that the CPU is running at.
      
      The zero value corresponds to multiplier 4.5, so as a consequence, the
      powernow-k6 driver always assumes multiplier 4.5.
      
      For example, if we have 550MHz CPU with bus frequency 100MHz and
      multiplier 5.5, the powernow-k6 driver thinks that the multiplier is 4.5
      and bus frequency is 122MHz. The powernow-k6 driver then sets the
      multiplier to 4.5, underclocking the CPU to 450MHz, but reports the
      current frequency as 550MHz.
      
      There is no reliable way how to read the initial multiplier. I modified
      the driver so that it contains a table of known frequencies (based on
      parameters of existing CPUs and some common overclocking schemes) and sets
      the multiplier according to the frequency. If the frequency is unknown
      (because of unusual overclocking or underclocking), the user must supply
      the bus speed and maximum multiplier as module parameters.
      
      This patch should be backported to all stable kernels. If it doesn't
      apply cleanly, change it, or ask me to change it.
      Signed-off-by: default avatarMikulas Patocka <mpatocka@redhat.com>
      Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
      
      (cherry picked from commit d82b922a)
      Signed-off-by: default avatarSasha Levin <sasha.levin@oracle.com>
      1ec3b01b
    • Mikulas Patocka's avatar
      powernow-k6: disable cache when changing frequency · 739e8562
      Mikulas Patocka authored
      I found out that a system with k6-3+ processor is unstable during network
      server load. The system locks up or the network card stops receiving. The
      reason for the instability is the CPU frequency scaling.
      
      During frequency transition the processor is in "EPM Stop Grant" state.
      The documentation says that the processor doesn't respond to inquiry
      requests in this state. Consequently, coherency of processor caches and
      bus master devices is not maintained, causing the system instability.
      
      This patch flushes the cache during frequency transition. It fixes the
      instability.
      
      Other minor changes:
      * u64 invalue changed to unsigned long because the variable is 32-bit
      * move the logic to set the multiplier to a separate function
        powernow_k6_set_cpu_multiplier
      * preserve lower 5 bits of the powernow port instead of 4 (the voltage
        field has 5 bits)
      * mask interrupts when reading the multiplier, so that the port is not
        open during other activity (running other kernel code with the port open
        shouldn't cause any misbehavior, but we should better be safe and keep
        the port closed)
      
      This patch should be backported to all stable kernels. If it doesn't
      apply cleanly, change it, or ask me to change it.
      Signed-off-by: default avatarMikulas Patocka <mpatocka@redhat.com>
      Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
      
      (cherry picked from commit e20e1d0a)
      Signed-off-by: default avatarSasha Levin <sasha.levin@oracle.com>
      739e8562
    • Dan Carpenter's avatar
      ALSA: ak4xx-adda: info leak in ak4xxx_capture_source_info() · 15813d5a
      Dan Carpenter authored
      "idx" is controled by the user and can be a negative offset into the
      input_names[] array.
      Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      
      (cherry picked from commit bd5fe738)
      Signed-off-by: default avatarSasha Levin <sasha.levin@oracle.com>
      15813d5a
    • Sarah Sharp's avatar
      xhci: Don't enable/disable RWE on bus suspend/resume. · 5e796710
      Sarah Sharp authored
      The RWE bit of the USB 2.0 PORTPMSC register is supposed to enable
      remote wakeup for devices in the lower power link state L1.  It has
      nothing to do with the device suspend remote wakeup from L2.  The RWE
      bit is designed to be set once (when USB 2.0 LPM is enabled for the
      port) and cleared only when USB 2.0 LPM is disabled for the port.
      
      The xHCI bus suspend method was setting the RWE bit erroneously, and the
      bus resume method was clearing it.  The xHCI 1.0 specification with
      errata up to Aug 12, 2012 says in section 4.23.5.1.1.1 "Hardware
      Controlled LPM":
      
      "While Hardware USB2 LPM is enabled, software shall not modify the
      HIRDBESL or RWE fields of the USB2 PORTPMSC register..."
      
      If we have previously enabled USB 2.0 LPM for a device, that means when
      the USB 2.0 bus is resumed, we violate the xHCI specification by
      clearing RWE.  It also means that after a bus resume, the host would
      think remote wakeup is disabled from L1 for ports with USB 2.0 Link PM
      enabled, which is not what we want.
      
      This patch should be backported to kernels as old as 3.2, that
      contain the commit 65580b43 "xHCI: set
      USB2 hardware LPM".  That was the first kernel that supported USB 2.0
      Link PM.
      Signed-off-by: default avatarSarah Sharp <sarah.a.sharp@linux.intel.com>
      Cc: stable@vger.kernel.org
      
      (cherry picked from commit f217c980)
      Signed-off-by: default avatarSasha Levin <sasha.levin@oracle.com>
      5e796710
    • Takashi Iwai's avatar
      ALSA: hda - Add Conexant CX20751/2/3/4 codec support · 98b5a9fe
      Takashi Iwai authored
      These are almost compatible with the older Conexant codecs.
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      
      (cherry picked from commit 61d648fb)
      Signed-off-by: default avatarSasha Levin <sasha.levin@oracle.com>
      98b5a9fe
    • Alan Stern's avatar
      USB: EHCI: bugfix: urb->hcpriv should not be NULL · 6f28501b
      Alan Stern authored
      This patch (as1632b) fixes a bug in ehci-hcd.  The USB core uses
      urb->hcpriv to determine whether or not an URB is active; host
      controller drivers are supposed to set this pointer to a non-NULL
      value when an URB is queued.  However ehci-hcd sets it to NULL for
      isochronous URBs, which defeats the check in usbcore.
      
      In itself this isn't a big deal.  But people have recently found that
      certain sequences of actions will cause the snd-usb-audio driver to
      reuse URBs without waiting for them to complete.  In the absence of
      proper checking by usbcore, the URBs get added to their endpoint list
      twice.  This leads to list corruption and a system freeze.
      
      The patch makes ehci-hcd assign a meaningful value to urb->hcpriv for
      isochronous URBs.  Improving robustness always helps.
      Signed-off-by: default avatarAlan Stern <stern@rowland.harvard.edu>
      Reported-by: default avatarArtem S. Tashkinov <t.artem@lycos.com>
      Reported-by: default avatarChristof Meerwald <cmeerw@cmeerw.org>
      CC: <stable@vger.kernel.org>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      
      (cherry picked from commit 2656a9ab)
      Signed-off-by: default avatarSasha Levin <sasha.levin@oracle.com>
      6f28501b
    • Sujith Manoharan's avatar
      ath9k: Fix noisefloor calibration · 86b07585
      Sujith Manoharan authored
      The commits,
      
      "ath9k: Fix regression in channelwidth switch at the same channel"
      "ath9k: Fix invalid noisefloor reading due to channel update"
      
      attempted to fix noisefloor calibration when a channel switch
      happens due to HT20/HT40 bandwidth change. This is causing invalid
      readings resulting in messages like:
      
      "ath: phy16: NF[0] (-45) > MAX (-95), correcting to MAX".
      
      This results in an incorrect noise being used initially for reporting
      the signal level of received packets, until NF calibration is done
      and the history buffer is updated via the ANI timer, which happens
      much later.
      
      When a bandwidth change happens, it is appropriate to reset
      the internal history data for the channel. Do this correctly in the
      reset() routine by checking the "chanmode" variable.
      
      Cc: stable@vger.kernel.org
      Cc: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
      Signed-off-by: default avatarSujith Manoharan <c_manoha@qca.qualcomm.com>
      Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
      
      (cherry picked from commit 696df785)
      Signed-off-by: default avatarSasha Levin <sasha.levin@oracle.com>
      86b07585
    • Arnd Bergmann's avatar
      ARM: w90x900: fix legacy assembly syntax · 96177bdb
      Arnd Bergmann authored
      New ARM binutils don't allow extraneous whitespace inside
      of brackets, which causes this error on all mach-w90x900
      defconfigs:
      
      arch/arm/kernel/entry-armv.S: Assembler messages:
      arch/arm/kernel/entry-armv.S:214: Error: ARM register expected -- `ldr r0,[ r6,#(0x10C)]'
      arch/arm/kernel/entry-armv.S:214: Error: ARM register expected -- `ldr r0,[ r6,#(0x110)]'
      arch/arm/kernel/entry-armv.S:430: Error: ARM register expected -- `ldr r0,[ r6,#(0x10C)]'
      arch/arm/kernel/entry-armv.S:430: Error: ARM register expected -- `ldr r0,[ r6,#(0x110)]'
      
      This removes the whitespace in order to build the kernel
      again.
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      Cc: Wan ZongShun <mcuos.com@gmail.com>
      
      (cherry picked from commit fa5ce5f9)
      Signed-off-by: default avatarSasha Levin <sasha.levin@oracle.com>
      96177bdb
    • Nicholas Santos's avatar
      HID: usbhid: quirk for Formosa IR receiver · 11a5ea0a
      Nicholas Santos authored
      Patch to add the Formosa Industrial Computing, Inc. Infrared Receiver
      [IR605A/Q] to hid-ids.h and hid-quirks.c.  This IR receiver causes about a 10
      second timeout when the usbhid driver attempts to initialze the device.  Adding
      this device to the quirks list with HID_QUIRK_NO_INIT_REPORTS removes the
      delay.
      Signed-off-by: default avatarNicholas Santos <nicholas.santos@gmail.com>
      [jkosina@suse.cz: fix ordering]
      Signed-off-by: default avatarJiri Kosina <jkosina@suse.cz>
      
      (cherry picked from commit 320cde19)
      Signed-off-by: default avatarSasha Levin <sasha.levin@oracle.com>
      11a5ea0a
    • Paul Moore's avatar
      selinux: correctly label /proc inodes in use before the policy is loaded · 012fdcc7
      Paul Moore authored
      This patch is based on an earlier patch by Eric Paris, he describes
      the problem below:
      
        "If an inode is accessed before policy load it will get placed on a
         list of inodes to be initialized after policy load.  After policy
         load we call inode_doinit() which calls inode_doinit_with_dentry()
         on all inodes accessed before policy load.  In the case of inodes
         in procfs that means we'll end up at the bottom where it does:
      
           /* Default to the fs superblock SID. */
           isec->sid = sbsec->sid;
      
           if ((sbsec->flags & SE_SBPROC) && !S_ISLNK(inode->i_mode)) {
                   if (opt_dentry) {
                           isec->sclass = inode_mode_to_security_class(...)
                           rc = selinux_proc_get_sid(opt_dentry,
                                                     isec->sclass,
                                                     &sid);
                           if (rc)
                                   goto out_unlock;
                           isec->sid = sid;
                   }
           }
      
         Since opt_dentry is null, we'll never call selinux_proc_get_sid()
         and will leave the inode labeled with the label on the superblock.
         I believe a fix would be to mimic the behavior of xattrs.  Look
         for an alias of the inode.  If it can't be found, just leave the
         inode uninitialized (and pick it up later) if it can be found, we
         should be able to call selinux_proc_get_sid() ..."
      
      On a system exhibiting this problem, you will notice a lot of files in
      /proc with the generic "proc_t" type (at least the ones that were
      accessed early in the boot), for example:
      
         # ls -Z /proc/sys/kernel/shmmax | awk '{ print $4 " " $5 }'
         system_u:object_r:proc_t:s0 /proc/sys/kernel/shmmax
      
      However, with this patch in place we see the expected result:
      
         # ls -Z /proc/sys/kernel/shmmax | awk '{ print $4 " " $5 }'
         system_u:object_r:sysctl_kernel_t:s0 /proc/sys/kernel/shmmax
      
      Cc: Eric Paris <eparis@redhat.com>
      Signed-off-by: default avatarPaul Moore <pmoore@redhat.com>
      Acked-by: default avatarEric Paris <eparis@redhat.com>
      
      selinux: put the mmap() DAC controls before the MAC controls
      
      It turns out that doing the SELinux MAC checks for mmap() before the
      DAC checks was causing users and the SELinux policy folks headaches
      as users were seeing a lot of SELinux AVC denials for the
      memprotect:mmap_zero permission that would have also been denied by
      the normal DAC capability checks (CAP_SYS_RAWIO).
      
      Example:
      
       # cat mmap_test.c
        #include <stdlib.h>
        #include <stdio.h>
        #include <errno.h>
        #include <sys/mman.h>
      
        int main(int argc, char *argv[])
        {
              int rc;
              void *mem;
      
              mem = mmap(0x0, 4096,
                         PROT_READ | PROT_WRITE,
                         MAP_PRIVATE | MAP_ANONYMOUS | MAP_FIXED, -1, 0);
              if (mem == MAP_FAILED)
                      return errno;
              printf("mem = %p\n", mem);
              munmap(mem, 4096);
      
              return 0;
        }
       # gcc -g -O0 -o mmap_test mmap_test.c
       # ./mmap_test
       mem = (nil)
       # ausearch -m AVC | grep mmap_zero
       type=AVC msg=audit(...): avc:  denied  { mmap_zero }
         for pid=1025 comm="mmap_test"
         scontext=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023
         tcontext=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023
         tclass=memprotect
      
      This patch corrects things so that when the above example is run by a
      user without CAP_SYS_RAWIO the SELinux AVC is no longer generated as
      the DAC capability check fails before the SELinux permission check.
      Signed-off-by: default avatarPaul Moore <pmoore@redhat.com>
      Acked-by: default avatarStephen Smalley <sds@tycho.nsa.gov>
      
      selinux: fix the output of ./scripts/get_maintainer.pl for SELinux
      
      Correctly tag the SELinux mailing list as moderated for non-subscribers
      and do some shuffling of the SELinux maintainers to try and make things
      more clear when the scripts/get_maintainer.pl script is used.
      
       # ./scripts/get_maintainer.pl -f security/selinux
       Paul Moore <paul@paul-moore.com> (supporter:SELINUX SECURITY...)
       Stephen Smalley <sds@tycho.nsa.gov> (supporter:SELINUX SECURITY...)
       Eric Paris <eparis@parisplace.org> (supporter:SELINUX SECURITY...)
       James Morris <james.l.morris@oracle.com> (supporter:SECURITY SUBSYSTEM)
       selinux@tycho.nsa.gov (moderated list:SELINUX SECURITY...)
       linux-security-module@vger.kernel.org (open list:SECURITY SUBSYSTEM)
       linux-kernel@vger.kernel.org (open list)
      
      Cc: Stephen Smalley <sds@tycho.nsa.gov>
      Cc: Eric Paris <eparis@parisplace.org>
      Cc: James Morris <james.l.morris@oracle.com>
      Signed-off-by: default avatarPaul Moore <pmoore@redhat.com>
      
      Merge branch 'next-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/zohar/linux-integrity into next
      
      evm: enable key retention service automatically
      
      If keys are not enabled, EVM is not visible in the configuration menu.
      It may be difficult to figure out what to do unless you really know.
      Other subsystems as NFS, CIFS select keys automatically. This patch does
      the same.
      
      This patch also removes '(TRUSTED_KEYS=y || TRUSTED_KEYS=n)' dependency,
      which is unnecessary. EVM does not depend on trusted keys, but on
      encrypted keys. evm.h provides compile time dependency.
      Signed-off-by: default avatarDmitry Kasatkin <d.kasatkin@samsung.com>
      Signed-off-by: default avatarMimi Zohar <zohar@linux.vnet.ibm.com>
      
      ima: skip memory allocation for empty files
      
      Memory allocation is unnecessary for empty files.
      This patch calculates the hash without memory allocation.
      Signed-off-by: default avatarDmitry Kasatkin <d.kasatkin@samsung.com>
      Signed-off-by: default avatarMimi Zohar <zohar@linux.vnet.ibm.com>
      
      evm: EVM does not use MD5
      
      EVM does not use MD5 HMAC. Selection of CRYPTO_MD5 can be safely removed.
      Signed-off-by: default avatarDmitry Kasatkin <d.kasatkin@samsung.com>
      Signed-off-by: default avatarMimi Zohar <zohar@linux.vnet.ibm.com>
      
      ima: return d_name.name if d_path fails
      
      This is a small refactoring so ima_d_path() returns dentry name
      if path reconstruction fails. It simplifies callers actions
      and removes code duplication.
      Signed-off-by: default avatarDmitry Kasatkin <d.kasatkin@samsung.com>
      Signed-off-by: default avatarMimi Zohar <zohar@linux.vnet.ibm.com>
      
      integrity: fix checkpatch errors
      
      Between checkpatch changes (eg. sizeof) and inconsistencies between
      Lindent and checkpatch, unfixed checkpatch errors make it difficult
      to see new errors. This patch fixes them. Some lines with over 80 chars
      remained unchanged to improve code readability.
      
      The "extern" keyword is removed from internal evm.h to make it consistent
      with internal ima.h.
      Signed-off-by: default avatarDmitry Kasatkin <d.kasatkin@samsung.com>
      Signed-off-by: default avatarMimi Zohar <zohar@linux.vnet.ibm.com>
      
      ima: fix erroneous removal of security.ima xattr
      
      ima_inode_post_setattr() calls ima_must_appraise() to check if the
      file needs to be appraised. If it does not then it removes security.ima
      xattr. With original policy matching code it might happen that even
      file needs to be appraised with FILE_CHECK hook, it might not be
      for POST_SETATTR hook. 'security.ima' might be erronously removed.
      
      This patch treats POST_SETATTR as special wildcard function and will
      cause ima_must_appraise() to be true if any of the hooks rules matches.
      security.ima will not be removed if any of the hooks would require
      appraisal.
      Signed-off-by: default avatarDmitry Kasatkin <d.kasatkin@samsung.com>
      Signed-off-by: default avatarMimi Zohar <zohar@linux.vnet.ibm.com>
      
      security: integrity: Use a more current logging style
      
      Convert printks to pr_<level>.
      Add pr_fmt.
      Remove embedded prefixes.
      Signed-off-by: default avatarJoe Perches <joe@perches.com>
      Signed-off-by: default avatarMimi Zohar <zohar@linux.vnet.ibm.com>
      
      MAINTAINERS: email updates and other misc. changes
      
      Changes for Trusted/Encrypted keys, EVM, and IMA.
      Signed-off-by: default avatarMimi Zohar <zohar@linux.vnet.ibm.com>
      
      ima: reduce memory usage when a template containing the n field is used
      
      Before this change, to correctly calculate the template digest for the
      'ima' template, the event name field (id: 'n') length was set to the fixed
      size of 256 bytes.
      
      This patch reduces the length of the event name field to the string
      length incremented of one (to make room for the termination character '\0')
      and handles the specific case of the digest calculation for the 'ima'
      template directly in ima_calc_field_array_hash_tfm().
      Signed-off-by: default avatarRoberto Sassu <roberto.sassu@polito.it>
      Signed-off-by: default avatarMimi Zohar <zohar@linux.vnet.ibm.com>
      
      ima: restore the original behavior for sending data with ima template
      
      With the new template mechanism introduced in IMA since kernel 3.13,
      the format of data sent through the binary_runtime_measurements interface
      is slightly changed. Now, for a generic measurement, the format of
      template data (after the template name) is:
      
      template_len | field1_len | field1 | ... | fieldN_len | fieldN
      
      In addition, fields containing a string now include the '\0' termination
      character.
      
      Instead, the format for the 'ima' template should be:
      
      SHA1 digest | event name length | event name
      
      It must be noted that while in the IMA 3.13 code 'event name length' is
      'IMA_EVENT_NAME_LEN_MAX + 1' (256 bytes), so that the template digest
      is calculated correctly, and 'event name' contains '\0', in the pre 3.13
      code 'event name length' is exactly the string length and 'event name'
      does not contain the termination character.
      
      The patch restores the behavior of the IMA code pre 3.13 for the 'ima'
      template so that legacy userspace tools obtain a consistent behavior
      when receiving data from the binary_runtime_measurements interface
      regardless of which kernel version is used.
      Signed-off-by: default avatarRoberto Sassu <roberto.sassu@polito.it>
      Cc: <stable@vger.kernel.org> # 3.3.13: 3ce1217 ima: define template fields library
      Signed-off-by: default avatarMimi Zohar <zohar@linux.vnet.ibm.com>
      
      Integrity: Pass commname via get_task_comm()
      
      When we pass task->comm to audit_log_untrustedstring(), we need to pass it
      via get_task_comm() because task->comm can be changed to contain untrusted
      string by other threads after audit_log_untrustedstring() confirmed that
      task->comm does not contain untrusted string.
      Signed-off-by: default avatarTetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
      Signed-off-by: default avatarMimi Zohar <zohar@linux.vnet.ibm.com>
      
      fs: move i_readcount
      
      On a 64-bit system, a hole exists in the 'inode' structure after
      i_writecount.  This patch moves i_readcount to fill this hole.
      Reported-by: default avatarDavid Howells <dhowells@redhat.com>
      Signed-off-by: default avatarMimi Zohar <zohar@linux.vnet.ibm.com>
      Acked-by: default avatarDavid Howells <dhowells@redhat.com>
      
      ima: use static const char array definitions
      
      A const char pointer allocates memory for a pointer as well as for
      a string,  This patch replaces a number of the const char pointers
      throughout IMA, with a static const char array.
      Suggested-by: default avatarDavid Howells <dhowells@redhat.com>
      Signed-off-by: default avatarMimi Zohar <zohar@linux.vnet.ibm.com>
      Acked-by: default avatarDavid Howells <dhowells@redhat.com>
      
      security: have cap_dentry_init_security return error
      
      Currently, cap_dentry_init_security returns 0 without actually
      initializing the security label. This confuses its only caller
      (nfs4_label_init_security) which expects an error in that situation, and
      causes it to end up sending out junk onto the wire instead of simply
      suppressing the label in the attributes sent.
      
      When CONFIG_SECURITY is disabled, security_dentry_init_security returns
      -EOPNOTSUPP. Have cap_dentry_init_security do the same.
      Signed-off-by: default avatarJeff Layton <jlayton@redhat.com>
      Acked-by: default avatarSerge E. Hallyn <serge.hallyn@ubuntu.com>
      Signed-off-by: default avatarJames Morris <james.l.morris@oracle.com>
      
      selinux: correctly label /proc inodes in use before the policy is loaded
      
      This patch is based on an earlier patch by Eric Paris, he describes
      the problem below:
      
        "If an inode is accessed before policy load it will get placed on a
         list of inodes to be initialized after policy load.  After policy
         load we call inode_doinit() which calls inode_doinit_with_dentry()
         on all inodes accessed before policy load.  In the case of inodes
         in procfs that means we'll end up at the bottom where it does:
      
           /* Default to the fs superblock SID. */
           isec->sid = sbsec->sid;
      
           if ((sbsec->flags & SE_SBPROC) && !S_ISLNK(inode->i_mode)) {
                   if (opt_dentry) {
                           isec->sclass = inode_mode_to_security_class(...)
                           rc = selinux_proc_get_sid(opt_dentry,
                                                     isec->sclass,
                                                     &sid);
                           if (rc)
                                   goto out_unlock;
                           isec->sid = sid;
                   }
           }
      
         Since opt_dentry is null, we'll never call selinux_proc_get_sid()
         and will leave the inode labeled with the label on the superblock.
         I believe a fix would be to mimic the behavior of xattrs.  Look
         for an alias of the inode.  If it can't be found, just leave the
         inode uninitialized (and pick it up later) if it can be found, we
         should be able to call selinux_proc_get_sid() ..."
      
      On a system exhibiting this problem, you will notice a lot of files in
      /proc with the generic "proc_t" type (at least the ones that were
      accessed early in the boot), for example:
      
         # ls -Z /proc/sys/kernel/shmmax | awk '{ print $4 " " $5 }'
         system_u:object_r:proc_t:s0 /proc/sys/kernel/shmmax
      
      However, with this patch in place we see the expected result:
      
         # ls -Z /proc/sys/kernel/shmmax | awk '{ print $4 " " $5 }'
         system_u:object_r:sysctl_kernel_t:s0 /proc/sys/kernel/shmmax
      
      Cc: Eric Paris <eparis@redhat.com>
      Signed-off-by: default avatarPaul Moore <pmoore@redhat.com>
      Acked-by: default avatarEric Paris <eparis@redhat.com>
      
      ima: new helper: file_inode(file)
      
      Replace "file->f_dentry->d_inode" with the new file_inode() helper
      function.
      Signed-off-by: default avatarLibo Chen <clbchenlibo.chen@huawei.com>
      Signed-off-by: default avatarMimi Zohar <zohar@linux.vnet.ibm.com>
      
      kernel: Mark function as static in kernel/seccomp.c
      
      Mark function as static in kernel/seccomp.c because it is not used
      outside this file.
      
      This eliminates the following warning in kernel/seccomp.c:
      kernel/seccomp.c:296:6: warning: no previous prototype for ?seccomp_attach_user_filter? [-Wmissing-prototypes]
      Signed-off-by: default avatarRashika Kheria <rashika.kheria@gmail.com>
      Reviewed-by: default avatarJosh Triplett <josh@joshtriplett.org>
      Acked-by: default avatarKees Cook <keescook@chromium.org>
      Acked-by: default avatarWill Drewry <wad@chromium.org>
      Signed-off-by: default avatarJames Morris <james.l.morris@oracle.com>
      
      capability: Use current logging styles
      
      Prefix logging output with "capability: " via pr_fmt.
      Convert printks to pr_<level>.
      Use pr_<level>_once instead of guard flags.
      Coalesce formats.
      Signed-off-by: default avatarJoe Perches <joe@perches.com>
      Acked-by: default avatarSerge E. Hallyn <serge.hallyn@ubuntu.com>
      Signed-off-by: default avatarJames Morris <james.l.morris@oracle.com>
      
      security: cleanup Makefiles to use standard syntax for specifying sub-directories
      
      The Makefiles in security/ uses a non-standard way to
      specify sub-directories for building.
      
      Fix it up so the normal (and documented) approach is used.
      Signed-off-by: default avatarSam Ravnborg <sam@ravnborg.org>
      Cc: Michal Marek <mmarek@suse.cz>
      Signed-off-by: default avatarJames Morris <james.l.morris@oracle.com>
      
      selinux: fix the output of ./scripts/get_maintainer.pl for SELinux
      
      Correctly tag the SELinux mailing list as moderated for non-subscribers
      and do some shuffling of the SELinux maintainers to try and make things
      more clear when the scripts/get_maintainer.pl script is used.
      
       # ./scripts/get_maintainer.pl -f security/selinux
       Paul Moore <paul@paul-moore.com> (supporter:SELINUX SECURITY...)
       Stephen Smalley <sds@tycho.nsa.gov> (supporter:SELINUX SECURITY...)
       Eric Paris <eparis@parisplace.org> (supporter:SELINUX SECURITY...)
       James Morris <james.l.morris@oracle.com> (supporter:SECURITY SUBSYSTEM)
       selinux@tycho.nsa.gov (moderated list:SELINUX SECURITY...)
       linux-security-module@vger.kernel.org (open list:SECURITY SUBSYSTEM)
       linux-kernel@vger.kernel.org (open list)
      
      Cc: Eric Paris <eparis@parisplace.org>
      Acked-by: default avatarStephen Smalley <sds@tycho.nsa.gov>
      Signed-off-by: default avatarPaul Moore <pmoore@redhat.com>
      Signed-off-by: default avatarJames Morris <james.l.morris@oracle.com>
      
      security: replace strict_strto*() with kstrto*()
      
      The usage of strict_strto*() is not preferred, because
      strict_strto*() is obsolete. Thus, kstrto*() should be
      used.
      Signed-off-by: default avatarJingoo Han <jg1.han@samsung.com>
      Signed-off-by: default avatarJames Morris <james.l.morris@oracle.com>
      
      Merge branch 'master' of git://git.infradead.org/users/pcmoore/selinux into next
      
      Merge branch 'master' of git://git.infradead.org/users/pcmoore/selinux into next
      
      Conflicts:
      	security/selinux/hooks.c
      
      Resolved using request struct.
      Signed-off-by: default avatarJames Morris <james.l.morris@oracle.com>
      
      tpm/tpm-sysfs: active_show() can be static
      
      so we make it static
      
      CC: Jason Gunthorpe <jgunthorpe@obsidianresearch.com>
      CC: Peter Huewe <peterhuewe@gmx.de>
      Signed-off-by: default avatarFengguang Wu <fengguang.wu@intel.com>
      Signed-off-by: default avatarPeter Huewe <peterhuewe@gmx.de>
      
      tpm: tpm_tis: Fix compile problems with CONFIG_PM_SLEEP/CONFIG_PNP
      
      If CONFIG_PM_SLEEP=n, CONFIG_PNP=y we get this warning:
      
      drivers/char/tpm/tpm_tis.c:706:13: warning: 'tpm_tis_reenable_interrupts' defined but not used [-Wunused-function]
      
      This seems to have been introduced in a2fa3fb0 'tpm: convert tpm_tis driver
      to use dev_pm_ops from legacy pm_ops'
      
      Also, unpon reviewing, the #ifdefs around tpm_tis_pm are not right, the first
      reference is protected, the second is not. tpm_tis_pm is always defined so we
      can drop the #ifdef.
      Signed-off-by: default avatarJason Gunthorpe <jgunthorpe@obsidianresearch.com>
      Signed-off-by: default avatarPeter Huewe <peterhuewe@gmx.de>
      
      tpm: Make tpm-dev allocate a per-file structure
      
      This consolidates everything that is only used within tpm-dev.c
      into tpm-dev.c and out of the publicly visible struct tpm_chip.
      
      The per-file allocation lays the ground work for someday fixing the
      strange forced O_EXCL behaviour of the current code.
      Signed-off-by: default avatarJason Gunthorpe <jgunthorpe@obsidianresearch.com>
      Reviewed-by: default avatarJoel Schopp <jschopp@linux.vnet.ibm.com>
      Reviewed-by: default avatarAshley Lai <adlai@linux.vnet.ibm.com>
      Signed-off-by: default avatarPeter Huewe <peterhuewe@gmx.de>
      
      tpm: Use the ops structure instead of a copy in tpm_vendor_specific
      
      This builds on the last commit to use the ops structure in the core
      and reduce the size of tpm_vendor_specific.
      Signed-off-by: default avatarJason Gunthorpe <jgunthorpe@obsidianresearch.com>
      Reviewed-by: default avatarJoel Schopp <jschopp@linux.vnet.ibm.com>
      Reviewed-by: default avatarAshley Lai <adlai@linux.vnet.ibm.com>
      Signed-off-by: default avatarPeter Huewe <peterhuewe@gmx.de>
      
      tpm: Create a tpm_class_ops structure and use it in the drivers
      
      This replaces the static initialization of a tpm_vendor_specific
      structure in the drivers with the standard Linux idiom of providing
      a const structure of function pointers.
      Signed-off-by: default avatarJason Gunthorpe <jgunthorpe@obsidianresearch.com>
      Reviewed-by: default avatarJoel Schopp <jschopp@linux.vnet.ibm.com>
      Reviewed-by: default avatarAshley Lai <adlai@linux.vnet.ibm.com>
      [phuewe: did apply manually due to commit
      191ffc6bde3 tpm/tpm_i2c_atmel: fix coccinelle warnings]
      Signed-off-by: default avatarPeter Huewe <peterhuewe@gmx.de>
      
      tpm: Pull all driver sysfs code into tpm-sysfs.c
      
      The tpm core now sets up and controls all sysfs attributes, instead
      of having each driver have a unique take on it.
      
      All drivers now now have a uniform set of attributes, and no sysfs
      related entry points are exported from the tpm core module.
      
      This also uses the new method used to declare sysfs attributes
      with DEVICE_ATTR_RO and 'struct attribute *'
      Signed-off-by: default avatarJason Gunthorpe <jgunthorpe@obsidianresearch.com>
      [phuewe: had to apply the tpm_i2c_atmel part manually due to commit
      191ffc6bde3fc tpm/tpm_i2c_atmel: fix coccinelle warnings]
      Signed-off-by: default avatarPeter Huewe <peterhuewe@gmx.de>
      
      tpm: Move sysfs functions from tpm-interface to tpm-sysfs
      
      CLASS-sysfs.c is a common idiom for linux subsystems.
      
      This is the first step to pulling all the sysfs support code from
      the drivers into tpm-sysfs. This is a plain text copy from tpm-interface
      with support changes to make it compile.
      
      _tpm_pcr_read is made non-static and is called tpm_pcr_read_dev.
      Signed-off-by: default avatarJason Gunthorpe <jgunthorpe@obsidianresearch.com>
      Signed-off-by: default avatarPeter Huewe <peterhuewe@gmx.de>
      
      tpm: Pull everything related to /dev/tpmX into tpm-dev.c
      
      CLASS-dev.c is a common idiom for Linux subsystems
      
      This pulls all the code related to the miscdev into tpm-dev.c and makes it
      static. The identical file_operation structs in the drivers are purged and the
      tpm common code unconditionally creates the miscdev.
      Signed-off-by: default avatarJason Gunthorpe <jgunthorpe@obsidianresearch.com>
      Reviewed-by: default avatarJoel Schopp <jschopp@linux.vnet.ibm.com>
      Reviewed-by: default avatarAshley Lai <adlai@linux.vnet.ibm.com>
      [phuewe:
      tpm_dev_release is now used only in this file, thus the EXPORT_SYMBOL
      can be dropped and the function be marked as static.
      It has no other in-kernel users]
      Signed-off-by: default avatarPeter Huewe <peterhuewe@gmx.de>
      
      char: tpm: nuvoton: remove unused variable
      
      “wait” wait queue is defined but never used in the function, thus
      it can be removed.
      Signed-off-by: default avatarMichal Nazarewicz <mina86@mina86.com>
      Acked-by: default avatarJason Gunthorpe <jgunthorpe@obsidianresearch.com>
      Signed-off-by: default avatarPeter Huewe <peterhuewe@gmx.de>
      
      tpm: MAINTAINERS: Cleanup TPM Maintainers file
      
      - removing stale/inactive maintainers
      - removing stale/outdated website
      - regrouped maintainers
      Signed-off-by: default avatarPeter Huewe <peterhuewe@gmx.de>
      
      tpm/tpm_i2c_atmel: fix coccinelle warnings
      
      drivers/char/tpm/tpm_i2c_atmel.c:178:8-9: WARNING: return of 0/1 in function 'i2c_atmel_req_canceled' with return type bool
      
       Return statements in functions returning bool should use
       true/false instead of 1/0.
      Generated by: coccinelle/misc/boolreturn.cocci
      
      CC: Jason Gunthorpe <jgunthorpe@obsidianresearch.com>
      CC: Peter Huewe <peterhuewe@gmx.de>
      Acked-by: default avatarJason Gunthorpe <jgunthorpe@obsidianresearch.com>
      Signed-off-by: default avatarFengguang Wu <fengguang.wu@intel.com>
      Signed-off-by: default avatarPeter Huewe <peterhuewe@gmx.de>
      
      tpm/tpm_ibmvtpm: fix unreachable code warning (smatch warning)
      
      smatch complains:
      drivers/char/tpm/tpm_ibmvtpm.c:510
      ibmvtpm_crq_process() info: ignoring unreachable code.
      
      -> The return is not necessary here, remove it
      Signed-off-by: default avatarPeter Huewe <peterhuewe@gmx.de>
      
      tpm/tpm_i2c_stm_st33: Check return code of get_burstcount
      
      The 'get_burstcount' function can in some circumstances 'return -EBUSY' which
      in tpm_stm_i2c_send is stored in an 'u32 burstcnt'
      thus converting the signed value into an unsigned value, resulting
      in 'burstcnt' being huge.
      Changing the type to u32 only does not solve the problem as the signed
      value is converted to an unsigned in I2C_WRITE_DATA, resulting in the
      same effect.
      
      Thus
      -> Change type of burstcnt to u32 (the return type of get_burstcount)
      -> Add a check for the return value of 'get_burstcount' and propagate a
      potential error.
      
      This makes also sense in the 'I2C_READ_DATA' case, where the there is no
      signed/unsigned conversion.
      
      found by coverity
      Cc: stable@vger.kernel.org
      Signed-off-by: default avatarPeter Huewe <peterhuewe@gmx.de>
      
      tpm/tpm_ppi: Check return value of acpi_get_name
      
      If
       status = acpi_get_name(handle, ACPI_FULL_PATHNAME, &buffer);
      fails for whatever reason and does not return AE_OK
       if (strstr(buffer.pointer, context) != NULL) {
      does dereference a null pointer.
      
      -> Check the return value and return the status to the caller
      
      Found by coverity
      Cc: stable@vger.kernel.org
      Signed-off-by: default avatarPeter Huewe <peterhuewe@gmx.de>
      
      tpm/tpm_ppi: Do not compare strcmp(a,b) == -1
      
      Depending on the implementation strcmp might return the difference between
      two strings not only -1,0,1 consequently
       if (strcmp (a,b) == -1)
      might lead to taking the wrong branch
      
      -> compare with < 0  instead,
      which in any case is more canonical.
      
      Cc: stable@vger.kernel.org
      Signed-off-by: default avatarPeter Huewe <peterhuewe@gmx.de>
      
      Merge to v3.13-rc7 for prerequisite changes in the Xen code for TPM
      
      ima: remove unneeded size_limit argument from ima_eventdigest_init_common()
      
      This patch removes the 'size_limit' argument from
      ima_eventdigest_init_common(). Since the 'd' field will never include
      the hash algorithm as prefix and the 'd-ng' will always have it, we can
      use the hash algorithm to differentiate the two cases in the modified
      function (it is equal to HASH_ALGO__LAST in the first case, the opposite
      in the second).
      Signed-off-by: default avatarRoberto Sassu <roberto.sassu@polito.it>
      Signed-off-by: default avatarMimi Zohar <zohar@linux.vnet.ibm.com>
      
      ima: update IMA-templates.txt documentation
      
      Patch "ima: extend the measurement list to include the file signature"
      defined a new field called 'sig' and a new template called 'ima-sig'.
      This patch updates the Documentation/security/IMA-templates.txt.
      
      Changelog:
       - fixed formatting issues (Roberto Sassu)
      Reported-by: default avatarRoberto Sassu <roberto.sassu@polito.it>
      Signed-off-by: default avatarMimi Zohar <zohar@linux.vnet.ibm.com>
      Signed-off-by: default avatarRoberto Sassu <roberto.sassu@polito.it>
      
      ima: pass HASH_ALGO__LAST as hash algo in ima_eventdigest_init()
      
      Replace the '-1' value with HASH_ALGO__LAST in ima_eventdigest_init()
      as the called function ima_eventdigest_init_common() expects an unsigned
      char.
      
      Fix commit:
        4d7aeee ima: define new template ima-ng and template fields d-ng and n-ng
      Signed-off-by: default avatarRoberto Sassu <roberto.sassu@polito.it>
      Signed-off-by: default avatarMimi Zohar <zohar@linux.vnet.ibm.com>
      
      ima: change the default hash algorithm to SHA1 in ima_eventdigest_ng_init()
      
      Replace HASH_ALGO__LAST with HASH_ALGO_SHA1 as the initial value of
      the hash algorithm so that the prefix 'sha1:' is added to violation
      digests.
      
      Fix commit:
        4d7aeee ima: define new template ima-ng and template fields d-ng and n-ng
      Signed-off-by: default avatarRoberto Sassu <roberto.sassu@polito.it>
      Cc: <stable@vger.kernel.org> # 3.13.x
      Signed-off-by: default avatarMimi Zohar <zohar@linux.vnet.ibm.com>
      
      Smack: File receive audit correction
      
      Eric Paris politely points out:
      
          Inside smack_file_receive() it seems like you are initting the audit
          field with LSM_AUDIT_DATA_TASK.  And then use
          smk_ad_setfield_u_fs_path().
      
          Seems like LSM_AUDIT_DATA_PATH would make more sense.  (and depending
          on how it's used fix a crash...)
      
      He is correct. This puts things in order.
      
      Targeted for git://git.gitorious.org/smack-next/kernel.gitSigned-off-by: default avatarCasey Schaufler <casey@schaufler-ca.com>
      
      Smack: Rationalize mount restrictions
      
      The mount restrictions imposed by Smack rely heavily on the
      use of the filesystem "floor", which is the label that all
      processes writing to the filesystem must have access to. It
      turns out that while the "floor" notion is sound, it has yet
      to be fully implemented and has never been used.
      
      The sb_mount and sb_umount hooks only make sense if the
      filesystem floor is used actively, and it isn't. They can
      be reintroduced if a rational restriction comes up. Until
      then, they get removed.
      
      The sb_kern_mount hook is required for the option processing.
      It is too permissive in the case of unprivileged mounts,
      effectively bypassing the CAP_MAC_ADMIN restrictions if
      any of the smack options are specified. Unprivileged mounts
      are no longer allowed to set Smack filesystem options.
      Additionally, the root and default values are set to the
      label of the caller, in keeping with the policy that objects
      get the label of their creator.
      
      Targeted for git://git.gitorious.org/smack-next/kernel.gitSigned-off-by: default avatarCasey Schaufler <casey@schaufler-ca.com>
      
      Smack: change rule cap check
      
      smk_write_change_rule() is calling capable rather than
      the more correct smack_privileged(). This allows for setting
      rules in violation of the onlycap facility. This is the
      simple repair.
      
      Targeted for git://git.gitorious.org/smack-next/kernel.gitSigned-off-by: default avatarCasey Schaufler <casey@schaufler-ca.com>
      
      Smack: Make the syslog control configurable
      
      The syslog control requires that the calling proccess
      have the floor ("_") Smack label. Tizen does not run any
      processes except for kernel helpers with the floor label.
      This changes allows the admin to configure a specific
      label for syslog. The default value is the star ("*")
      label, effectively removing the restriction. The value
      can be set using smackfs/syslog for anyone who wants
      a more restrictive behavior.
      
      Targeted for git://git.gitorious.org/smack-next/kernel.gitSigned-off-by: default avatarCasey Schaufler <casey@schaufler-ca.com>
      
      Smack: Prevent the * and @ labels from being used in SMACK64EXEC
      
      Smack prohibits processes from using the star ("*") and web ("@") labels
      because we don't want files with those labels getting created implicitly.
      All setting of those labels should be done explicitly. The trouble is that
      there is no check for these labels in the processing of SMACK64EXEC. That
      is repaired.
      
      Targeted for git://git.gitorious.org/smack-next/kernel.gitSigned-off-by: default avatarCasey Schaufler <casey@schaufler-ca.com>
      
      smack: fix: allow either entry be missing on access/access2 check (v2)
      
      This is a regression caused by f7112e6c. When either subject or
      object is not found the answer for access should be no. This
      patch fixes the situation. '0' is written back instead of failing
      with -EINVAL.
      
      v2: cosmetic style fixes
      Signed-off-by: default avatarJarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
      
      (cherry picked from commit f64410ec
      eee30946)
      Signed-off-by: default avatarSasha Levin <sasha.levin@oracle.com>
      012fdcc7
    • Konstantin Khlebnikov's avatar
      ipc/msg: fix race around refcount · da2562d1
      Konstantin Khlebnikov authored
      [fixed differently in 6062a8dc upstream.]
      
      In older kernels (before v3.10) ipc_rcu_hdr->refcount was non-atomic int.
      There was possuble double-free bug: do_msgsnd() calls ipc_rcu_putref() under
      msq->q_perm->lock and RCU, while freequeue() calls it while it holds only
      'rw_mutex', so there is no sinchronization between them. Two function
      decrements '2' non-atomically, they both can get '0' as result.
      
      do_msgsnd()					freequeue()
      
      msq = msg_lock_check(ns, msqid);
      ...
      ipc_rcu_getref(msq);
      msg_unlock(msq);
      schedule();
      						(caller locks spinlock)
      						expunge_all(msq, -EIDRM);
      						ss_wakeup(&msq->q_senders, 1);
      						msg_rmid(ns, msq);
      						msg_unlock(msq);
      ipc_lock_by_ptr(&msq->q_perm);
      ipc_rcu_putref(msq);				ipc_rcu_putref(msq);
      < both may get get --(...)->refcount == 0 >
      
      This patch locks ipc_lock and RCU around ipc_rcu_putref in freequeue.
      ( RCU protects memory for spin_unlock() )
      
      Similar bugs might be in other users of ipc_rcu_putref().
      
      In the mainline this has been fixed in v3.10 indirectly in commmit
      6062a8dc
      ("ipc,sem: fine grained locking for semtimedop") by Rik van Riel.
      That commit optimized locking and converted refcount into atomic.
      
      I'm not sure that anybody should care about this bug: it's very-very unlikely
      and no longer exists in actual mainline. I've found this just by looking into
      the code, probably this never happens in real life.
      Signed-off-by: default avatarKonstantin Khlebnikov <k.khlebnikov@samsung.com>
      (cherry picked from commit 79dd68bf)
      
      (cherry picked from commit HEAD)
      Signed-off-by: default avatarSasha Levin <sasha.levin@oracle.com>
      da2562d1
    • Sarah Sharp's avatar
      xhci: Fix resume issues on Renesas chips in Samsung laptops · 3b488dda
      Sarah Sharp authored
      commit 1aa9578c upstream.
      
      Don Zickus <dzickus@redhat.com> writes:
      
      Some co-workers of mine bought Samsung laptops that had mostly usb3 ports.
      Those ports did not resume correctly (the driver would timeout communicating
      and fail).  This led to frustration as suspend/resume is a common use for
      laptops.
      
      Poking around, I applied the reset on resume quirk to this chipset and the
      resume started working.  Reloading the xhci_hcd module had been the temporary
      workaround.
      Signed-off-by: default avatarSarah Sharp <sarah.a.sharp@linux.intel.com>
      Reported-by: default avatarDon Zickus <dzickus@redhat.com>
      Tested-by: default avatarPrarit Bhargava <prarit@redhat.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      
      (cherry picked from commit ebaacf5c)
      3b488dda
    • Marcelo Tosatti's avatar
      KVM: VMX: fix use after free of vmx->loaded_vmcs · 2d092a44
      Marcelo Tosatti authored
      After free_loaded_vmcs executes, the "loaded_vmcs" structure
      is kfreed, and now vmx->loaded_vmcs points to a kfreed area.
      Subsequent free_loaded_vmcs then attempts to manipulate
      vmx->loaded_vmcs.
      
      Switch the order to avoid the problem.
      
      https://bugzilla.redhat.com/show_bug.cgi?id=1047892Reviewed-by: default avatarJan Kiszka <jan.kiszka@siemens.com>
      Signed-off-by: default avatarMarcelo Tosatti <mtosatti@redhat.com>
      
      (cherry picked from commit 26a865f4)
      Signed-off-by: default avatarSasha Levin <sasha.levin@oracle.com>
      2d092a44
    • Marcelo Tosatti's avatar
      KVM: MMU: handle invalid root_hpa at __direct_map · 50302159
      Marcelo Tosatti authored
      It is possible for __direct_map to be called on invalid root_hpa
      (-1), two examples:
      
      1) try_async_pf -> can_do_async_pf
          -> vmx_interrupt_allowed -> nested_vmx_vmexit
      2) vmx_handle_exit -> vmx_interrupt_allowed -> nested_vmx_vmexit
      
      Then to load_vmcs12_host_state and kvm_mmu_reset_context.
      
      Check for this possibility, let fault exception be regenerated.
      
      BZ: https://bugzilla.redhat.com/show_bug.cgi?id=924916Signed-off-by: default avatarMarcelo Tosatti <mtosatti@redhat.com>
      Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
      
      (cherry picked from commit 989c6b34)
      Signed-off-by: default avatarSasha Levin <sasha.levin@oracle.com>
      50302159
    • Rob Herring's avatar
      ARM: move outer_cache declaration out of ifdef · 806c0c84
      Rob Herring authored
      Move the outer_cache declaration of the CONFIG_OUTER_CACHE ifdef so that
      outer_cache can be used inside IS_ENABLED condition.
      Signed-off-by: default avatarRob Herring <rob.herring@calxeda.com>
      Cc: Russell King <linux@arm.linux.org.uk>
      
      (cherry picked from commit 0b53c11d)
      Signed-off-by: default avatarSasha Levin <sasha.levin@oracle.com>
      806c0c84
    • Dan Carpenter's avatar
      p54: clamp properly instead of just truncating · 37d6135a
      Dan Carpenter authored
      The call to clamp_t() first truncates the variable signed 8 bit and as a
      result, the actual clamp is a no-op.
      
      Fixes: 0d78156e ('p54: improve site survey')
      Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
      Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
      
      (cherry picked from commit 608cfbe4)
      Signed-off-by: default avatarSasha Levin <sasha.levin@oracle.com>
      37d6135a
    • Ben Hutchings's avatar
      deb-pkg: Fix cross-building linux-headers package · 11295ba8
      Ben Hutchings authored
      builddeb generates a control file that says the linux-headers package
      can only be built for the build system primary architecture.  This
      breaks cross-building configurations.  We should use $debarch for this
      instead.
      
      Since $debarch is not yet set when generating the control file, set
      Architecture: any and use control file variables to fill in the
      description.
      
      Fixes: cd8d60a2 ('kbuild: create linux-headers package in deb-pkg')
      Reported-and-tested-by: default avatar"Niew, Sh." <shniew@gmail.com>
      Signed-off-by: default avatarBen Hutchings <ben@decadent.org.uk>
      Signed-off-by: default avatarMichal Marek <mmarek@suse.cz>
      
      (cherry picked from commit f8ce239d)
      Signed-off-by: default avatarSasha Levin <sasha.levin@oracle.com>
      11295ba8
    • Alexei Starovoitov's avatar
      x86: bpf_jit: support negative offsets · acaf90ef
      Alexei Starovoitov authored
      Commit a998d434 claimed to introduce negative offset support to x86 jit,
      but it couldn't be working, since at the time of the execution
      of LD+ABS or LD+IND instructions via call into
      bpf_internal_load_pointer_neg_helper() the %edx (3rd argument of this func)
      had junk value instead of access size in bytes (1 or 2 or 4).
      
      Store size into %edx instead of %ecx (what original commit intended to do)
      
      Fixes: a998d434 ("bpf jit: Let the x86 jit handle negative offsets")
      Signed-off-by: default avatarAlexei Starovoitov <ast@plumgrid.com>
      Cc: Jan Seiffert <kaffeemonster@googlemail.com>
      Cc: Eric Dumazet <edumazet@google.com>
      Acked-by: default avatarEric Dumazet <edumazet@google.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      
      (cherry picked from commit fdfaf64e)
      Signed-off-by: default avatarSasha Levin <sasha.levin@oracle.com>
      acaf90ef
    • Josh Durgin's avatar
      libceph: resend all writes after the osdmap loses the full flag · 41f11bd5
      Josh Durgin authored
      With the current full handling, there is a race between osds and
      clients getting the first map marked full. If the osd wins, it will
      return -ENOSPC to any writes, but the client may already have writes
      in flight. This results in the client getting the error and
      propagating it up the stack. For rbd, the block layer turns this into
      EIO, which can cause corruption in filesystems above it.
      
      To avoid this race, osds are being changed to drop writes that came
      from clients with an osdmap older than the last osdmap marked full.
      In order for this to work, clients must resend all writes after they
      encounter a full -> not full transition in the osdmap. osds will wait
      for an updated map instead of processing a request from a client with
      a newer map, so resent writes will not be dropped by the osd unless
      there is another not full -> full transition.
      
      This approach requires both osds and clients to be fixed to avoid the
      race. Old clients talking to osds with this fix may hang instead of
      returning EIO and potentially corrupting an fs. New clients talking to
      old osds have the same behavior as before if they encounter this race.
      
      Fixes: http://tracker.ceph.com/issues/6938Reviewed-by: default avatarSage Weil <sage@inktank.com>
      Signed-off-by: default avatarJosh Durgin <josh.durgin@inktank.com>
      
      (cherry picked from commit 9a1ea2db)
      Signed-off-by: default avatarSasha Levin <sasha.levin@oracle.com>
      41f11bd5
    • Paul E. McKenney's avatar
      jiffies: Avoid undefined behavior from signed overflow · 12c6b66d
      Paul E. McKenney authored
      According to the C standard 3.4.3p3, overflow of a signed integer results
      in undefined behavior.  This commit therefore changes the definitions
      of time_after(), time_after_eq(), time_after64(), and time_after_eq64()
      to avoid this undefined behavior.  The trick is that the subtraction
      is done using unsigned arithmetic, which according to 6.2.5p9 cannot
      overflow because it is defined as modulo arithmetic.  This has the added
      (though admittedly quite small) benefit of shortening four lines of code
      by four characters each.
      
      Note that the C standard considers the cast from unsigned to
      signed to be implementation-defined, see 6.3.1.3p3.  However, on a
      two's-complement system, an implementation that defines anything other
      than a reinterpretation of the bits is free to come to me, and I will be
      happy to act as a witness for its being committed to an insane asylum.
      (Although I have nothing against saturating arithmetic or signals in some
      cases, these things really should not be the default when compiling an
      operating-system kernel.)
      Signed-off-by: default avatarPaul E. McKenney <paulmck@linux.vnet.ibm.com>
      Cc: John Stultz <john.stultz@linaro.org>
      Cc: "David S. Miller" <davem@davemloft.net>
      Cc: Arnd Bergmann <arnd@arndb.de>
      Cc: Ingo Molnar <mingo@kernel.org>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Eric Dumazet <eric.dumazet@gmail.com>
      Cc: Kevin Easton <kevin@guarana.org>
      [ paulmck: Included time_after64() and time_after_eq64(), as suggested
        by Eric Dumazet, also fixed commit message.]
      Reviewed-by: default avatarJosh Triplett <josh@joshtriplett.org>
      
      (cherry picked from commit 5a581b36)
      Signed-off-by: default avatarSasha Levin <sasha.levin@oracle.com>
      12c6b66d