commit:     1f9b6e4fcf4c1ec883981ad2404d0361ea65643d
Author:     Mike Pagano <mpagano <AT> gentoo <DOT> org>
AuthorDate: Sun Jul 31 16:01:43 2016 +0000
Commit:     Mike Pagano <mpagano <AT> gentoo <DOT> org>
CommitDate: Sun Jul 31 16:01:43 2016 +0000
URL:        https://gitweb.gentoo.org/proj/linux-patches.git/commit/?id=1f9b6e4f

Linux kernel 4.1.29

 0000_README             |   4 +
 1028_linux-4.1.29.patch | 456 ++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 460 insertions(+)

diff --git a/0000_README b/0000_README
index 88ef9f3..a9101d3 100644
--- a/0000_README
+++ b/0000_README
@@ -155,6 +155,10 @@ Patch:  1027_linux-4.1.28.patch
 From:   http://www.kernel.org
 Desc:   Linux 4.1.28
 
+Patch:  1028_linux-4.1.29.patch
+From:   http://www.kernel.org
+Desc:   Linux 4.1.29
+
 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/1028_linux-4.1.29.patch b/1028_linux-4.1.29.patch
new file mode 100644
index 0000000..998db23
--- /dev/null
+++ b/1028_linux-4.1.29.patch
@@ -0,0 +1,456 @@
+diff --git a/Makefile b/Makefile
+index 241237cd4ca6..76fa21fa16b8 100644
+--- a/Makefile
++++ b/Makefile
+@@ -1,6 +1,6 @@
+ VERSION = 4
+ PATCHLEVEL = 1
+-SUBLEVEL = 28
++SUBLEVEL = 29
+ EXTRAVERSION =
+ NAME = Series 4800
+ 
+diff --git a/arch/mips/include/asm/pgtable.h b/arch/mips/include/asm/pgtable.h
+index f33206e27d8d..2b697db33ca6 100644
+--- a/arch/mips/include/asm/pgtable.h
++++ b/arch/mips/include/asm/pgtable.h
+@@ -603,7 +603,8 @@ static inline struct page *pmd_page(pmd_t pmd)
+ 
+ static inline pmd_t pmd_modify(pmd_t pmd, pgprot_t newprot)
+ {
+-      pmd_val(pmd) = (pmd_val(pmd) & _PAGE_CHG_MASK) | pgprot_val(newprot);
++      pmd_val(pmd) = (pmd_val(pmd) & (_PAGE_CHG_MASK | _PAGE_HUGE)) |
++                     (pgprot_val(newprot) & ~_PAGE_CHG_MASK);
+       return pmd;
+ }
+ 
+diff --git a/arch/powerpc/kernel/prom.c b/arch/powerpc/kernel/prom.c
+index 28dbbb0d12c4..9b19d96e9562 100644
+--- a/arch/powerpc/kernel/prom.c
++++ b/arch/powerpc/kernel/prom.c
+@@ -166,8 +166,7 @@ static struct ibm_pa_feature {
+        * we don't want to turn on TM here, so we use the *_COMP versions
+        * which are 0 if the kernel doesn't support TM.
+        */
+-      {CPU_FTR_TM_COMP, 0, 0,
+-       PPC_FEATURE2_HTM_COMP|PPC_FEATURE2_HTM_NOSC_COMP, 22, 0, 0},
++      {CPU_FTR_TM_COMP, 0, 0, PPC_FEATURE2_HTM_COMP, 22, 0, 0},
+ };
+ 
+ static void __init scan_features(unsigned long node, const unsigned char 
*ftrs,
+diff --git a/arch/x86/kernel/amd_nb.c b/arch/x86/kernel/amd_nb.c
+index 5caed1dd7ccf..80bb8c0349a7 100644
+--- a/arch/x86/kernel/amd_nb.c
++++ b/arch/x86/kernel/amd_nb.c
+@@ -71,8 +71,8 @@ int amd_cache_northbridges(void)
+       while ((misc = next_northbridge(misc, amd_nb_misc_ids)) != NULL)
+               i++;
+ 
+-      if (i == 0)
+-              return 0;
++      if (!i)
++              return -ENODEV;
+ 
+       nb = kzalloc(i * sizeof(struct amd_northbridge), GFP_KERNEL);
+       if (!nb)
+diff --git a/block/ioprio.c b/block/ioprio.c
+index 31666c92b46a..563435684c3c 100644
+--- a/block/ioprio.c
++++ b/block/ioprio.c
+@@ -149,8 +149,10 @@ static int get_task_ioprio(struct task_struct *p)
+       if (ret)
+               goto out;
+       ret = IOPRIO_PRIO_VALUE(IOPRIO_CLASS_NONE, IOPRIO_NORM);
++      task_lock(p);
+       if (p->io_context)
+               ret = p->io_context->ioprio;
++      task_unlock(p);
+ out:
+       return ret;
+ }
+diff --git a/drivers/gpio/gpio-sch.c b/drivers/gpio/gpio-sch.c
+index b72906f5b999..2d4766bd61c3 100644
+--- a/drivers/gpio/gpio-sch.c
++++ b/drivers/gpio/gpio-sch.c
+@@ -63,9 +63,8 @@ static unsigned sch_gpio_bit(struct sch_gpio *sch, unsigned 
gpio)
+       return gpio % 8;
+ }
+ 
+-static int sch_gpio_reg_get(struct gpio_chip *gc, unsigned gpio, unsigned reg)
++static int sch_gpio_reg_get(struct sch_gpio *sch, unsigned gpio, unsigned reg)
+ {
+-      struct sch_gpio *sch = to_sch_gpio(gc);
+       unsigned short offset, bit;
+       u8 reg_val;
+ 
+@@ -77,10 +76,9 @@ static int sch_gpio_reg_get(struct gpio_chip *gc, unsigned 
gpio, unsigned reg)
+       return reg_val;
+ }
+ 
+-static void sch_gpio_reg_set(struct gpio_chip *gc, unsigned gpio, unsigned 
reg,
++static void sch_gpio_reg_set(struct sch_gpio *sch, unsigned gpio, unsigned 
reg,
+                            int val)
+ {
+-      struct sch_gpio *sch = to_sch_gpio(gc);
+       unsigned short offset, bit;
+       u8 reg_val;
+ 
+@@ -100,14 +98,15 @@ static int sch_gpio_direction_in(struct gpio_chip *gc, 
unsigned gpio_num)
+       struct sch_gpio *sch = to_sch_gpio(gc);
+ 
+       spin_lock(&sch->lock);
+-      sch_gpio_reg_set(gc, gpio_num, GIO, 1);
++      sch_gpio_reg_set(sch, gpio_num, GIO, 1);
+       spin_unlock(&sch->lock);
+       return 0;
+ }
+ 
+ static int sch_gpio_get(struct gpio_chip *gc, unsigned gpio_num)
+ {
+-      return sch_gpio_reg_get(gc, gpio_num, GLV);
++      struct sch_gpio *sch = to_sch_gpio(gc);
++      return sch_gpio_reg_get(sch, gpio_num, GLV);
+ }
+ 
+ static void sch_gpio_set(struct gpio_chip *gc, unsigned gpio_num, int val)
+@@ -115,7 +114,7 @@ static void sch_gpio_set(struct gpio_chip *gc, unsigned 
gpio_num, int val)
+       struct sch_gpio *sch = to_sch_gpio(gc);
+ 
+       spin_lock(&sch->lock);
+-      sch_gpio_reg_set(gc, gpio_num, GLV, val);
++      sch_gpio_reg_set(sch, gpio_num, GLV, val);
+       spin_unlock(&sch->lock);
+ }
+ 
+@@ -125,7 +124,7 @@ static int sch_gpio_direction_out(struct gpio_chip *gc, 
unsigned gpio_num,
+       struct sch_gpio *sch = to_sch_gpio(gc);
+ 
+       spin_lock(&sch->lock);
+-      sch_gpio_reg_set(gc, gpio_num, GIO, 0);
++      sch_gpio_reg_set(sch, gpio_num, GIO, 0);
+       spin_unlock(&sch->lock);
+ 
+       /*
+@@ -184,13 +183,13 @@ static int sch_gpio_probe(struct platform_device *pdev)
+                * GPIO7 is configured by the CMC as SLPIOVR
+                * Enable GPIO[9:8] core powered gpios explicitly
+                */
+-              sch_gpio_reg_set(&sch->chip, 8, GEN, 1);
+-              sch_gpio_reg_set(&sch->chip, 9, GEN, 1);
++              sch_gpio_reg_set(sch, 8, GEN, 1);
++              sch_gpio_reg_set(sch, 9, GEN, 1);
+               /*
+                * SUS_GPIO[2:0] enabled by default
+                * Enable SUS_GPIO3 resume powered gpio explicitly
+                */
+-              sch_gpio_reg_set(&sch->chip, 13, GEN, 1);
++              sch_gpio_reg_set(sch, 13, GEN, 1);
+               break;
+ 
+       case PCI_DEVICE_ID_INTEL_ITC_LPC:
+diff --git a/drivers/s390/net/qeth_l2_main.c b/drivers/s390/net/qeth_l2_main.c
+index 0ea0869120cf..187bea44d123 100644
+--- a/drivers/s390/net/qeth_l2_main.c
++++ b/drivers/s390/net/qeth_l2_main.c
+@@ -902,6 +902,7 @@ static void qeth_l2_remove_device(struct ccwgroup_device 
*cgdev)
+               qeth_l2_set_offline(cgdev);
+ 
+       if (card->dev) {
++              netif_napi_del(&card->napi);
+               unregister_netdev(card->dev);
+               card->dev = NULL;
+       }
+diff --git a/drivers/s390/net/qeth_l3_main.c b/drivers/s390/net/qeth_l3_main.c
+index 04e42c649134..3f94738feb45 100644
+--- a/drivers/s390/net/qeth_l3_main.c
++++ b/drivers/s390/net/qeth_l3_main.c
+@@ -3362,6 +3362,7 @@ static void qeth_l3_remove_device(struct ccwgroup_device 
*cgdev)
+               qeth_l3_set_offline(cgdev);
+ 
+       if (card->dev) {
++              netif_napi_del(&card->napi);
+               unregister_netdev(card->dev);
+               card->dev = NULL;
+       }
+diff --git a/drivers/scsi/ipr.c b/drivers/scsi/ipr.c
+index cccab6188328..cd52c070701b 100644
+--- a/drivers/scsi/ipr.c
++++ b/drivers/scsi/ipr.c
+@@ -9966,6 +9966,7 @@ static int ipr_probe_ioa(struct pci_dev *pdev,
+               ioa_cfg->intr_flag = IPR_USE_MSI;
+       else {
+               ioa_cfg->intr_flag = IPR_USE_LSI;
++              ioa_cfg->clear_isr = 1;
+               ioa_cfg->nvectors = 1;
+               dev_info(&pdev->dev, "Cannot enable MSI.\n");
+       }
+diff --git a/drivers/xen/xen-acpi-processor.c 
b/drivers/xen/xen-acpi-processor.c
+index 59fc190f1e92..b96e207bf250 100644
+--- a/drivers/xen/xen-acpi-processor.c
++++ b/drivers/xen/xen-acpi-processor.c
+@@ -423,36 +423,7 @@ upload:
+ 
+       return 0;
+ }
+-static int __init check_prereq(void)
+-{
+-      struct cpuinfo_x86 *c = &cpu_data(0);
+-
+-      if (!xen_initial_domain())
+-              return -ENODEV;
+-
+-      if (!acpi_gbl_FADT.smi_command)
+-              return -ENODEV;
+-
+-      if (c->x86_vendor == X86_VENDOR_INTEL) {
+-              if (!cpu_has(c, X86_FEATURE_EST))
+-                      return -ENODEV;
+ 
+-              return 0;
+-      }
+-      if (c->x86_vendor == X86_VENDOR_AMD) {
+-              /* Copied from powernow-k8.h, can't include ../cpufreq/powernow
+-               * as we get compile warnings for the static functions.
+-               */
+-#define CPUID_FREQ_VOLT_CAPABILITIES    0x80000007
+-#define USE_HW_PSTATE                   0x00000080
+-              u32 eax, ebx, ecx, edx;
+-              cpuid(CPUID_FREQ_VOLT_CAPABILITIES, &eax, &ebx, &ecx, &edx);
+-              if ((edx & USE_HW_PSTATE) != USE_HW_PSTATE)
+-                      return -ENODEV;
+-              return 0;
+-      }
+-      return -ENODEV;
+-}
+ /* acpi_perf_data is a pointer to percpu data. */
+ static struct acpi_processor_performance __percpu *acpi_perf_data;
+ 
+@@ -509,10 +480,10 @@ struct notifier_block xen_acpi_processor_resume_nb = {
+ static int __init xen_acpi_processor_init(void)
+ {
+       unsigned int i;
+-      int rc = check_prereq();
++      int rc;
+ 
+-      if (rc)
+-              return rc;
++      if (!xen_initial_domain())
++              return -ENODEV;
+ 
+       nr_acpi_bits = get_max_acpi_id() + 1;
+       acpi_ids_done = kcalloc(BITS_TO_LONGS(nr_acpi_bits), sizeof(unsigned 
long), GFP_KERNEL);
+diff --git a/drivers/xen/xenbus/xenbus_dev_frontend.c 
b/drivers/xen/xenbus/xenbus_dev_frontend.c
+index 9433e46518c8..531e76474983 100644
+--- a/drivers/xen/xenbus/xenbus_dev_frontend.c
++++ b/drivers/xen/xenbus/xenbus_dev_frontend.c
+@@ -316,11 +316,18 @@ static int xenbus_write_transaction(unsigned msg_type,
+                       rc = -ENOMEM;
+                       goto out;
+               }
++      } else {
++              list_for_each_entry(trans, &u->transactions, list)
++                      if (trans->handle.id == u->u.msg.tx_id)
++                              break;
++              if (&trans->list == &u->transactions)
++                      return -ESRCH;
+       }
+ 
+       reply = xenbus_dev_request_and_reply(&u->u.msg);
+       if (IS_ERR(reply)) {
+-              kfree(trans);
++              if (msg_type == XS_TRANSACTION_START)
++                      kfree(trans);
+               rc = PTR_ERR(reply);
+               goto out;
+       }
+@@ -333,12 +340,7 @@ static int xenbus_write_transaction(unsigned msg_type,
+                       list_add(&trans->list, &u->transactions);
+               }
+       } else if (u->u.msg.type == XS_TRANSACTION_END) {
+-              list_for_each_entry(trans, &u->transactions, list)
+-                      if (trans->handle.id == u->u.msg.tx_id)
+-                              break;
+-              BUG_ON(&trans->list == &u->transactions);
+               list_del(&trans->list);
+-
+               kfree(trans);
+       }
+ 
+diff --git a/drivers/xen/xenbus/xenbus_xs.c b/drivers/xen/xenbus/xenbus_xs.c
+index ba804f3d8278..ce65591b4168 100644
+--- a/drivers/xen/xenbus/xenbus_xs.c
++++ b/drivers/xen/xenbus/xenbus_xs.c
+@@ -250,9 +250,6 @@ void *xenbus_dev_request_and_reply(struct xsd_sockmsg *msg)
+ 
+       mutex_unlock(&xs_state.request_mutex);
+ 
+-      if (IS_ERR(ret))
+-              return ret;
+-
+       if ((msg->type == XS_TRANSACTION_END) ||
+           ((req_msg.type == XS_TRANSACTION_START) &&
+            (msg->type == XS_ERROR)))
+diff --git a/fs/ecryptfs/file.c b/fs/ecryptfs/file.c
+index 72afcc629d7b..f56a4216d081 100644
+--- a/fs/ecryptfs/file.c
++++ b/fs/ecryptfs/file.c
+@@ -170,6 +170,19 @@ out:
+       return rc;
+ }
+ 
++static int ecryptfs_mmap(struct file *file, struct vm_area_struct *vma)
++{
++      struct file *lower_file = ecryptfs_file_to_lower(file);
++      /*
++       * Don't allow mmap on top of file systems that don't support it
++       * natively.  If FILESYSTEM_MAX_STACK_DEPTH > 2 or ecryptfs
++       * allows recursive mounting, this will need to be extended.
++       */
++      if (!lower_file->f_op->mmap)
++              return -ENODEV;
++      return generic_file_mmap(file, vma);
++}
++
+ /**
+  * ecryptfs_open
+  * @inode: inode speciying file to open
+@@ -365,7 +378,7 @@ const struct file_operations ecryptfs_main_fops = {
+ #ifdef CONFIG_COMPAT
+       .compat_ioctl = ecryptfs_compat_ioctl,
+ #endif
+-      .mmap = generic_file_mmap,
++      .mmap = ecryptfs_mmap,
+       .open = ecryptfs_open,
+       .flush = ecryptfs_flush,
+       .release = ecryptfs_release,
+diff --git a/fs/ecryptfs/kthread.c b/fs/ecryptfs/kthread.c
+index e818f5ac7a26..866bb18efefe 100644
+--- a/fs/ecryptfs/kthread.c
++++ b/fs/ecryptfs/kthread.c
+@@ -25,7 +25,6 @@
+ #include <linux/slab.h>
+ #include <linux/wait.h>
+ #include <linux/mount.h>
+-#include <linux/file.h>
+ #include "ecryptfs_kernel.h"
+ 
+ struct ecryptfs_open_req {
+@@ -148,7 +147,7 @@ int ecryptfs_privileged_open(struct file **lower_file,
+       flags |= IS_RDONLY(d_inode(lower_dentry)) ? O_RDONLY : O_RDWR;
+       (*lower_file) = dentry_open(&req.path, flags, cred);
+       if (!IS_ERR(*lower_file))
+-              goto have_file;
++              goto out;
+       if ((flags & O_ACCMODE) == O_RDONLY) {
+               rc = PTR_ERR((*lower_file));
+               goto out;
+@@ -166,16 +165,8 @@ int ecryptfs_privileged_open(struct file **lower_file,
+       mutex_unlock(&ecryptfs_kthread_ctl.mux);
+       wake_up(&ecryptfs_kthread_ctl.wait);
+       wait_for_completion(&req.done);
+-      if (IS_ERR(*lower_file)) {
++      if (IS_ERR(*lower_file))
+               rc = PTR_ERR(*lower_file);
+-              goto out;
+-      }
+-have_file:
+-      if ((*lower_file)->f_op->mmap == NULL) {
+-              fput(*lower_file);
+-              *lower_file = NULL;
+-              rc = -EMEDIUMTYPE;
+-      }
+ out:
+       return rc;
+ }
+diff --git a/mm/swap.c b/mm/swap.c
+index b523f0a4cbfb..ab3b9c2dd783 100644
+--- a/mm/swap.c
++++ b/mm/swap.c
+@@ -631,7 +631,7 @@ static void __lru_cache_add(struct page *page)
+       struct pagevec *pvec = &get_cpu_var(lru_add_pvec);
+ 
+       page_cache_get(page);
+-      if (!pagevec_space(pvec) || PageCompound(page))
++      if (!pagevec_add(pvec, page) || PageCompound(page))
+               __pagevec_lru_add(pvec);
+       put_cpu_var(lru_add_pvec);
+ }
+diff --git a/sound/core/timer.c b/sound/core/timer.c
+index 1782555fcaca..7e3020c1e9d3 100644
+--- a/sound/core/timer.c
++++ b/sound/core/timer.c
+@@ -1961,6 +1961,7 @@ static ssize_t snd_timer_user_read(struct file *file, 
char __user *buffer,
+ 
+               qhead = tu->qhead++;
+               tu->qhead %= tu->queue_size;
++              tu->qused--;
+               spin_unlock_irq(&tu->qlock);
+ 
+               if (tu->tread) {
+@@ -1974,7 +1975,6 @@ static ssize_t snd_timer_user_read(struct file *file, 
char __user *buffer,
+               }
+ 
+               spin_lock_irq(&tu->qlock);
+-              tu->qused--;
+               if (err < 0)
+                       goto _error;
+               result += unit;
+diff --git a/sound/pci/au88x0/au88x0_core.c b/sound/pci/au88x0/au88x0_core.c
+index 4667c3232b7f..74177189063c 100644
+--- a/sound/pci/au88x0/au88x0_core.c
++++ b/sound/pci/au88x0/au88x0_core.c
+@@ -1444,9 +1444,8 @@ static int vortex_wtdma_bufshift(vortex_t * vortex, int 
wtdma)
+       int page, p, pp, delta, i;
+ 
+       page =
+-          (hwread(vortex->mmio, VORTEX_WTDMA_STAT + (wtdma << 2)) &
+-           WT_SUBBUF_MASK)
+-          >> WT_SUBBUF_SHIFT;
++          (hwread(vortex->mmio, VORTEX_WTDMA_STAT + (wtdma << 2))
++           >> WT_SUBBUF_SHIFT) & WT_SUBBUF_MASK;
+       if (dma->nr_periods >= 4)
+               delta = (page - dma->period_real) & 3;
+       else {
+diff --git a/sound/pci/echoaudio/echoaudio.c b/sound/pci/echoaudio/echoaudio.c
+index 862db9a0b041..f3e5cfa4f25d 100644
+--- a/sound/pci/echoaudio/echoaudio.c
++++ b/sound/pci/echoaudio/echoaudio.c
+@@ -2200,11 +2200,11 @@ static int snd_echo_resume(struct device *dev)
+       u32 pipe_alloc_mask;
+       int err;
+ 
+-      commpage_bak = kmalloc(sizeof(struct echoaudio), GFP_KERNEL);
++      commpage_bak = kmalloc(sizeof(*commpage), GFP_KERNEL);
+       if (commpage_bak == NULL)
+               return -ENOMEM;
+       commpage = chip->comm_page;
+-      memcpy(commpage_bak, commpage, sizeof(struct comm_page));
++      memcpy(commpage_bak, commpage, sizeof(*commpage));
+ 
+       err = init_hw(chip, chip->pci->device, chip->pci->subsystem_device);
+       if (err < 0) {
+diff --git a/sound/pci/hda/hda_generic.c b/sound/pci/hda/hda_generic.c
+index 16e0ebacbdb0..0fda7b4901dd 100644
+--- a/sound/pci/hda/hda_generic.c
++++ b/sound/pci/hda/hda_generic.c
+@@ -3992,6 +3992,8 @@ static hda_nid_t set_path_power(struct hda_codec *codec, 
hda_nid_t nid,
+ 
+       for (n = 0; n < spec->paths.used; n++) {
+               path = snd_array_elem(&spec->paths, n);
++              if (!path->depth)
++                      continue;
+               if (path->path[0] == nid ||
+                   path->path[path->depth - 1] == nid) {
+                       bool pin_old = path->pin_enabled;
+diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
+index abf8d342f1f4..707bc5405d9f 100644
+--- a/sound/pci/hda/patch_realtek.c
++++ b/sound/pci/hda/patch_realtek.c
+@@ -5505,6 +5505,7 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = {
+       SND_PCI_QUIRK(0x17aa, 0x504a, "ThinkPad X260", 
ALC292_FIXUP_TPT440_DOCK),
+       SND_PCI_QUIRK(0x17aa, 0x504b, "Thinkpad", 
ALC293_FIXUP_LENOVO_SPK_NOISE),
+       SND_PCI_QUIRK(0x17aa, 0x5050, "Thinkpad T560p", ALC292_FIXUP_TPT460),
++      SND_PCI_QUIRK(0x17aa, 0x5051, "Thinkpad L460", ALC292_FIXUP_TPT460),
+       SND_PCI_QUIRK(0x17aa, 0x5053, "Thinkpad T460", ALC292_FIXUP_TPT460),
+       SND_PCI_QUIRK(0x17aa, 0x5109, "Thinkpad", 
ALC269_FIXUP_LIMIT_INT_MIC_BOOST),
+       SND_PCI_QUIRK(0x17aa, 0x3bf8, "Quanta FL1", ALC269_FIXUP_PCM_44K),

Reply via email to