]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
add a bunch of 2.6.14 patches
authorGreg Kroah-Hartman <gregkh@suse.de>
Tue, 3 Jan 2006 23:49:05 +0000 (15:49 -0800)
committerGreg Kroah-Hartman <gregkh@suse.de>
Tue, 3 Jan 2006 23:49:05 +0000 (15:49 -0800)
queue-2.6.14/acpi-fix-asus_acpi-on-samsung-p30-p35.patch [new file with mode: 0644]
queue-2.6.14/drivers-net-sungem.c-gem_remove_one-mustn-t-be-__devexit.patch [new file with mode: 0644]
queue-2.6.14/ieee80211_crypt_tkip-depends-on-net_radio.patch [new file with mode: 0644]
queue-2.6.14/insanity-avoidance-in-proc.patch [new file with mode: 0644]
queue-2.6.14/sysctl-don-t-overflow-the-user-supplied-buffer-with-0.patch [new file with mode: 0644]

diff --git a/queue-2.6.14/acpi-fix-asus_acpi-on-samsung-p30-p35.patch b/queue-2.6.14/acpi-fix-asus_acpi-on-samsung-p30-p35.patch
new file mode 100644 (file)
index 0000000..b24aa5b
--- /dev/null
@@ -0,0 +1,85 @@
+From stable-bounces@linux.kernel.org Mon Jan  2 11:43:25 2006
+Message-Id: <200601021943.k02Jh9ph006743@shell0.pdx.osdl.net>
+To: len.brown@intel.com
+From: akpm@osdl.org
+Date: Mon, 02 Jan 2006 11:42:59 -0800
+Cc: Greek0@gmx.net, stable@kernel.org
+Subject:  acpi: fix asus_acpi on Samsung P30/P35
+
+
+From: Christian Aichinger <Greek0@gmx.net>
+
+For a while now asus_acpi is broken on samsung laptops (causes oopses on
+module loading and kernel panic if compiled into the kernel).
+
+Signed-off-by: Christian Aichinger <Greek0@gmx.net>
+Cc: "Brown, Len" <len.brown@intel.com>
+Cc: <stable@kernel.org>
+Signed-off-by: Andrew Morton <akpm@osdl.org>
+---
+
+ drivers/acpi/asus_acpi.c |   31 ++++++++++++++++++++++++++++---
+ 1 files changed, 28 insertions(+), 3 deletions(-)
+
+diff -puN drivers/acpi/asus_acpi.c~acpi-fix-asus_acpi-on-samsung-p30-p35 drivers/acpi/asus_acpi.c
+--- devel/drivers/acpi/asus_acpi.c~acpi-fix-asus_acpi-on-samsung-p30-p35       2006-01-02 11:40:47.000000000 -0800
++++ devel-akpm/drivers/acpi/asus_acpi.c        2006-01-02 11:42:29.000000000 -0800
+@@ -992,6 +992,25 @@ static int __init asus_hotk_get_info(voi
+               return -EINVAL;
+       model = (union acpi_object *) buffer.pointer;
++
++      /* INIT on Samsung's P35 returns an integer, possible return
++       * values are tested below */
++      if (model->type == ACPI_TYPE_INTEGER) {
++              if (model->integer.value == -1 ||
++                      model->integer.value == 0x58 ||
++                      model->integer.value == 0x38) {
++                      hotk->model = P30;
++                      printk(KERN_NOTICE "  Samsung P35 detected, "
++                                      "supported\n");
++                      goto out_known;
++              } else {
++                      printk(KERN_WARNING "  unknown integer 0x%llx returned "
++                                              "by INIT\n",
++                              (unsigned long long)model->integer.value);
++                      goto out_unknown;
++              }
++      }
++
+       /*
+        * Samsung P30 has a device with a valid _HID whose INIT does not 
+        * return anything. It used to be possible to catch this exception,
+@@ -1066,9 +1085,7 @@ static int __init asus_hotk_get_info(voi
+               hotk->model = L5x;
+       if (hotk->model == END_MODEL) {
+-              printk("unsupported, trying default values, supply the "
+-                     "developers with your DSDT\n");
+-              hotk->model = M2E;
++              goto out_unknown;
+       } else {
+               printk("supported\n");
+       }
+@@ -1097,6 +1114,14 @@ static int __init asus_hotk_get_info(voi
+       acpi_os_free(model);
+       return AE_OK;
++out_unknown:
++      printk(KERN_WARNING "  unsupported, trying default values, "
++                      "supply the developers with your DSDT\n");
++      hotk->model = M2E;
++out_known:
++      hotk->methods = &model_conf[hotk->model];
++      acpi_os_free(model);
++      return AE_OK;
+ }
+ static int __init asus_hotk_check(void)
+_
+
+_______________________________________________
+stable mailing list
+stable@linux.kernel.org
+http://linux.kernel.org/mailman/listinfo/stable
+
diff --git a/queue-2.6.14/drivers-net-sungem.c-gem_remove_one-mustn-t-be-__devexit.patch b/queue-2.6.14/drivers-net-sungem.c-gem_remove_one-mustn-t-be-__devexit.patch
new file mode 100644 (file)
index 0000000..634003f
--- /dev/null
@@ -0,0 +1,44 @@
+From stable-bounces@linux.kernel.org Thu Dec 29 19:05:25 2005
+Date: Thu, 29 Dec 2005 05:38:32 +0100
+From: Adrian Bunk <bunk@stusta.de>
+To: stable@kernel.org
+Message-ID: <20051229043832.GB4872@stusta.de>
+Content-Disposition: inline
+Cc: jgarzik@pobox.com, "David S. Miller" <davem@davemloft.net>
+Subject: drivers/net/sungem.c: gem_remove_one mustn't be __devexit
+
+gem_remove_one() is called from the __devinit gem_init_one().
+
+Therefore, gem_remove_one() mustn't be __devexit.
+
+This patch was already included in 2.6.15-rc7.
+
+
+Signed-off-by: Adrian Bunk <bunk@stusta.de>
+
+--- linux-2.6.15-rc6/drivers/net/sungem.c.old  2005-12-21 14:02:51.000000000 +0100
++++ linux-2.6.15-rc6/drivers/net/sungem.c      2005-12-21 14:03:37.000000000 +0100
+@@ -2907,7 +2907,7 @@
+       return 0;
+ }
+-static void __devexit gem_remove_one(struct pci_dev *pdev)
++static void gem_remove_one(struct pci_dev *pdev)
+ {
+       struct net_device *dev = pci_get_drvdata(pdev);
+@@ -3181,7 +3181,7 @@
+       .name           = GEM_MODULE_NAME,
+       .id_table       = gem_pci_tbl,
+       .probe          = gem_init_one,
+-      .remove         = __devexit_p(gem_remove_one),
++      .remove         = gem_remove_one,
+ #ifdef CONFIG_PM
+       .suspend        = gem_suspend,
+       .resume         = gem_resume,
+
+_______________________________________________
+stable mailing list
+stable@linux.kernel.org
+http://linux.kernel.org/mailman/listinfo/stable
+
diff --git a/queue-2.6.14/ieee80211_crypt_tkip-depends-on-net_radio.patch b/queue-2.6.14/ieee80211_crypt_tkip-depends-on-net_radio.patch
new file mode 100644 (file)
index 0000000..f77160e
--- /dev/null
@@ -0,0 +1,36 @@
+From stable-bounces@linux.kernel.org Fri Dec 30 15:26:06 2005
+Date: Fri, 30 Dec 2005 01:45:12 +0100
+From: Adrian Bunk <bunk@stusta.de>
+To: stable@kernel.org
+Message-ID: <20051230004512.GU3811@stusta.de>
+Content-Disposition: inline
+Cc: Jeff Garzik <jgarzik@pobox.com>, Olaf Hering <olh@suse.de>
+Subject: ieee80211_crypt_tkip depends on NET_RADIO
+
+*** Warning: ".wireless_send_event" [net/ieee80211/ieee80211_crypt_tkip.ko]
+
+This bug was also reported as kerenl Bugzilla #5551.
+
+This patch was already included in Linus' tree.
+
+
+Signed-off-by: Olaf Hering <olh@suse.de>
+Signed-off-by: Adrian Bunk <bunk@stusta.de>
+
+--- a/net/ieee80211/Kconfig
++++ b/net/ieee80211/Kconfig
+@@ -55,7 +55,7 @@ config IEEE80211_CRYPT_CCMP
+ config IEEE80211_CRYPT_TKIP
+       tristate "IEEE 802.11i TKIP encryption"
+-      depends on IEEE80211
++      depends on IEEE80211 && NET_RADIO
+       select CRYPTO
+       select CRYPTO_MICHAEL_MIC
+       ---help---
+
+_______________________________________________
+stable mailing list
+stable@linux.kernel.org
+http://linux.kernel.org/mailman/listinfo/stable
+
diff --git a/queue-2.6.14/insanity-avoidance-in-proc.patch b/queue-2.6.14/insanity-avoidance-in-proc.patch
new file mode 100644 (file)
index 0000000..88a77c8
--- /dev/null
@@ -0,0 +1,103 @@
+From stable-bounces@linux.kernel.org Fri Dec 30 22:13:50 2005
+Date: Fri, 30 Dec 2005 09:59:56 -0800
+Message-Id: <200512301759.jBUHxuXV001610@hera.kernel.org>
+From: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
+To: git-commits-head@vger.kernel.org
+Cc: 
+Subject: Insanity avoidance in /proc
+
+tree 8d7029403cc50d822bc22085202bfdbf6110203b
+parent 40c37213a081990b1d3778f57630f97df75a7ec1
+author Linus Torvalds <torvalds@g5.osdl.org> Sat, 31 Dec 2005 00:39:10 -0800
+committer Linus Torvalds <torvalds@g5.osdl.org> Sat, 31 Dec 2005 00:39:10 -0800
+
+Insanity avoidance in /proc
+
+The old /proc interfaces were never updated to use loff_t, and are just
+generally broken.  Now, we should be using the seq_file interface for
+all of the proc files, but converting the legacy functions is more work
+than most people care for and has little upside..
+
+But at least we can make the non-LFS rules explicit, rather than just
+insanely wrapping the offset or something.
+
+Signed-off-by: Linus Torvalds <torvalds@osdl.org>
+
+ fs/proc/generic.c |   47 +++++++++++++++++++++++------------------------
+ 1 files changed, 23 insertions(+), 24 deletions(-)
+
+diff --git a/fs/proc/generic.c b/fs/proc/generic.c
+index b638fb5..72b431d 100644
+--- a/fs/proc/generic.c
++++ b/fs/proc/generic.c
+@@ -54,6 +54,18 @@ proc_file_read(struct file *file, char _
+       ssize_t n, count;
+       char    *start;
+       struct proc_dir_entry * dp;
++      unsigned long long pos;
++
++      /*
++       * Gaah, please just use "seq_file" instead. The legacy /proc
++       * interfaces cut loff_t down to off_t for reads, and ignore
++       * the offset entirely for writes..
++       */
++      pos = *ppos;
++      if (pos > MAX_NON_LFS)
++              return 0;
++      if (nbytes > MAX_NON_LFS - pos)
++              nbytes = MAX_NON_LFS - pos;
+       dp = PDE(inode);
+       if (!(page = (char*) __get_free_page(GFP_KERNEL)))
+@@ -202,30 +214,17 @@ proc_file_write(struct file *file, const
+ static loff_t
+ proc_file_lseek(struct file *file, loff_t offset, int orig)
+ {
+-    lock_kernel();
+-
+-    switch (orig) {
+-    case 0:
+-      if (offset < 0)
+-          goto out;
+-      file->f_pos = offset;
+-      unlock_kernel();
+-      return(file->f_pos);
+-    case 1:
+-      if (offset + file->f_pos < 0)
+-          goto out;
+-      file->f_pos += offset;
+-      unlock_kernel();
+-      return(file->f_pos);
+-    case 2:
+-      goto out;
+-    default:
+-      goto out;
+-    }
+-
+-out:
+-    unlock_kernel();
+-    return -EINVAL;
++      loff_t retval = -EINVAL;
++      switch (orig) {
++      case 1:
++              offset += file->f_pos;
++      /* fallthrough */
++      case 0:
++              if (offset < 0 || offset > MAX_NON_LFS)
++                      break;
++              file->f_pos = retval = offset;
++      }
++      return retval;
+ }
+ static int proc_notify_change(struct dentry *dentry, struct iattr *iattr)
+-
+To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
+the body of a message to majordomo@vger.kernel.org
+More majordomo info at  http://vger.kernel.org/majordomo-info.html
+
+_______________________________________________
+stable mailing list
+stable@linux.kernel.org
+http://linux.kernel.org/mailman/listinfo/stable
+
diff --git a/queue-2.6.14/sysctl-don-t-overflow-the-user-supplied-buffer-with-0.patch b/queue-2.6.14/sysctl-don-t-overflow-the-user-supplied-buffer-with-0.patch
new file mode 100644 (file)
index 0000000..a5c9788
--- /dev/null
@@ -0,0 +1,56 @@
+From stable-bounces@linux.kernel.org Fri Dec 30 22:13:55 2005
+Date: Fri, 30 Dec 2005 21:59:41 -0800
+Message-Id: <200512310559.jBV5xfr2026442@hera.kernel.org>
+From: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
+To: git-commits-head@vger.kernel.org
+Cc: 
+Subject: sysctl: don't overflow the user-supplied buffer with '0'
+
+tree 2e1aaa5e4e68057a4e96a606e2ad0bcccedcd6df
+parent 8b90db0df7187a01fb7177f1f812123138f562cf
+author Linus Torvalds <torvalds@g5.osdl.org> Sat, 31 Dec 2005 09:18:53 -0800
+committer Linus Torvalds <torvalds@g5.osdl.org> Sat, 31 Dec 2005 09:18:53 -0800
+
+sysctl: don't overflow the user-supplied buffer with '0'
+
+If the string was too long to fit in the user-supplied buffer,
+the sysctl layer would zero-terminate it by writing past the
+end of the buffer. Don't do that.
+
+Noticed by Yi Yang <yang.y.yi@gmail.com>
+
+Signed-off-by: Linus Torvalds <torvalds@osdl.org>
+
+ kernel/sysctl.c |    4 +---
+ 1 files changed, 1 insertion(+), 3 deletions(-)
+
+diff --git a/kernel/sysctl.c b/kernel/sysctl.c
+index 9990e10..ad0425a 100644
+--- a/kernel/sysctl.c
++++ b/kernel/sysctl.c
+@@ -2201,14 +2201,12 @@ int sysctl_string(ctl_table *table, int 
+               if (get_user(len, oldlenp))
+                       return -EFAULT;
+               if (len) {
+-                      l = strlen(table->data);
++                      l = strlen(table->data)+1;
+                       if (len > l) len = l;
+                       if (len >= table->maxlen)
+                               len = table->maxlen;
+                       if(copy_to_user(oldval, table->data, len))
+                               return -EFAULT;
+-                      if(put_user(0, ((char __user *) oldval) + len))
+-                              return -EFAULT;
+                       if(put_user(len, oldlenp))
+                               return -EFAULT;
+               }
+-
+To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
+the body of a message to majordomo@vger.kernel.org
+More majordomo info at  http://vger.kernel.org/majordomo-info.html
+
+_______________________________________________
+stable mailing list
+stable@linux.kernel.org
+http://linux.kernel.org/mailman/listinfo/stable
+