commit:     dd21e9aa6cf66af27c7d39f360e6a3a12db8833b
Author:     Mike Pagano <mpagano <AT> gentoo <DOT> org>
AuthorDate: Thu May 19 12:38:12 2016 +0000
Commit:     Mike Pagano <mpagano <AT> gentoo <DOT> org>
CommitDate: Thu May 19 12:38:12 2016 +0000
URL:        https://gitweb.gentoo.org/proj/linux-patches.git/commit/?id=dd21e9aa

Linux patch 3.14.70

 0000_README              |   4 +
 1069_linux-3.14.70.patch | 416 +++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 420 insertions(+)

diff --git a/0000_README b/0000_README
index 342fb6d..2cabaa5 100644
--- a/0000_README
+++ b/0000_README
@@ -318,6 +318,10 @@ Patch:  1068_linux-3.14.69.patch
 From:   http://www.kernel.org
 Desc:   Linux 3.14.69
 
+Patch:  1069_linux-3.14.70.patch
+From:   http://www.kernel.org
+Desc:   Linux 3.14.70
+
 Patch:  1500_XATTR_USER_PREFIX.patch
 From:   https://bugs.gentoo.org/show_bug.cgi?id=470644
 Desc:   Support for namespace user.pax.* on tmpfs.

diff --git a/1069_linux-3.14.70.patch b/1069_linux-3.14.70.patch
new file mode 100644
index 0000000..9ba5387
--- /dev/null
+++ b/1069_linux-3.14.70.patch
@@ -0,0 +1,416 @@
+diff --git a/Makefile b/Makefile
+index c6762fdfc967..bc3311a0893b 100644
+--- a/Makefile
++++ b/Makefile
+@@ -1,6 +1,6 @@
+ VERSION = 3
+ PATCHLEVEL = 14
+-SUBLEVEL = 69
++SUBLEVEL = 70
+ EXTRAVERSION =
+ NAME = Remembering Coco
+ 
+diff --git a/arch/arm/mach-omap2/sleep34xx.S b/arch/arm/mach-omap2/sleep34xx.S
+index d1dedc8195ed..eafd120b53f1 100644
+--- a/arch/arm/mach-omap2/sleep34xx.S
++++ b/arch/arm/mach-omap2/sleep34xx.S
+@@ -203,23 +203,8 @@ save_context_wfi:
+        */
+       ldr     r1, kernel_flush
+       blx     r1
+-      /*
+-       * The kernel doesn't interwork: v7_flush_dcache_all in particluar will
+-       * always return in Thumb state when CONFIG_THUMB2_KERNEL is enabled.
+-       * This sequence switches back to ARM.  Note that .align may insert a
+-       * nop: bx pc needs to be word-aligned in order to work.
+-       */
+- THUMB(       .thumb          )
+- THUMB(       .align          )
+- THUMB(       bx      pc      )
+- THUMB(       nop             )
+-      .arm
+-
+       b       omap3_do_wfi
+-
+-/*
+- * Local variables
+- */
++ENDPROC(omap34xx_cpu_suspend)
+ omap3_do_wfi_sram_addr:
+       .word omap3_do_wfi_sram
+ kernel_flush:
+@@ -364,10 +349,7 @@ exit_nonoff_modes:
+  * ===================================
+  */
+       ldmfd   sp!, {r4 - r11, pc}     @ restore regs and return
+-
+-/*
+- * Local variables
+- */
++ENDPROC(omap3_do_wfi)
+ sdrc_power:
+       .word   SDRC_POWER_V
+ cm_idlest1_core:
+diff --git a/crypto/ahash.c b/crypto/ahash.c
+index 865ef923eda6..7cddee979ddd 100644
+--- a/crypto/ahash.c
++++ b/crypto/ahash.c
+@@ -64,8 +64,9 @@ static int hash_walk_new_entry(struct crypto_hash_walk *walk)
+       struct scatterlist *sg;
+ 
+       sg = walk->sg;
+-      walk->pg = sg_page(sg);
+       walk->offset = sg->offset;
++      walk->pg = sg_page(walk->sg) + (walk->offset >> PAGE_SHIFT);
++      walk->offset = offset_in_page(walk->offset);
+       walk->entrylen = sg->length;
+ 
+       if (walk->entrylen > walk->total)
+diff --git a/drivers/gpu/drm/i915/intel_crt.c 
b/drivers/gpu/drm/i915/intel_crt.c
+index 834847527982..b60cb76aae51 100644
+--- a/drivers/gpu/drm/i915/intel_crt.c
++++ b/drivers/gpu/drm/i915/intel_crt.c
+@@ -259,8 +259,14 @@ static bool intel_crt_compute_config(struct intel_encoder 
*encoder,
+               pipe_config->has_pch_encoder = true;
+ 
+       /* LPT FDI RX only supports 8bpc. */
+-      if (HAS_PCH_LPT(dev))
++      if (HAS_PCH_LPT(dev)) {
++              if (pipe_config->bw_constrained && pipe_config->pipe_bpp < 24) {
++                      DRM_DEBUG_KMS("LPT only supports 24bpp\n");
++                      return false;
++              }
++
+               pipe_config->pipe_bpp = 24;
++      }
+ 
+       return true;
+ }
+diff --git a/drivers/gpu/drm/radeon/atombios_crtc.c 
b/drivers/gpu/drm/radeon/atombios_crtc.c
+index 0db3e208f02a..b205f76400ad 100644
+--- a/drivers/gpu/drm/radeon/atombios_crtc.c
++++ b/drivers/gpu/drm/radeon/atombios_crtc.c
+@@ -1600,6 +1600,7 @@ static u32 radeon_get_pll_use_mask(struct drm_crtc *crtc)
+ static int radeon_get_shared_dp_ppll(struct drm_crtc *crtc)
+ {
+       struct drm_device *dev = crtc->dev;
++      struct radeon_device *rdev = dev->dev_private;
+       struct drm_crtc *test_crtc;
+       struct radeon_crtc *test_radeon_crtc;
+ 
+@@ -1609,6 +1610,10 @@ static int radeon_get_shared_dp_ppll(struct drm_crtc 
*crtc)
+               test_radeon_crtc = to_radeon_crtc(test_crtc);
+               if (test_radeon_crtc->encoder &&
+                   
ENCODER_MODE_IS_DP(atombios_get_encoder_mode(test_radeon_crtc->encoder))) {
++                      /* PPLL2 is exclusive to UNIPHYA on DCE61 */
++                      if (ASIC_IS_DCE61(rdev) && !ASIC_IS_DCE8(rdev) &&
++                          test_radeon_crtc->pll_id == ATOM_PPLL2)
++                              continue;
+                       /* for DP use the same PLL for all */
+                       if (test_radeon_crtc->pll_id != ATOM_PPLL_INVALID)
+                               return test_radeon_crtc->pll_id;
+@@ -1630,6 +1635,7 @@ static int radeon_get_shared_nondp_ppll(struct drm_crtc 
*crtc)
+ {
+       struct radeon_crtc *radeon_crtc = to_radeon_crtc(crtc);
+       struct drm_device *dev = crtc->dev;
++      struct radeon_device *rdev = dev->dev_private;
+       struct drm_crtc *test_crtc;
+       struct radeon_crtc *test_radeon_crtc;
+       u32 adjusted_clock, test_adjusted_clock;
+@@ -1645,6 +1651,10 @@ static int radeon_get_shared_nondp_ppll(struct drm_crtc 
*crtc)
+               test_radeon_crtc = to_radeon_crtc(test_crtc);
+               if (test_radeon_crtc->encoder &&
+                   
!ENCODER_MODE_IS_DP(atombios_get_encoder_mode(test_radeon_crtc->encoder))) {
++                      /* PPLL2 is exclusive to UNIPHYA on DCE61 */
++                      if (ASIC_IS_DCE61(rdev) && !ASIC_IS_DCE8(rdev) &&
++                          test_radeon_crtc->pll_id == ATOM_PPLL2)
++                              continue;
+                       /* check if we are already driving this connector with 
another crtc */
+                       if (test_radeon_crtc->connector == 
radeon_crtc->connector) {
+                               /* if we are, return that pll */
+diff --git a/drivers/input/misc/max8997_haptic.c 
b/drivers/input/misc/max8997_haptic.c
+index 1fea5484941f..07ed458f10fa 100644
+--- a/drivers/input/misc/max8997_haptic.c
++++ b/drivers/input/misc/max8997_haptic.c
+@@ -245,12 +245,14 @@ static int max8997_haptic_probe(struct platform_device 
*pdev)
+       struct max8997_dev *iodev = dev_get_drvdata(pdev->dev.parent);
+       const struct max8997_platform_data *pdata =
+                                       dev_get_platdata(iodev->dev);
+-      const struct max8997_haptic_platform_data *haptic_pdata =
+-                                      pdata->haptic_pdata;
++      const struct max8997_haptic_platform_data *haptic_pdata = NULL;
+       struct max8997_haptic *chip;
+       struct input_dev *input_dev;
+       int error;
+ 
++      if (pdata)
++              haptic_pdata = pdata->haptic_pdata;
++
+       if (!haptic_pdata) {
+               dev_err(&pdev->dev, "no haptic platform data\n");
+               return -EINVAL;
+diff --git a/drivers/net/ethernet/atheros/atlx/atl2.c 
b/drivers/net/ethernet/atheros/atlx/atl2.c
+index 265ce1b752ed..96fe542b4acb 100644
+--- a/drivers/net/ethernet/atheros/atlx/atl2.c
++++ b/drivers/net/ethernet/atheros/atlx/atl2.c
+@@ -1413,7 +1413,7 @@ static int atl2_probe(struct pci_dev *pdev, const struct 
pci_device_id *ent)
+ 
+       err = -EIO;
+ 
+-      netdev->hw_features = NETIF_F_SG | NETIF_F_HW_VLAN_CTAG_RX;
++      netdev->hw_features = NETIF_F_HW_VLAN_CTAG_RX;
+       netdev->features |= (NETIF_F_HW_VLAN_CTAG_TX | NETIF_F_HW_VLAN_CTAG_RX);
+ 
+       /* Init PHY as early as possible due to power saving issue  */
+diff --git a/drivers/pnp/pnpbios/bioscalls.c b/drivers/pnp/pnpbios/bioscalls.c
+index 769d265b221b..deb7f4bcdb7b 100644
+--- a/drivers/pnp/pnpbios/bioscalls.c
++++ b/drivers/pnp/pnpbios/bioscalls.c
+@@ -21,7 +21,7 @@
+ 
+ #include "pnpbios.h"
+ 
+-static struct {
++__visible struct {
+       u16 offset;
+       u16 segment;
+ } pnp_bios_callpoint;
+@@ -41,6 +41,7 @@ asmlinkage void pnp_bios_callfunc(void);
+ 
+ __asm__(".text                        \n"
+       __ALIGN_STR "\n"
++      ".globl pnp_bios_callfunc\n"
+       "pnp_bios_callfunc:\n"
+       "       pushl %edx      \n"
+       "       pushl %ecx      \n"
+@@ -66,9 +67,9 @@ static struct desc_struct bad_bios_desc = 
GDT_ENTRY_INIT(0x4092,
+  * after PnP BIOS oopses.
+  */
+ 
+-u32 pnp_bios_fault_esp;
+-u32 pnp_bios_fault_eip;
+-u32 pnp_bios_is_utter_crap = 0;
++__visible u32 pnp_bios_fault_esp;
++__visible u32 pnp_bios_fault_eip;
++__visible u32 pnp_bios_is_utter_crap = 0;
+ 
+ static spinlock_t pnp_bios_lock;
+ 
+diff --git a/fs/isofs/rock.c b/fs/isofs/rock.c
+index 735d7522a3a9..204659a5f6db 100644
+--- a/fs/isofs/rock.c
++++ b/fs/isofs/rock.c
+@@ -203,6 +203,8 @@ int get_rock_ridge_filename(struct iso_directory_record 
*de,
+       int retnamlen = 0;
+       int truncate = 0;
+       int ret = 0;
++      char *p;
++      int len;
+ 
+       if (!ISOFS_SB(inode->i_sb)->s_rock)
+               return 0;
+@@ -267,12 +269,17 @@ repeat:
+                                       rr->u.NM.flags);
+                               break;
+                       }
+-                      if ((strlen(retname) + rr->len - 5) >= 254) {
++                      len = rr->len - 5;
++                      if (retnamlen + len >= 254) {
+                               truncate = 1;
+                               break;
+                       }
+-                      strncat(retname, rr->u.NM.name, rr->len - 5);
+-                      retnamlen += rr->len - 5;
++                      p = memchr(rr->u.NM.name, '\0', len);
++                      if (unlikely(p))
++                              len = p - rr->u.NM.name;
++                      memcpy(retname + retnamlen, rr->u.NM.name, len);
++                      retnamlen += len;
++                      retname[retnamlen] = '\0';
+                       break;
+               case SIG('R', 'E'):
+                       kfree(rs.buffer);
+diff --git a/net/bridge/br_ioctl.c b/net/bridge/br_ioctl.c
+index 8d423bc649b9..f876f707fd9e 100644
+--- a/net/bridge/br_ioctl.c
++++ b/net/bridge/br_ioctl.c
+@@ -21,18 +21,19 @@
+ #include <asm/uaccess.h>
+ #include "br_private.h"
+ 
+-/* called with RTNL */
+ static int get_bridge_ifindices(struct net *net, int *indices, int num)
+ {
+       struct net_device *dev;
+       int i = 0;
+ 
+-      for_each_netdev(net, dev) {
++      rcu_read_lock();
++      for_each_netdev_rcu(net, dev) {
+               if (i >= num)
+                       break;
+               if (dev->priv_flags & IFF_EBRIDGE)
+                       indices[i++] = dev->ifindex;
+       }
++      rcu_read_unlock();
+ 
+       return i;
+ }
+diff --git a/net/core/rtnetlink.c b/net/core/rtnetlink.c
+index 465092f8fb76..ccccc6bfd21c 100644
+--- a/net/core/rtnetlink.c
++++ b/net/core/rtnetlink.c
+@@ -1010,14 +1010,16 @@ static int rtnl_fill_ifinfo(struct sk_buff *skb, 
struct net_device *dev,
+               goto nla_put_failure;
+ 
+       if (1) {
+-              struct rtnl_link_ifmap map = {
+-                      .mem_start   = dev->mem_start,
+-                      .mem_end     = dev->mem_end,
+-                      .base_addr   = dev->base_addr,
+-                      .irq         = dev->irq,
+-                      .dma         = dev->dma,
+-                      .port        = dev->if_port,
+-              };
++              struct rtnl_link_ifmap map;
++
++              memset(&map, 0, sizeof(map));
++              map.mem_start   = dev->mem_start;
++              map.mem_end     = dev->mem_end;
++              map.base_addr   = dev->base_addr;
++              map.irq         = dev->irq;
++              map.dma         = dev->dma;
++              map.port        = dev->if_port;
++
+               if (nla_put(skb, IFLA_MAP, sizeof(map), &map))
+                       goto nla_put_failure;
+       }
+diff --git a/net/decnet/dn_route.c b/net/decnet/dn_route.c
+index ce0cbbfe0f43..f1ffeff02ad9 100644
+--- a/net/decnet/dn_route.c
++++ b/net/decnet/dn_route.c
+@@ -1030,10 +1030,13 @@ source_ok:
+       if (!fld.daddr) {
+               fld.daddr = fld.saddr;
+ 
+-              err = -EADDRNOTAVAIL;
+               if (dev_out)
+                       dev_put(dev_out);
++              err = -EINVAL;
+               dev_out = init_net.loopback_dev;
++              if (!dev_out->dn_ptr)
++                      goto out;
++              err = -EADDRNOTAVAIL;
+               dev_hold(dev_out);
+               if (!fld.daddr) {
+                       fld.daddr =
+@@ -1106,6 +1109,8 @@ source_ok:
+               if (dev_out == NULL)
+                       goto out;
+               dn_db = rcu_dereference_raw(dev_out->dn_ptr);
++              if (!dn_db)
++                      goto e_inval;
+               /* Possible improvement - check all devices for local addr */
+               if (dn_dev_islocal(dev_out, fld.daddr)) {
+                       dev_put(dev_out);
+@@ -1147,6 +1152,8 @@ select_source:
+                       dev_put(dev_out);
+               dev_out = init_net.loopback_dev;
+               dev_hold(dev_out);
++              if (!dev_out->dn_ptr)
++                      goto e_inval;
+               fld.flowidn_oif = dev_out->ifindex;
+               if (res.fi)
+                       dn_fib_info_put(res.fi);
+diff --git a/net/ipv4/route.c b/net/ipv4/route.c
+index 625615cdac86..ad959a149460 100644
+--- a/net/ipv4/route.c
++++ b/net/ipv4/route.c
+@@ -1926,6 +1926,18 @@ static struct rtable *__mkroute_output(const struct 
fib_result *res,
+                */
+               if (fi && res->prefixlen < 4)
+                       fi = NULL;
++      } else if ((type == RTN_LOCAL) && (orig_oif != 0) &&
++                 (orig_oif != dev_out->ifindex)) {
++              /* For local routes that require a particular output interface
++               * we do not want to cache the result.  Caching the result
++               * causes incorrect behaviour when there are multiple source
++               * addresses on the interface, the end result being that if the
++               * intended recipient is waiting on that interface for the
++               * packet he won't receive it because it will be delivered on
++               * the loopback interface and the IP_PKTINFO ipi_ifindex will
++               * be set to the loopback interface as well.
++               */
++              fi = NULL;
+       }
+ 
+       fnhe = NULL;
+diff --git a/net/llc/af_llc.c b/net/llc/af_llc.c
+index 0080d2b0a8ae..a76a67d38ec3 100644
+--- a/net/llc/af_llc.c
++++ b/net/llc/af_llc.c
+@@ -626,6 +626,7 @@ static void llc_cmsg_rcv(struct msghdr *msg, struct 
sk_buff *skb)
+       if (llc->cmsg_flags & LLC_CMSG_PKTINFO) {
+               struct llc_pktinfo info;
+ 
++              memset(&info, 0, sizeof(info));
+               info.lpi_ifindex = llc_sk(skb->sk)->dev->ifindex;
+               llc_pdu_decode_dsap(skb, &info.lpi_sap);
+               llc_pdu_decode_da(skb, info.lpi_mac);
+diff --git a/net/packet/af_packet.c b/net/packet/af_packet.c
+index 25d329a18616..c8078af08108 100644
+--- a/net/packet/af_packet.c
++++ b/net/packet/af_packet.c
+@@ -3153,6 +3153,7 @@ static int packet_mc_add(struct sock *sk, struct 
packet_mreq_max *mreq)
+       i->ifindex = mreq->mr_ifindex;
+       i->alen = mreq->mr_alen;
+       memcpy(i->addr, mreq->mr_address, i->alen);
++      memset(i->addr + i->alen, 0, sizeof(i->addr) - i->alen);
+       i->count = 1;
+       i->next = po->mclist;
+       po->mclist = i;
+diff --git a/net/vmw_vsock/af_vsock.c b/net/vmw_vsock/af_vsock.c
+index 85d232bed87d..e8d3313ea2c9 100644
+--- a/net/vmw_vsock/af_vsock.c
++++ b/net/vmw_vsock/af_vsock.c
+@@ -1796,27 +1796,8 @@ vsock_stream_recvmsg(struct kiocb *kiocb,
+       else if (sk->sk_shutdown & RCV_SHUTDOWN)
+               err = 0;
+ 
+-      if (copied > 0) {
+-              /* We only do these additional bookkeeping/notification steps
+-               * if we actually copied something out of the queue pair
+-               * instead of just peeking ahead.
+-               */
+-
+-              if (!(flags & MSG_PEEK)) {
+-                      /* If the other side has shutdown for sending and there
+-                       * is nothing more to read, then modify the socket
+-                       * state.
+-                       */
+-                      if (vsk->peer_shutdown & SEND_SHUTDOWN) {
+-                              if (vsock_stream_has_data(vsk) <= 0) {
+-                                      sk->sk_state = SS_UNCONNECTED;
+-                                      sock_set_flag(sk, SOCK_DONE);
+-                                      sk->sk_state_change(sk);
+-                              }
+-                      }
+-              }
++      if (copied > 0)
+               err = copied;
+-      }
+ 
+ out_wait:
+       finish_wait(sk_sleep(sk), &wait);
+diff --git a/net/x25/x25_facilities.c b/net/x25/x25_facilities.c
+index 7ecd04c21360..997ff7b2509b 100644
+--- a/net/x25/x25_facilities.c
++++ b/net/x25/x25_facilities.c
+@@ -277,6 +277,7 @@ int x25_negotiate_facilities(struct sk_buff *skb, struct 
sock *sk,
+ 
+       memset(&theirs, 0, sizeof(theirs));
+       memcpy(new, ours, sizeof(*new));
++      memset(dte, 0, sizeof(*dte));
+ 
+       len = x25_parse_facilities(skb, &theirs, dte, &x25->vc_facil_mask);
+       if (len < 0)

Reply via email to