summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Yamin <plasmaroo@gentoo.org>2004-06-19 13:00:49 +0000
committerTim Yamin <plasmaroo@gentoo.org>2004-06-19 13:00:49 +0000
commit4aedddb16d33f61a4e25eeb113f07f6575893d9f (patch)
treeadd4259f2574883d3b6ca6350a3e10ed690a8af1 /sys-kernel/gentoo-sources
parentAdded to ~ppc (Manifest recommit) (Manifest recommit) (diff)
downloadgentoo-2-4aedddb16d33f61a4e25eeb113f07f6575893d9f.tar.gz
gentoo-2-4aedddb16d33f61a4e25eeb113f07f6575893d9f.tar.bz2
gentoo-2-4aedddb16d33f61a4e25eeb113f07f6575893d9f.zip
Added a patch to add in missing I2C sanity checks that were added upstream in 2.4.21.
Diffstat (limited to 'sys-kernel/gentoo-sources')
-rw-r--r--sys-kernel/gentoo-sources/ChangeLog11
-rw-r--r--sys-kernel/gentoo-sources/files/digest-gentoo-sources-2.4.19-r16 (renamed from sys-kernel/gentoo-sources/files/digest-gentoo-sources-2.4.19-r15)0
-rw-r--r--sys-kernel/gentoo-sources/files/digest-gentoo-sources-2.4.20-r19 (renamed from sys-kernel/gentoo-sources/files/digest-gentoo-sources-2.4.20-r18)0
-rw-r--r--sys-kernel/gentoo-sources/files/gentoo-sources-2.4.I2C_Limits.patch44
-rw-r--r--sys-kernel/gentoo-sources/gentoo-sources-2.4.19-r16.ebuild (renamed from sys-kernel/gentoo-sources/gentoo-sources-2.4.19-r15.ebuild)6
-rw-r--r--sys-kernel/gentoo-sources/gentoo-sources-2.4.20-r19.ebuild (renamed from sys-kernel/gentoo-sources/gentoo-sources-2.4.20-r18.ebuild)7
6 files changed, 61 insertions, 7 deletions
diff --git a/sys-kernel/gentoo-sources/ChangeLog b/sys-kernel/gentoo-sources/ChangeLog
index 77d45ad304cc..41392486af13 100644
--- a/sys-kernel/gentoo-sources/ChangeLog
+++ b/sys-kernel/gentoo-sources/ChangeLog
@@ -1,6 +1,15 @@
# ChangeLog for sys-kernel/gentoo-sources
# Copyright 2002-2004 Gentoo Technologies, Inc.; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sys-kernel/gentoo-sources/ChangeLog,v 1.71 2004/06/14 20:37:48 plasmaroo Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-kernel/gentoo-sources/ChangeLog,v 1.72 2004/06/19 13:00:48 plasmaroo Exp $
+
+*gentoo-sources-2.4.20-r19 (19 Jun 2004)
+
+ 19 Jun 2004; <plasmaroo@gentoo.org> -gentoo-sources-2.4.19-r15.ebuild,
+ +gentoo-sources-2.4.19-r16.ebuild, -gentoo-sources-2.4.20-r18.ebuild,
+ +gentoo-sources-2.4.20-r19.ebuild,
+ +files/gentoo-sources-2.4.I2C_Limits.patch:
+ Added a patch to add in missing I2C sanity checks that were added upstream in
+ 2.4.21.
*gentoo-sources-2.4.20-r18 (14 Jun 2004)
diff --git a/sys-kernel/gentoo-sources/files/digest-gentoo-sources-2.4.19-r15 b/sys-kernel/gentoo-sources/files/digest-gentoo-sources-2.4.19-r16
index 19d991259834..19d991259834 100644
--- a/sys-kernel/gentoo-sources/files/digest-gentoo-sources-2.4.19-r15
+++ b/sys-kernel/gentoo-sources/files/digest-gentoo-sources-2.4.19-r16
diff --git a/sys-kernel/gentoo-sources/files/digest-gentoo-sources-2.4.20-r18 b/sys-kernel/gentoo-sources/files/digest-gentoo-sources-2.4.20-r19
index 0d9abd01d13b..0d9abd01d13b 100644
--- a/sys-kernel/gentoo-sources/files/digest-gentoo-sources-2.4.20-r18
+++ b/sys-kernel/gentoo-sources/files/digest-gentoo-sources-2.4.20-r19
diff --git a/sys-kernel/gentoo-sources/files/gentoo-sources-2.4.I2C_Limits.patch b/sys-kernel/gentoo-sources/files/gentoo-sources-2.4.I2C_Limits.patch
new file mode 100644
index 000000000000..af20a6fc0c2c
--- /dev/null
+++ b/sys-kernel/gentoo-sources/files/gentoo-sources-2.4.I2C_Limits.patch
@@ -0,0 +1,44 @@
+--- linux-2.4.20/drivers/i2c/i2c-dev.c 2004-06-19 03:27:30 -07:00
++++ linux-2.4.21/drivers/i2c/i2c-dev.c 2004-06-19 03:27:30 -07:00
+@@ -254,6 +254,11 @@
+ sizeof(rdwr_arg)))
+ return -EFAULT;
+
++ /* Put an arbritrary limit on the number of messages that can
++ * be sent at once */
++ if (rdwr_arg.nmsgs > 42)
++ return -EINVAL;
++
+ rdwr_pa = (struct i2c_msg *)
+ kmalloc(rdwr_arg.nmsgs * sizeof(struct i2c_msg),
+ GFP_KERNEL);
+@@ -270,6 +275,11 @@
+ res = -EFAULT;
+ break;
+ }
++ /* Limit the size of the message to a sane amount */
++ if (rdwr_pa[i].len > 8192) {
++ res = -EINVAL;
++ break;
++ }
+ rdwr_pa[i].buf = kmalloc(rdwr_pa[i].len, GFP_KERNEL);
+ if(rdwr_pa[i].buf == NULL)
+ {
+@@ -280,10 +290,16 @@
+ rdwr_arg.msgs[i].buf,
+ rdwr_pa[i].len))
+ {
+- kfree(rdwr_pa[i].buf);
+ res = -EFAULT;
+ break;
+ }
++ }
++ if (res < 0) {
++ int j;
++ for (j = 0; j < i; ++j)
++ kfree(rdwr_pa[j].buf);
++ kfree(rdwr_pa);
++ return res;
+ }
+ if (!res)
+ {
diff --git a/sys-kernel/gentoo-sources/gentoo-sources-2.4.19-r15.ebuild b/sys-kernel/gentoo-sources/gentoo-sources-2.4.19-r16.ebuild
index 693ca7b8c937..9dd4fbbb3d38 100644
--- a/sys-kernel/gentoo-sources/gentoo-sources-2.4.19-r15.ebuild
+++ b/sys-kernel/gentoo-sources/gentoo-sources-2.4.19-r16.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2004 Gentoo Technologies, Inc.
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-kernel/gentoo-sources/gentoo-sources-2.4.19-r15.ebuild,v 1.1 2004/06/14 20:37:48 plasmaroo Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-kernel/gentoo-sources/gentoo-sources-2.4.19-r16.ebuild,v 1.1 2004/06/19 13:00:48 plasmaroo Exp $
IUSE="build crypt xfs acpi4linux"
@@ -35,7 +35,7 @@ S=${WORKDIR}/linux-${KV}
DESCRIPTION="Full sources for the Gentoo Linux kernel"
SRC_URI="mirror://kernel/linux/kernel/v2.4/linux-${OKV}.tar.bz2
- http://gentoo.lostlogicx.com/patches-${KV/15/10}.tar.bz2"
+ http://gentoo.lostlogicx.com/patches-${KV/16/10}.tar.bz2"
KEYWORDS="x86 -ppc -sparc -amd64 -ia64"
SLOT="${KV}"
@@ -43,7 +43,7 @@ src_unpack() {
unpack ${A}
mv linux-${OKV} linux-${KV} || die
- cd ${KV/15/10}
+ cd ${KV/16/10}
# Kill patches we aren't suppposed to use, don't worry about
# failures, if they aren't there that is a good thing!
diff --git a/sys-kernel/gentoo-sources/gentoo-sources-2.4.20-r18.ebuild b/sys-kernel/gentoo-sources/gentoo-sources-2.4.20-r19.ebuild
index 5195d6d1af03..29671893eb3e 100644
--- a/sys-kernel/gentoo-sources/gentoo-sources-2.4.20-r18.ebuild
+++ b/sys-kernel/gentoo-sources/gentoo-sources-2.4.20-r19.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2004 Gentoo Technologies, Inc.
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-kernel/gentoo-sources/gentoo-sources-2.4.20-r18.ebuild,v 1.1 2004/06/14 20:37:48 plasmaroo Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-kernel/gentoo-sources/gentoo-sources-2.4.20-r19.ebuild,v 1.1 2004/06/19 13:00:48 plasmaroo Exp $
IUSE="build crypt evms2 aavm usagi"
@@ -30,7 +30,7 @@ S=${WORKDIR}/linux-${KV}
DESCRIPTION="Full sources for the Gentoo Kernel."
SRC_URI="mirror://kernel/linux/kernel/v2.4/linux-${OKV}.tar.bz2
- http://dev.gentoo.org/~plasmaroo/patches/kernel/gentoo-sources/patches-${KV/18/14}.tar.bz2"
+ http://dev.gentoo.org/~plasmaroo/patches/kernel/gentoo-sources/patches-${KV/19/14}.tar.bz2"
HOMEPAGE="http://www.gentoo.org/ http://www.kernel.org/"
LICENSE="GPL-2"
KEYWORDS="x86 -ppc -sparc -alpha -hppa -mips"
@@ -40,7 +40,7 @@ src_unpack() {
unpack ${A}
mv linux-${OKV} linux-${KV} || die "Error moving kernel source tree to linux-${KV}"
- cd ${WORKDIR}/${KV/18/14}
+ cd ${WORKDIR}/${KV/19/14}
# This is the *ratified* aavm USE flag, enables aavm support in this kernel
if [ -z "`use aavm`" ]; then
@@ -135,6 +135,7 @@ src_unpack() {
epatch ${FILESDIR}/${PN}-2.4.CAN-2004-0181.patch || die "Failed to add the CAN-2004-0181 patch!"
epatch ${FILESDIR}/${PN}-2.4.CAN-2004-0394.patch || die "Failed to add the CAN-2004-0394 patch!"
epatch ${FILESDIR}/${PN}-2.4.CAN-2004-0427.patch || die "Failed to add the CAN-2004-0427 patch!"
+ epatch ${FILESDIR}/${PN}-2.4.I2C_Limits.patch || die "Failed to patch the I2C i2cdev_ioctl() kmalloc() bug!"
epatch ${FILESDIR}/${PN}-2.4.FPULockup-53804.patch || die "Failed to apply FPU-lockup patch!"
}