2.6.35.8, ir-core, lirc and hdpvr updates

* Wed Nov 10 2010 Jarod Wilson <jarod@redhat.com> 2.6.35.8-53
- Linux 2.6.35.8
- Drop patches upstreamed in 2.6.35.8
- More ir-core and lirc updates
- HD-PVR driver updates

Signed-off-by: Jarod Wilson <jarod@redhat.com>
This commit is contained in:
Jarod Wilson 2010-11-10 12:42:45 -05:00
parent 5ddd90a5d8
commit 28683a07fb
11 changed files with 5384 additions and 485 deletions

View File

@ -1,36 +0,0 @@
From: Roland McGrath <roland@redhat.com>
Date: Wed, 8 Sep 2010 02:36:28 +0000 (-0700)
Subject: execve: improve interactivity with large arguments
X-Git-Tag: v2.6.36-rc4~13
X-Git-Url: http://git.kernel.org/?p=linux%2Fkernel%2Fgit%2Ftorvalds%2Flinux-2.6.git;a=commitdiff_plain;h=7993bc1f4663c0db67bb8f0d98e6678145b387cd
execve: improve interactivity with large arguments
This adds a preemption point during the copying of the argument and
environment strings for execve, in copy_strings(). There is already
a preemption point in the count() loop, so this doesn't add any new
points in the abstract sense.
When the total argument+environment strings are very large, the time
spent copying them can be much more than a normal user time slice.
So this change improves the interactivity of the rest of the system
when one process is doing an execve with very large arguments.
Signed-off-by: Roland McGrath <roland@redhat.com>
Reviewed-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
---
diff --git a/fs/exec.c b/fs/exec.c
index 1b63237..6f2d777 100644
--- a/fs/exec.c
+++ b/fs/exec.c
@@ -419,6 +419,8 @@ static int copy_strings(int argc, const char __user *const __user *argv,
while (len > 0) {
int offset, bytes_to_copy;
+ cond_resched();
+
offset = pos % PAGE_SIZE;
if (offset == 0)
offset = PAGE_SIZE;

View File

@ -1,51 +0,0 @@
From: Roland McGrath <roland@redhat.com>
Date: Wed, 8 Sep 2010 02:37:06 +0000 (-0700)
Subject: execve: make responsive to SIGKILL with large arguments
X-Git-Tag: v2.6.36-rc4~12
X-Git-Url: http://git.kernel.org/?p=linux%2Fkernel%2Fgit%2Ftorvalds%2Flinux-2.6.git;a=commitdiff_plain;h=9aea5a65aa7a1af9a4236dfaeb0088f1624f9919
execve: make responsive to SIGKILL with large arguments
An execve with a very large total of argument/environment strings
can take a really long time in the execve system call. It runs
uninterruptibly to count and copy all the strings. This change
makes it abort the exec quickly if sent a SIGKILL.
Note that this is the conservative change, to interrupt only for
SIGKILL, by using fatal_signal_pending(). It would be perfectly
correct semantics to let any signal interrupt the string-copying in
execve, i.e. use signal_pending() instead of fatal_signal_pending().
We'll save that change for later, since it could have user-visible
consequences, such as having a timer set too quickly make it so that
an execve can never complete, though it always happened to work before.
Signed-off-by: Roland McGrath <roland@redhat.com>
Reviewed-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
---
diff --git a/fs/exec.c b/fs/exec.c
index 6f2d777..828dd24 100644
--- a/fs/exec.c
+++ b/fs/exec.c
@@ -376,6 +376,9 @@ static int count(const char __user * const __user * argv, int max)
argv++;
if (i++ >= max)
return -E2BIG;
+
+ if (fatal_signal_pending(current))
+ return -ERESTARTNOHAND;
cond_resched();
}
}
@@ -419,6 +422,10 @@ static int copy_strings(int argc, const char __user *const __user *argv,
while (len > 0) {
int offset, bytes_to_copy;
+ if (fatal_signal_pending(current)) {
+ ret = -ERESTARTNOHAND;
+ goto out;
+ }
cond_resched();
offset = pos % PAGE_SIZE;

View File

@ -48,7 +48,7 @@ Summary: The Linux kernel
# reset this by hand to 1 (or to 0 and then use rpmdev-bumpspec).
# scripts/rebase.sh should be made to do that for you, actually.
#
%global baserelease 52
%global baserelease 53
%global fedora_build %{baserelease}
# base_sublevel is the kernel version we're starting with and patching
@ -60,7 +60,7 @@ Summary: The Linux kernel
%if 0%{?released_kernel}
# Do we have a -stable update to apply?
%define stable_update 6
%define stable_update 8
# Is it a -stable RC?
%define stable_rc 0
# Set rpm version accordingly
@ -707,6 +707,8 @@ Patch2917: hdpvr-ir-enable.patch
Patch2918: linux-2.6-v4l-dvb-ir-core-update-2.patch
Patch2919: linux-2.6-v4l-dvb-ir-core-update-3.patch
Patch2920: linux-2.6-lirc-ioctl-compat-fixups.patch
Patch2921: linux-2.6-v4l-dvb-ir-core-update-4.patch
Patch2922: linux-2.6-v4l-dvb-hdpvr-updates.patch
Patch2923: linux-2.6-v4l-dvb-ir-core-fix-imon.patch
Patch2950: linux-2.6-via-velocity-dma-fix.patch
@ -738,11 +740,6 @@ Patch12086: linux-2.6-cgroups-rcu.patch
Patch12517: flexcop-fix-xlate_proc_name-warning.patch
# mitigate DOS attack with large argument lists
Patch12520: execve-improve-interactivity-with-large-arguments.patch
Patch12521: execve-make-responsive-to-sigkill-with-large-arguments.patch
Patch12522: setup_arg_pages-diagnose-excessive-argument-size.patch
Patch12565: sched-05-avoid-side-effect-of-tickless-idle-on-update_cpu_load.patch
Patch12570: sched-10-change-nohz-idle-load-balancing-logic-to-push-model.patch
Patch12575: sched-15-update-rq-clock-for-nohz-balanced-cpus.patch
@ -757,13 +754,9 @@ Patch13601: btusb-macbookpro-7-1.patch
Patch13603: pnpacpi-cope-with-invalid-device-ids.patch
Patch13610: libata-it821x-dump-stack-on-cache-flush.patch
Patch13620: xen-fix-typo-in-xen-irq-fix.patch
Patch13630: dm-allow-setting-of-uuid-via-rename-if-not-already-set.patch
Patch13635: r8169-fix-dma-allocations.patch
Patch13636: skge-quirk-to-4gb-dma.patch
Patch13637: dmar-disable-when-ricoh-multifunction.patch
Patch13638: ima-allow-it-to-be-completely-disabled-and-default-off.patch
@ -773,11 +766,8 @@ Patch13641: mmc-make-sdhci-work-with-ricoh-mmc-controller.patch
Patch13642: mmc-add-ricoh-e822-pci-id.patch
Patch13645: tpm-autodetect-itpm-devices.patch
Patch13646: depessimize-rds_copy_page_user.patch
Patch13650: drm-i915-sanity-check-pread-pwrite.patch
Patch13651: kvm-fix-fs-gs-reload-oops-with-invalid-ldt.patch
Patch13652: v4l1-fix-32-bit-compat-microcode-loading-translation.patch
%endif
@ -1375,6 +1365,8 @@ ApplyPatch hdpvr-ir-enable.patch
ApplyPatch linux-2.6-v4l-dvb-ir-core-update-2.patch
ApplyPatch linux-2.6-v4l-dvb-ir-core-update-3.patch
ApplyPatch linux-2.6-lirc-ioctl-compat-fixups.patch
ApplyPatch linux-2.6-v4l-dvb-ir-core-update-4.patch
ApplyPatch linux-2.6-v4l-dvb-hdpvr-updates.patch
ApplyPatch linux-2.6-v4l-dvb-ir-core-fix-imon.patch
# Fix DMA bug on via-velocity
@ -1405,11 +1397,6 @@ ApplyPatch linux-2.6-cgroups-rcu.patch
# bz #575873
ApplyPatch flexcop-fix-xlate_proc_name-warning.patch
# mitigate DOS attack with large argument lists
ApplyPatch execve-improve-interactivity-with-large-arguments.patch
ApplyPatch execve-make-responsive-to-sigkill-with-large-arguments.patch
ApplyPatch setup_arg_pages-diagnose-excessive-argument-size.patch
# Scheduler fixes (#635813 and #633037)
ApplyPatch sched-05-avoid-side-effect-of-tickless-idle-on-update_cpu_load.patch
ApplyPatch sched-10-change-nohz-idle-load-balancing-logic-to-push-model.patch
@ -1425,20 +1412,12 @@ ApplyPatch btusb-macbookpro-6-2.patch
# temporary patch, dump stack on failed it821x commands
ApplyPatch libata-it821x-dump-stack-on-cache-flush.patch
# temporary fix for typo in Xen -stable patch
ApplyPatch xen-fix-typo-in-xen-irq-fix.patch
# rhbz#641468
ApplyPatch pnpacpi-cope-with-invalid-device-ids.patch
# rhbz#641476
ApplyPatch dm-allow-setting-of-uuid-via-rename-if-not-already-set.patch
# rhbz#629158
ApplyPatch r8169-fix-dma-allocations.patch
# rhbz#447489
ApplyPatch skge-quirk-to-4gb-dma.patch
# rhbz#605888
ApplyPatch dmar-disable-when-ricoh-multifunction.patch
@ -1449,15 +1428,10 @@ ApplyPatch sdhci-8-bit-data-transfer-width-support.patch
ApplyPatch mmc-make-sdhci-work-with-ricoh-mmc-controller.patch
ApplyPatch mmc-add-ricoh-e822-pci-id.patch
ApplyPatch depessimize-rds_copy_page_user.patch
ApplyPatch tpm-autodetect-itpm-devices.patch
# CVE-2010-2962
ApplyPatch drm-i915-sanity-check-pread-pwrite.patch
# CVE-2010-3698
ApplyPatch kvm-fix-fs-gs-reload-oops-with-invalid-ldt.patch
# CVE-2010-2963
ApplyPatch v4l1-fix-32-bit-compat-microcode-loading-translation.patch
# END OF PATCH APPLICATIONS
@ -2045,6 +2019,12 @@ fi
# and build.
%changelog
* Wed Nov 10 2010 Jarod Wilson <jarod@redhat.com> 2.6.35.8-53
- Linux 2.6.35.8
- Drop patches upstreamed in 2.6.35.8
- More ir-core and lirc updates
- HD-PVR driver updates
* Tue Nov 09 2010 Dave Airlie <airlied@redhat.com> - 2.6.35.6-52
- add i915 polling s/r patch

View File

@ -0,0 +1,239 @@
These are from the media_tree staging/v2.6.37 branch:
http://git.linuxtv.org/media_tree.git?a=shortlog;h=refs/heads/staging/v2.6.37
commit 203096251dce7079ef6689836e08a97c2365a258
Author: James M McLaren <mclaren@tulane.edu>
Date: Sun Oct 3 19:09:18 2010 -0300
[media] hdpvr: Add missing URB_NO_TRANSFER_DMA_MAP flag
Necessary on arm.
Signed-off-by: Janne Grunau <j@jannau.net>
Cc: stable@kernel.org
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
commit 0987d5b39def07e081376ec48e0825a8d9d0c1e0
Author: Alan Young <ayoung@teleport.com>
Date: Mon Jul 26 08:17:53 2010 -0300
[media] hdpvr: remove unnecessary sleep in hdpvr_config_call
Signed-off-by: Janne Grunau <j@jannau.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
commit db882a96564a8f8384b3d44ba5f4dcc2b29fa6ea
Author: Alan Young <ayoung@teleport.com>
Date: Mon Jul 26 16:27:32 2010 -0300
[media] hdpvr: remove unecessary sleep in buffer drain loop
Signed-off-by: Janne Grunau <j@jannau.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
commit c4b3bb7d6cbbfd729f8531ea433cdbe4ce6d6ec9
Author: Alan Young <ayoung@teleport.com>
Date: Mon Jul 26 08:30:06 2010 -0300
[media] hdpvr: print firmware date
Hauppauge released different firmwares using the same version number.
The firmware date can be used to identify the exact driver/firmware
combination.
Signed-off-by: Janne Grunau <j@jannau.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
commit a742a790bc200a356b0645592bb21ebee55c81cd
Author: Janne Grunau <j@jannau.net>
Date: Tue Jul 27 11:03:35 2010 -0300
[media] hdpvr: add two known to work firmware versions
refine the firmware version test and print the version only once
Signed-off-by: Janne Grunau <j@jannau.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
commit ab98088577ea97545c72be69ba092b4f12909bc9
Author: Janne Grunau <j@jannau.net>
Date: Tue Jul 27 10:40:43 2010 -0300
[media] hdpvr: use AC3 as default audio codec for SPDIF
Signed-off-by: Janne Grunau <j@jannau.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
commit a7c443ee3040383e4d9b261d0af811350d221035
Author: Janne Grunau <j@jannau.net>
Date: Tue Jul 27 11:01:47 2010 -0300
[media] hdpvr: fix audio input setting for pre AC3 firmwares
Signed-off-by: Janne Grunau <j@jannau.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
commit 8a01ef612c78a802262a455eadf46240d4f02136
Author: Alan Young <ayoung@teleport.com>
Date: Mon Jul 26 08:50:32 2010 -0300
[media] hdpvr: decrease URB timeout to 90ms
Based on USB traces of the windows driver.
Signed-off-by: Janne Grunau <j@jannau.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
commit 0e64f3d51b608e95bef4a324e85992d3da3c52ac
Author: Janne Grunau <j@jannau.net>
Date: Mon Oct 11 10:29:36 2010 -0300
[media] hdpvr: add usb product id 0x4903
Signed-off-by: Janne Grunau <j@jannau.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
---
Index: linux-2.6.35.x86_64.ir/drivers/media/video/hdpvr/hdpvr-video.c
===================================================================
--- linux-2.6.35.x86_64.ir.orig/drivers/media/video/hdpvr/hdpvr-video.c
+++ linux-2.6.35.x86_64.ir/drivers/media/video/hdpvr/hdpvr-video.c
@@ -26,7 +26,7 @@
#include <media/v4l2-ioctl.h>
#include "hdpvr.h"
-#define BULK_URB_TIMEOUT 1250 /* 1.25 seconds */
+#define BULK_URB_TIMEOUT 90 /* 0.09 seconds */
#define print_buffer_status() { \
v4l2_dbg(MSG_BUFFER, hdpvr_debug, &dev->v4l2_dev, \
@@ -157,6 +157,7 @@ int hdpvr_alloc_buffers(struct hdpvr_dev
mem, dev->bulk_in_size,
hdpvr_read_bulk_callback, buf);
+ buf->urb->transfer_flags |= URB_NO_TRANSFER_DMA_MAP;
buf->status = BUFSTAT_AVAILABLE;
list_add_tail(&buf->buff_list, &dev->free_buff_list);
}
@@ -337,8 +338,6 @@ static int hdpvr_stop_streaming(struct h
dev->bulk_in_endpointAddr),
buf, dev->bulk_in_size, &actual_length,
BULK_URB_TIMEOUT)) {
- /* wait */
- msleep(5);
v4l2_dbg(MSG_BUFFER, hdpvr_debug, &dev->v4l2_dev,
"%2d: got %d bytes\n", c, actual_length);
}
Index: linux-2.6.35.x86_64.ir/drivers/media/video/hdpvr/hdpvr-control.c
===================================================================
--- linux-2.6.35.x86_64.ir.orig/drivers/media/video/hdpvr/hdpvr-control.c
+++ linux-2.6.35.x86_64.ir/drivers/media/video/hdpvr/hdpvr-control.c
@@ -29,8 +29,6 @@ int hdpvr_config_call(struct hdpvr_devic
int ret;
char request_type = 0x38, snd_request = 0x01;
- msleep(10);
-
mutex_lock(&dev->usbc_mutex);
dev->usbc_buf[0] = valbuf;
ret = usb_control_msg(dev->udev,
@@ -170,8 +168,7 @@ int hdpvr_set_audio(struct hdpvr_device
if (ret == 2)
ret = 0;
} else
- ret = hdpvr_config_call(dev, CTRL_AUDIO_INPUT_VALUE,
- dev->options.audio_input+1);
+ ret = hdpvr_config_call(dev, CTRL_AUDIO_INPUT_VALUE, input);
error:
return ret;
}
Index: linux-2.6.35.x86_64.ir/drivers/media/video/hdpvr/hdpvr-core.c
===================================================================
--- linux-2.6.35.x86_64.ir.orig/drivers/media/video/hdpvr/hdpvr-core.c
+++ linux-2.6.35.x86_64.ir/drivers/media/video/hdpvr/hdpvr-core.c
@@ -60,6 +60,7 @@ static struct usb_device_id hdpvr_table[
{ USB_DEVICE(HD_PVR_VENDOR_ID, HD_PVR_PRODUCT_ID1) },
{ USB_DEVICE(HD_PVR_VENDOR_ID, HD_PVR_PRODUCT_ID2) },
{ USB_DEVICE(HD_PVR_VENDOR_ID, HD_PVR_PRODUCT_ID3) },
+ { USB_DEVICE(HD_PVR_VENDOR_ID, HD_PVR_PRODUCT_ID4) },
{ } /* Terminating entry */
};
MODULE_DEVICE_TABLE(usb, hdpvr_table);
@@ -152,19 +153,26 @@ static int device_authorization(struct h
ret, print_buf);
}
#endif
- if (dev->usbc_buf[1] == HDPVR_FIRMWARE_VERSION) {
+
+ v4l2_info(&dev->v4l2_dev, "firmware version 0x%x dated %s\n",
+ dev->usbc_buf[1], &dev->usbc_buf[2]);
+
+ switch (dev->usbc_buf[1]) {
+ case HDPVR_FIRMWARE_VERSION:
dev->flags &= ~HDPVR_FLAG_AC3_CAP;
- } else if (dev->usbc_buf[1] == HDPVR_FIRMWARE_VERSION_AC3) {
- dev->flags |= HDPVR_FLAG_AC3_CAP;
- } else if (dev->usbc_buf[1] > HDPVR_FIRMWARE_VERSION_AC3) {
- v4l2_info(&dev->v4l2_dev, "untested firmware version 0x%x, "
- "the driver might not work\n", dev->usbc_buf[1]);
+ break;
+ case HDPVR_FIRMWARE_VERSION_AC3:
+ case HDPVR_FIRMWARE_VERSION_0X12:
+ case HDPVR_FIRMWARE_VERSION_0X15:
dev->flags |= HDPVR_FLAG_AC3_CAP;
- } else {
- v4l2_err(&dev->v4l2_dev, "unknown firmware version 0x%x\n",
- dev->usbc_buf[1]);
- ret = -EINVAL;
- goto unlock;
+ break;
+ default:
+ v4l2_info(&dev->v4l2_dev, "untested firmware, the driver might"
+ " not work.\n");
+ if (dev->usbc_buf[1] >= HDPVR_FIRMWARE_VERSION_AC3)
+ dev->flags |= HDPVR_FLAG_AC3_CAP;
+ else
+ dev->flags &= ~HDPVR_FLAG_AC3_CAP;
}
response = dev->usbc_buf+38;
@@ -319,8 +327,12 @@ static int hdpvr_probe(struct usb_interf
if (default_video_input < HDPVR_VIDEO_INPUTS)
dev->options.video_input = default_video_input;
- if (default_audio_input < HDPVR_AUDIO_INPUTS)
+ if (default_audio_input < HDPVR_AUDIO_INPUTS) {
dev->options.audio_input = default_audio_input;
+ if (default_audio_input == HDPVR_SPDIF)
+ dev->options.audio_codec =
+ V4L2_MPEG_AUDIO_ENCODING_AC3;
+ }
dev->udev = usb_get_dev(interface_to_usbdev(interface));
Index: linux-2.6.35.x86_64.ir/drivers/media/video/hdpvr/hdpvr.h
===================================================================
--- linux-2.6.35.x86_64.ir.orig/drivers/media/video/hdpvr/hdpvr.h
+++ linux-2.6.35.x86_64.ir/drivers/media/video/hdpvr/hdpvr.h
@@ -30,14 +30,17 @@
#define HD_PVR_PRODUCT_ID 0x4900
#define HD_PVR_PRODUCT_ID1 0x4901
#define HD_PVR_PRODUCT_ID2 0x4902
+#define HD_PVR_PRODUCT_ID4 0x4903
#define HD_PVR_PRODUCT_ID3 0x4982
#define UNSET (-1U)
#define NUM_BUFFERS 64
-#define HDPVR_FIRMWARE_VERSION 0x8
-#define HDPVR_FIRMWARE_VERSION_AC3 0xd
+#define HDPVR_FIRMWARE_VERSION 0x08
+#define HDPVR_FIRMWARE_VERSION_AC3 0x0d
+#define HDPVR_FIRMWARE_VERSION_0X12 0x12
+#define HDPVR_FIRMWARE_VERSION_0X15 0x15
/* #define HDPVR_DEBUG */

View File

@ -222,10 +222,10 @@ Date: Mon Sep 6 18:26:08 2010 -0300
include/media/ir-core.h | 1 +
7 files changed, 2010 insertions(+), 250 deletions(-)
diff --git a/drivers/media/IR/Kconfig b/drivers/media/IR/Kconfig
index 152000d..d67fff3 100644
--- a/drivers/media/IR/Kconfig
+++ b/drivers/media/IR/Kconfig
Index: linux-2.6.35.x86_64/drivers/media/IR/Kconfig
===================================================================
--- linux-2.6.35.x86_64.orig/drivers/media/IR/Kconfig
+++ linux-2.6.35.x86_64/drivers/media/IR/Kconfig
@@ -101,6 +101,20 @@ config IR_LIRC_CODEC
Enable this option to pass raw IR to and from userspace via
the LIRC interface.
@ -273,21 +273,21 @@ index 152000d..d67fff3 100644
config IR_STREAMZAP
tristate "Streamzap PC Remote IR Receiver"
diff --git a/drivers/media/IR/Makefile b/drivers/media/IR/Makefile
index 953c6c4..f9574ad 100644
--- a/drivers/media/IR/Makefile
+++ b/drivers/media/IR/Makefile
@@ -17,5 +17,6 @@ obj-$(CONFIG_IR_LIRC_CODEC) += ir-lirc-codec.o
Index: linux-2.6.35.x86_64/drivers/media/IR/Makefile
===================================================================
--- linux-2.6.35.x86_64.orig/drivers/media/IR/Makefile
+++ linux-2.6.35.x86_64/drivers/media/IR/Makefile
@@ -17,5 +17,6 @@ obj-$(CONFIG_IR_LIRC_CODEC) += ir-lirc-c
# stand-alone IR receivers/transmitters
obj-$(CONFIG_IR_IMON) += imon.o
obj-$(CONFIG_IR_MCEUSB) += mceusb.o
+obj-$(CONFIG_IR_NUVOTON) += nuvoton-cir.o
obj-$(CONFIG_IR_ENE) += ene_ir.o
obj-$(CONFIG_IR_STREAMZAP) += streamzap.o
diff --git a/drivers/media/IR/imon.c b/drivers/media/IR/imon.c
index c185422..7a97176 100644
--- a/drivers/media/IR/imon.c
+++ b/drivers/media/IR/imon.c
Index: linux-2.6.35.x86_64/drivers/media/IR/imon.c
===================================================================
--- linux-2.6.35.x86_64.orig/drivers/media/IR/imon.c
+++ linux-2.6.35.x86_64/drivers/media/IR/imon.c
@@ -1,7 +1,7 @@
/*
* imon.c: input and display driver for SoundGraph iMON IR/VFD/LCD
@ -346,7 +346,7 @@ index c185422..7a97176 100644
/* iMON Knob values */
{ 0x000100ffffffffeell, KEY_VOLUMEUP },
{ 0x010000ffffffffeell, KEY_VOLUMEDOWN },
@@ -956,17 +964,6 @@ static void usb_tx_callback(struct urb *urb)
@@ -956,17 +964,6 @@ static void usb_tx_callback(struct urb *
}
/**
@ -364,7 +364,7 @@ index c185422..7a97176 100644
* report touchscreen input
*/
static void imon_touch_display_timeout(unsigned long data)
@@ -1006,9 +1003,6 @@ int imon_ir_change_protocol(void *priv, u64 ir_type)
@@ -1006,9 +1003,6 @@ int imon_ir_change_protocol(void *priv,
dev_dbg(dev, "Configuring IR receiver for MCE protocol\n");
ir_proto_packet[0] = 0x01;
pad_mouse = false;
@ -374,7 +374,7 @@ index c185422..7a97176 100644
break;
case IR_TYPE_UNKNOWN:
case IR_TYPE_OTHER:
@@ -1147,20 +1141,21 @@ static int stabilize(int a, int b, u16 timeout, u16 threshold)
@@ -1147,20 +1141,21 @@ static int stabilize(int a, int b, u16 t
return result;
}
@ -400,7 +400,7 @@ index c185422..7a97176 100644
if (keycode != KEY_RESERVED)
is_release_code = true;
}
@@ -1170,9 +1165,8 @@ static u32 imon_remote_key_lookup(struct imon_context *ictx, u32 hw_code)
@@ -1170,9 +1165,8 @@ static u32 imon_remote_key_lookup(struct
return keycode;
}
@ -411,7 +411,7 @@ index c185422..7a97176 100644
u32 keycode;
#define MCE_KEY_MASK 0x7000
@@ -1186,18 +1180,21 @@ static u32 imon_mce_key_lookup(struct imon_context *ictx, u32 hw_code)
@@ -1186,18 +1180,21 @@ static u32 imon_mce_key_lookup(struct im
* but we can't or them into all codes, as some keys are decoded in
* a different way w/o the same use of the toggle bit...
*/
@ -437,7 +437,7 @@ index c185422..7a97176 100644
u32 keycode = KEY_RESERVED;
for (i = 0; i < ARRAY_SIZE(imon_panel_key_table); i++) {
@@ -1217,6 +1214,9 @@ static bool imon_mouse_event(struct imon_context *ictx,
@@ -1217,6 +1214,9 @@ static bool imon_mouse_event(struct imon
u8 right_shift = 1;
bool mouse_input = true;
int dir = 0;
@ -447,7 +447,7 @@ index c185422..7a97176 100644
/* newer iMON device PAD or mouse button */
if (ictx->product != 0xffdc && (buf[0] & 0x01) && len == 5) {
@@ -1248,6 +1248,8 @@ static bool imon_mouse_event(struct imon_context *ictx,
@@ -1248,6 +1248,8 @@ static bool imon_mouse_event(struct imon
} else
mouse_input = false;
@ -456,7 +456,7 @@ index c185422..7a97176 100644
if (mouse_input) {
dev_dbg(ictx->dev, "sending mouse data via input subsystem\n");
@@ -1262,7 +1264,9 @@ static bool imon_mouse_event(struct imon_context *ictx,
@@ -1262,7 +1264,9 @@ static bool imon_mouse_event(struct imon
buf[1] >> right_shift & 0x1);
}
input_sync(ictx->idev);
@ -466,7 +466,7 @@ index c185422..7a97176 100644
}
return mouse_input;
@@ -1284,8 +1288,8 @@ static void imon_pad_to_keys(struct imon_context *ictx, unsigned char *buf)
@@ -1284,8 +1288,8 @@ static void imon_pad_to_keys(struct imon
int dir = 0;
char rel_x = 0x00, rel_y = 0x00;
u16 timeout, threshold;
@ -477,7 +477,7 @@ index c185422..7a97176 100644
/*
* The imon directional pad functions more like a touchpad. Bytes 3 & 4
@@ -1309,26 +1313,36 @@ static void imon_pad_to_keys(struct imon_context *ictx, unsigned char *buf)
@@ -1309,26 +1313,36 @@ static void imon_pad_to_keys(struct imon
dir = stabilize((int)rel_x, (int)rel_y,
timeout, threshold);
if (!dir) {
@ -521,7 +521,7 @@ index c185422..7a97176 100644
}
}
@@ -1365,34 +1379,56 @@ static void imon_pad_to_keys(struct imon_context *ictx, unsigned char *buf)
@@ -1365,34 +1379,56 @@ static void imon_pad_to_keys(struct imon
dir = stabilize((int)rel_x, (int)rel_y,
timeout, threshold);
if (!dir) {
@ -585,7 +585,7 @@ index c185422..7a97176 100644
/* key release of 0x02XXXXXX key */
if (ictx->kc == KEY_RESERVED && buf[0] == 0x02 && buf[3] == 0x00)
@@ -1408,22 +1444,10 @@ static int imon_parse_press_type(struct imon_context *ictx,
@@ -1408,22 +1444,10 @@ static int imon_parse_press_type(struct
buf[2] == 0x81 && buf[3] == 0xb7)
ictx->kc = ictx->last_keycode;
@ -611,7 +611,7 @@ index c185422..7a97176 100644
/* incoherent or irrelevant data */
} else if (ictx->kc == KEY_RESERVED)
@@ -1437,6 +1461,8 @@ static int imon_parse_press_type(struct imon_context *ictx,
@@ -1437,6 +1461,8 @@ static int imon_parse_press_type(struct
else
press_type = 1;
@ -620,7 +620,7 @@ index c185422..7a97176 100644
return press_type;
}
@@ -1449,41 +1475,45 @@ static void imon_incoming_packet(struct imon_context *ictx,
@@ -1449,41 +1475,45 @@ static void imon_incoming_packet(struct
int len = urb->actual_length;
unsigned char *buf = urb->transfer_buffer;
struct device *dev = ictx->dev;
@ -677,7 +677,7 @@ index c185422..7a97176 100644
/* keyboard/mouse mode toggle button */
if (kc == KEY_KEYBOARD && !ictx->release_code) {
ictx->last_keycode = kc;
@@ -1491,6 +1521,7 @@ static void imon_incoming_packet(struct imon_context *ictx,
@@ -1491,6 +1521,7 @@ static void imon_incoming_packet(struct
ictx->pad_mouse = ~(ictx->pad_mouse) & 0x1;
dev_dbg(dev, "toggling to %s mode\n",
ictx->pad_mouse ? "mouse" : "keyboard");
@ -685,7 +685,7 @@ index c185422..7a97176 100644
return;
} else {
ictx->pad_mouse = 0;
@@ -1499,11 +1530,13 @@ static void imon_incoming_packet(struct imon_context *ictx,
@@ -1499,11 +1530,13 @@ static void imon_incoming_packet(struct
}
ictx->kc = kc;
@ -699,7 +699,7 @@ index c185422..7a97176 100644
/* look for mouse events with pad in mouse mode */
} else if (ictx->pad_mouse) {
@@ -1531,36 +1564,56 @@ static void imon_incoming_packet(struct imon_context *ictx,
@@ -1531,36 +1564,56 @@ static void imon_incoming_packet(struct
if (press_type < 0)
goto not_input_data;
@ -769,7 +769,7 @@ index c185422..7a97176 100644
return;
not_input_data:
@@ -1651,31 +1704,205 @@ static void usb_rx_callback_intf1(struct urb *urb)
@@ -1651,31 +1704,205 @@ static void usb_rx_callback_intf1(struct
usb_submit_urb(ictx->rx_urb_intf1, GFP_ATOMIC);
}
@ -986,7 +986,7 @@ index c185422..7a97176 100644
idev->phys = ictx->phys_idev;
idev->evbit[0] = BIT_MASK(EV_KEY) | BIT_MASK(EV_REP) | BIT_MASK(EV_REL);
@@ -1691,30 +1918,20 @@ static struct input_dev *imon_init_idev(struct imon_context *ictx)
@@ -1691,30 +1918,20 @@ static struct input_dev *imon_init_idev(
__set_bit(kc, idev->keybit);
}
@ -1022,7 +1022,7 @@ index c185422..7a97176 100644
return NULL;
}
@@ -1736,7 +1953,7 @@ static struct input_dev *imon_init_touch(struct imon_context *ictx)
@@ -1736,7 +1953,7 @@ static struct input_dev *imon_init_touch
usb_make_path(ictx->usbdev_intf1, ictx->phys_touch,
sizeof(ictx->phys_touch));
@ -1031,7 +1031,7 @@ index c185422..7a97176 100644
touch->phys = ictx->phys_touch;
touch->evbit[0] =
@@ -1886,6 +2103,7 @@ static struct imon_context *imon_init_intf0(struct usb_interface *intf)
@@ -1886,6 +2103,7 @@ static struct imon_context *imon_init_in
}
mutex_init(&ictx->lock);
@ -1039,7 +1039,7 @@ index c185422..7a97176 100644
mutex_lock(&ictx->lock);
@@ -1911,6 +2129,12 @@ static struct imon_context *imon_init_intf0(struct usb_interface *intf)
@@ -1911,6 +2129,12 @@ static struct imon_context *imon_init_in
goto idev_setup_failed;
}
@ -1052,7 +1052,7 @@ index c185422..7a97176 100644
usb_fill_int_urb(ictx->rx_urb_intf0, ictx->usbdev_intf0,
usb_rcvintpipe(ictx->usbdev_intf0,
ictx->rx_endpoint_intf0->bEndpointAddress),
@@ -1928,7 +2152,9 @@ static struct imon_context *imon_init_intf0(struct usb_interface *intf)
@@ -1928,7 +2152,9 @@ static struct imon_context *imon_init_in
return ictx;
urb_submit_failed:
@ -1180,7 +1180,7 @@ index c185422..7a97176 100644
static void imon_init_display(struct imon_context *ictx,
struct usb_interface *intf)
{
@@ -2160,8 +2276,6 @@ static int __devinit imon_probe(struct usb_interface *interface,
@@ -2160,8 +2276,6 @@ static int __devinit imon_probe(struct u
struct imon_context *ictx = NULL;
struct imon_context *first_if_ctx = NULL;
u16 vendor, product;
@ -1189,7 +1189,7 @@ index c185422..7a97176 100644
code_length = BUF_CHUNK_SIZE * 8;
@@ -2202,19 +2316,6 @@ static int __devinit imon_probe(struct usb_interface *interface,
@@ -2202,19 +2316,6 @@ static int __devinit imon_probe(struct u
usb_set_intfdata(interface, ictx);
if (ifnum == 0) {
@ -1209,7 +1209,7 @@ index c185422..7a97176 100644
if (product == 0xffdc && ictx->rf_device) {
sysfs_err = sysfs_create_group(&interface->dev.kobj,
&imon_rf_attribute_group);
@@ -2289,7 +2390,8 @@ static void __devexit imon_disconnect(struct usb_interface *interface)
@@ -2289,7 +2390,8 @@ static void __devexit imon_disconnect(st
if (ifnum == 0) {
ictx->dev_present_intf0 = false;
usb_kill_urb(ictx->rx_urb_intf0);
@ -1219,7 +1219,7 @@ index c185422..7a97176 100644
if (ictx->display_supported) {
if (ictx->display_type == IMON_DISPLAY_TYPE_LCD)
usb_deregister_dev(interface, &imon_lcd_class);
@@ -2309,11 +2411,8 @@ static void __devexit imon_disconnect(struct usb_interface *interface)
@@ -2309,11 +2411,8 @@ static void __devexit imon_disconnect(st
mutex_unlock(&ictx->lock);
if (!ictx->display_isopen)
free_imon_context(ictx);
@ -1232,11 +1232,11 @@ index c185422..7a97176 100644
mutex_unlock(&driver_lock);
diff --git a/drivers/media/IR/ir-keytable.c b/drivers/media/IR/ir-keytable.c
index 7961d59..59510cd 100644
--- a/drivers/media/IR/ir-keytable.c
+++ b/drivers/media/IR/ir-keytable.c
@@ -285,7 +285,7 @@ EXPORT_SYMBOL_GPL(ir_g_keycode_from_table);
Index: linux-2.6.35.x86_64/drivers/media/IR/ir-keytable.c
===================================================================
--- linux-2.6.35.x86_64.orig/drivers/media/IR/ir-keytable.c
+++ linux-2.6.35.x86_64/drivers/media/IR/ir-keytable.c
@@ -285,7 +285,7 @@ EXPORT_SYMBOL_GPL(ir_g_keycode_from_tabl
* This routine is used to signal that a key has been released on the
* remote control. It reports a keyup input event via input_report_key().
*/
@ -1245,7 +1245,7 @@ index 7961d59..59510cd 100644
{
if (!ir->keypressed)
return;
@@ -295,6 +295,7 @@ static void ir_keyup(struct ir_input_dev *ir)
@@ -295,6 +295,7 @@ static void ir_keyup(struct ir_input_dev
input_sync(ir->input_dev);
ir->keypressed = false;
}
@ -1253,21 +1253,10 @@ index 7961d59..59510cd 100644
/**
* ir_timer_keyup() - generates a keyup event after a timeout
@@ -319,7 +319,7 @@ static void ir_timer_keyup(unsigned long cookie)
* a keyup event might follow immediately after the keydown.
*/
spin_lock_irqsave(&ir->keylock, flags);
- if (time_is_after_eq_jiffies(ir->keyup_jiffies))
+ if (time_is_before_eq_jiffies(ir->keyup_jiffies))
ir_keyup(ir);
spin_unlock_irqrestore(&ir->keylock, flags);
}
diff --git a/drivers/media/IR/nuvoton-cir.c b/drivers/media/IR/nuvoton-cir.c
new file mode 100644
index 0000000..fdb280e
Index: linux-2.6.35.x86_64/drivers/media/IR/nuvoton-cir.c
===================================================================
--- /dev/null
+++ b/drivers/media/IR/nuvoton-cir.c
+++ linux-2.6.35.x86_64/drivers/media/IR/nuvoton-cir.c
@@ -0,0 +1,1237 @@
+/*
+ * Driver for Nuvoton Technology Corporation w83667hg/w83677hg-i CIR
@ -2506,11 +2495,10 @@ index 0000000..fdb280e
+
+module_init(nvt_init);
+module_exit(nvt_exit);
diff --git a/drivers/media/IR/nuvoton-cir.h b/drivers/media/IR/nuvoton-cir.h
new file mode 100644
index 0000000..12bfe89
Index: linux-2.6.35.x86_64/drivers/media/IR/nuvoton-cir.h
===================================================================
--- /dev/null
+++ b/drivers/media/IR/nuvoton-cir.h
+++ linux-2.6.35.x86_64/drivers/media/IR/nuvoton-cir.h
@@ -0,0 +1,408 @@
+/*
+ * Driver for Nuvoton Technology Corporation w83667hg/w83677hg-i CIR
@ -2920,11 +2908,11 @@ index 0000000..12bfe89
+/* as VISTA MCE definition, valid carrier value */
+#define MAX_CARRIER 60000
+#define MIN_CARRIER 30000
diff --git a/include/media/ir-core.h b/include/media/ir-core.h
index eb7fddf..4dd43d4 100644
--- a/include/media/ir-core.h
+++ b/include/media/ir-core.h
@@ -157,6 +157,7 @@ void ir_input_unregister(struct input_dev *input_dev);
Index: linux-2.6.35.x86_64/include/media/ir-core.h
===================================================================
--- linux-2.6.35.x86_64.orig/include/media/ir-core.h
+++ linux-2.6.35.x86_64/include/media/ir-core.h
@@ -157,6 +157,7 @@ void ir_input_unregister(struct input_de
void ir_repeat(struct input_dev *dev);
void ir_keydown(struct input_dev *dev, int scancode, u8 toggle);
@ -2932,38 +2920,37 @@ index eb7fddf..4dd43d4 100644
u32 ir_g_keycode_from_table(struct input_dev *input_dev, u32 scancode);
/* From ir-raw-event.c */
diff --git a/drivers/media/IR/keymaps/rc-rc6-mce.c b/drivers/media/IR/keymaps/rc-rc6-mce.c
index 64264f7..39557ad 100644
--- a/drivers/media/IR/keymaps/rc-rc6-mce.c
+++ b/drivers/media/IR/keymaps/rc-rc6-mce.c
Index: linux-2.6.35.x86_64/drivers/media/IR/keymaps/rc-rc6-mce.c
===================================================================
--- linux-2.6.35.x86_64.orig/drivers/media/IR/keymaps/rc-rc6-mce.c
+++ linux-2.6.35.x86_64/drivers/media/IR/keymaps/rc-rc6-mce.c
@@ -19,6 +19,7 @@ static struct ir_scancode rc6_mce[] = {
{ 0x800f0416, KEY_PLAY },
{ 0x800f0418, KEY_PAUSE },
{ 0x800f0416, KEY_PLAY },
{ 0x800f0418, KEY_PAUSE },
+ { 0x800f046e, KEY_PLAYPAUSE },
{ 0x800f0419, KEY_STOP },
{ 0x800f0417, KEY_RECORD },
{ 0x800f0419, KEY_STOP },
{ 0x800f0417, KEY_RECORD },
@@ -37,6 +38,8 @@ static struct ir_scancode rc6_mce[] = {
{ 0x800f0411, KEY_VOLUMEDOWN },
{ 0x800f0412, KEY_CHANNELUP },
{ 0x800f0413, KEY_CHANNELDOWN },
{ 0x800f0411, KEY_VOLUMEDOWN },
{ 0x800f0412, KEY_CHANNELUP },
{ 0x800f0413, KEY_CHANNELDOWN },
+ { 0x800f043a, KEY_BRIGHTNESSUP },
+ { 0x800f0480, KEY_BRIGHTNESSDOWN },
{ 0x800f0401, KEY_NUMERIC_1 },
{ 0x800f0402, KEY_NUMERIC_2 },
diff --git a/drivers/media/IR/ir-lirc-codec.c b/drivers/media/IR/ir-lirc-codec.c
index 77b5946..e63f757 100644
--- a/drivers/media/IR/ir-lirc-codec.c
+++ b/drivers/media/IR/ir-lirc-codec.c
@@ -267,7 +267,7 @@ static int ir_lirc_register(struct input_dev *input_dev)
features |= LIRC_CAN_SET_SEND_CARRIER;
{ 0x800f0401, KEY_NUMERIC_1 },
{ 0x800f0402, KEY_NUMERIC_2 },
Index: linux-2.6.35.x86_64/drivers/media/IR/ir-lirc-codec.c
===================================================================
--- linux-2.6.35.x86_64.orig/drivers/media/IR/ir-lirc-codec.c
+++ linux-2.6.35.x86_64/drivers/media/IR/ir-lirc-codec.c
@@ -267,7 +267,7 @@ static int ir_lirc_register(struct input
features |= LIRC_CAN_SET_SEND_CARRIER;
if (ir_dev->props->s_tx_duty_cycle)
if (ir_dev->props->s_tx_duty_cycle)
- features |= LIRC_CAN_SET_REC_DUTY_CYCLE;
+ features |= LIRC_CAN_SET_SEND_DUTY_CYCLE;
}
}
if (ir_dev->props->s_rx_carrier_range)
if (ir_dev->props->s_rx_carrier_range)

File diff suppressed because it is too large Load Diff

View File

@ -1,120 +0,0 @@
From sgruszka@redhat.com Mon Oct 18 05:10:00 2010
Return-Path: sgruszka@redhat.com
Received: from zmta01.collab.prod.int.phx2.redhat.com (LHLO
zmta01.collab.prod.int.phx2.redhat.com) (10.5.5.31) by
mail03.corp.redhat.com with LMTP; Mon, 18 Oct 2010 05:10:00 -0400 (EDT)
Received: from localhost (localhost.localdomain [127.0.0.1])
by zmta01.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id 5E48E928A4;
Mon, 18 Oct 2010 05:10:00 -0400 (EDT)
Received: from zmta01.collab.prod.int.phx2.redhat.com ([127.0.0.1])
by localhost (zmta01.collab.prod.int.phx2.redhat.com [127.0.0.1]) (amavisd-new, port 10024)
with ESMTP id q3QJQ+TOP+bt; Mon, 18 Oct 2010 05:10:00 -0400 (EDT)
Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23])
by zmta01.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id 423CC91A7C;
Mon, 18 Oct 2010 05:10:00 -0400 (EDT)
Received: from localhost (dhcp-1-246.brq.redhat.com [10.34.1.246])
by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id o9I99x6b006228;
Mon, 18 Oct 2010 05:09:59 -0400
From: Stanislaw Gruszka <sgruszka@redhat.com>
To: stable@kernel.org
Cc: Kyle McMartin <kmcmartin@redhat.com>,
Stanislaw Gruszka <sgruszka@redhat.com>,
"David S. Miller" <davem@davemloft.net>
Subject: [PATCH -stable 2.6.34+] r8169: allocate with GFP_KERNEL flag when able to sleep
Date: Mon, 18 Oct 2010 11:12:22 +0200
Message-Id: <1287393142-2566-1-git-send-email-sgruszka@redhat.com>
X-Scanned-By: MIMEDefang 2.68 on 10.5.11.23
Upstream aeb19f6052b5e5c8a24aa444fbff73b84341beac commit.
We have fedora bug report where driver fail to initialize after
suspend/resume because of memory allocation errors:
https://bugzilla.redhat.com/show_bug.cgi?id=629158
To fix use GFP_KERNEL allocation where possible.
Patch should fix any allocation errors with calltrace like that:
NetworkManager: page allocation failure. order:3, mode:0x4020
Pid: 1427, comm: NetworkManager Not tainted 2.6.31.12-rhapsody.fc12-121 #1
Call Trace:
[<ffffffff810c876f>] __alloc_pages_nodemask+0x57a/0x5bb
[<ffffffff810f415d>] alloc_pages_node+0x48/0x4a
[<ffffffff810f4189>] kmalloc_large_node+0x2a/0x67
[<ffffffff810f5f1c>] __kmalloc_node_track_caller+0x31/0x11b
[<ffffffff8136f4fe>] ? __netdev_alloc_skb+0x34/0x50
[<ffffffff8136e8b8>] __alloc_skb+0x80/0x170
[<ffffffff8136f4fe>] __netdev_alloc_skb+0x34/0x50
[<ffffffffa011c5e0>] rtl8169_rx_fill+0xa8/0x154 [r8169]
[<ffffffffa011e5c5>] rtl8169_init_ring+0x71/0x9f [r8169]
[<ffffffffa011edbe>] rtl8169_open+0x7f/0x199 [r8169]
Tested-by: Neal Becker <ndbecker2@gmail.com>
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Acked-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
---
drivers/net/r8169.c | 12 ++++++------
1 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/drivers/net/r8169.c b/drivers/net/r8169.c
index a0da4a1..a68ec8f 100644
--- a/drivers/net/r8169.c
+++ b/drivers/net/r8169.c
@@ -4000,7 +4000,7 @@ static inline void rtl8169_map_to_asic(struct RxDesc *desc, dma_addr_t mapping,
static struct sk_buff *rtl8169_alloc_rx_skb(struct pci_dev *pdev,
struct net_device *dev,
struct RxDesc *desc, int rx_buf_sz,
- unsigned int align)
+ unsigned int align, gfp_t gfp)
{
struct sk_buff *skb;
dma_addr_t mapping;
@@ -4008,7 +4008,7 @@ static struct sk_buff *rtl8169_alloc_rx_skb(struct pci_dev *pdev,
pad = align ? align : NET_IP_ALIGN;
- skb = netdev_alloc_skb(dev, rx_buf_sz + pad);
+ skb = __netdev_alloc_skb(dev, rx_buf_sz + pad, gfp);
if (!skb)
goto err_out;
@@ -4039,7 +4039,7 @@ static void rtl8169_rx_clear(struct rtl8169_private *tp)
}
static u32 rtl8169_rx_fill(struct rtl8169_private *tp, struct net_device *dev,
- u32 start, u32 end)
+ u32 start, u32 end, gfp_t gfp)
{
u32 cur;
@@ -4054,7 +4054,7 @@ static u32 rtl8169_rx_fill(struct rtl8169_private *tp, struct net_device *dev,
skb = rtl8169_alloc_rx_skb(tp->pci_dev, dev,
tp->RxDescArray + i,
- tp->rx_buf_sz, tp->align);
+ tp->rx_buf_sz, tp->align, gfp);
if (!skb)
break;
@@ -4082,7 +4082,7 @@ static int rtl8169_init_ring(struct net_device *dev)
memset(tp->tx_skb, 0x0, NUM_TX_DESC * sizeof(struct ring_info));
memset(tp->Rx_skbuff, 0x0, NUM_RX_DESC * sizeof(struct sk_buff *));
- if (rtl8169_rx_fill(tp, dev, 0, NUM_RX_DESC) != NUM_RX_DESC)
+ if (rtl8169_rx_fill(tp, dev, 0, NUM_RX_DESC, GFP_KERNEL) != NUM_RX_DESC)
goto err_out;
rtl8169_mark_as_last_descriptor(tp->RxDescArray + NUM_RX_DESC - 1);
@@ -4583,7 +4583,7 @@ static int rtl8169_rx_interrupt(struct net_device *dev,
count = cur_rx - tp->cur_rx;
tp->cur_rx = cur_rx;
- delta = rtl8169_rx_fill(tp, dev, tp->dirty_rx, tp->cur_rx);
+ delta = rtl8169_rx_fill(tp, dev, tp->dirty_rx, tp->cur_rx, GFP_ATOMIC);
if (!delta && count)
netif_info(tp, intr, dev, "no Rx buffer allocated\n");
tp->dirty_rx += delta;
--
1.7.1

View File

@ -1,42 +0,0 @@
From: Roland McGrath <roland@redhat.com>
Date: Wed, 8 Sep 2010 02:35:49 +0000 (-0700)
Subject: setup_arg_pages: diagnose excessive argument size
X-Git-Tag: v2.6.36-rc4~14
X-Git-Url: http://git.kernel.org/?p=linux%2Fkernel%2Fgit%2Ftorvalds%2Flinux-2.6.git;a=commitdiff_plain;h=1b528181b2ffa14721fb28ad1bd539fe1732c583
setup_arg_pages: diagnose excessive argument size
The CONFIG_STACK_GROWSDOWN variant of setup_arg_pages() does not
check the size of the argument/environment area on the stack.
When it is unworkably large, shift_arg_pages() hits its BUG_ON.
This is exploitable with a very large RLIMIT_STACK limit, to
create a crash pretty easily.
Check that the initial stack is not too large to make it possible
to map in any executable. We're not checking that the actual
executable (or intepreter, for binfmt_elf) will fit. So those
mappings might clobber part of the initial stack mapping. But
that is just userland lossage that userland made happen, not a
kernel problem.
Signed-off-by: Roland McGrath <roland@redhat.com>
Reviewed-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
---
diff --git a/fs/exec.c b/fs/exec.c
index 2d94552..1b63237 100644
--- a/fs/exec.c
+++ b/fs/exec.c
@@ -594,6 +594,11 @@ int setup_arg_pages(struct linux_binprm *bprm,
#else
stack_top = arch_align_stack(stack_top);
stack_top = PAGE_ALIGN(stack_top);
+
+ if (unlikely(stack_top < mmap_min_addr) ||
+ unlikely(vma->vm_end - vma->vm_start >= stack_top - mmap_min_addr))
+ return -ENOMEM;
+
stack_shift = vma->vm_end - stack_top;
bprm->p -= stack_shift;

View File

@ -1,98 +0,0 @@
From sgruszka@redhat.com Mon Oct 18 05:19:21 2010
Return-Path: sgruszka@redhat.com
Received: from zmta02.collab.prod.int.phx2.redhat.com (LHLO
zmta02.collab.prod.int.phx2.redhat.com) (10.5.5.32) by
mail03.corp.redhat.com with LMTP; Mon, 18 Oct 2010 05:19:21 -0400 (EDT)
Received: from localhost (localhost.localdomain [127.0.0.1])
by zmta02.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id A11F69E559;
Mon, 18 Oct 2010 05:19:21 -0400 (EDT)
Received: from zmta02.collab.prod.int.phx2.redhat.com ([127.0.0.1])
by localhost (zmta02.collab.prod.int.phx2.redhat.com [127.0.0.1]) (amavisd-new, port 10024)
with ESMTP id IhyIgD7E4aj3; Mon, 18 Oct 2010 05:19:21 -0400 (EDT)
Received: from int-mx08.intmail.prod.int.phx2.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.21])
by zmta02.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id 9007B9E55E;
Mon, 18 Oct 2010 05:19:21 -0400 (EDT)
Received: from localhost (dhcp-1-246.brq.redhat.com [10.34.1.246])
by int-mx08.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o9I9JKsF025385;
Mon, 18 Oct 2010 05:19:21 -0400
From: Stanislaw Gruszka <sgruszka@redhat.com>
To: stable@kernel.org
Cc: Kyle McMartin <kmcmartin@redhat.com>,
Stanislaw Gruszka <sgruszka@redhat.com>,
"David S. Miller" <davem@davemloft.net>
Subject: [PATCH -stable 2.6.34+] skge: add quirk to limit DMA
Date: Mon, 18 Oct 2010 11:21:54 +0200
Message-Id: <1287393714-3720-1-git-send-email-sgruszka@redhat.com>
X-Scanned-By: MIMEDefang 2.67 on 10.5.11.21
Upstream 392bd0cb000d4aac9e88e4f50823db85e7220688 commit.
Skge devices installed on some Gigabyte motherboards are not able to
perform 64 dma correctly due to board PCI implementation, so limit
DMA to 32bit if such boards are detected.
Bug was reported here:
https://bugzilla.redhat.com/show_bug.cgi?id=447489
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Tested-by: Luya Tshimbalanga <luya@fedoraproject.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
---
drivers/net/skge.c | 18 +++++++++++++++++-
1 files changed, 17 insertions(+), 1 deletions(-)
diff --git a/drivers/net/skge.c b/drivers/net/skge.c
index 40e5c46..465ae7e 100644
--- a/drivers/net/skge.c
+++ b/drivers/net/skge.c
@@ -43,6 +43,7 @@
#include <linux/seq_file.h>
#include <linux/mii.h>
#include <linux/slab.h>
+#include <linux/dmi.h>
#include <asm/irq.h>
#include "skge.h"
@@ -3868,6 +3869,8 @@ static void __devinit skge_show_addr(struct net_device *dev)
netif_info(skge, probe, skge->netdev, "addr %pM\n", dev->dev_addr);
}
+static int only_32bit_dma;
+
static int __devinit skge_probe(struct pci_dev *pdev,
const struct pci_device_id *ent)
{
@@ -3889,7 +3892,7 @@ static int __devinit skge_probe(struct pci_dev *pdev,
pci_set_master(pdev);
- if (!pci_set_dma_mask(pdev, DMA_BIT_MASK(64))) {
+ if (!only_32bit_dma && !pci_set_dma_mask(pdev, DMA_BIT_MASK(64))) {
using_dac = 1;
err = pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(64));
} else if (!(err = pci_set_dma_mask(pdev, DMA_BIT_MASK(32)))) {
@@ -4147,8 +4150,21 @@ static struct pci_driver skge_driver = {
.shutdown = skge_shutdown,
};
+static struct dmi_system_id skge_32bit_dma_boards[] = {
+ {
+ .ident = "Gigabyte nForce boards",
+ .matches = {
+ DMI_MATCH(DMI_BOARD_VENDOR, "Gigabyte Technology Co"),
+ DMI_MATCH(DMI_BOARD_NAME, "nForce"),
+ },
+ },
+ {}
+};
+
static int __init skge_init_module(void)
{
+ if (dmi_check_system(skge_32bit_dma_boards))
+ only_32bit_dma = 1;
skge_debug_init();
return pci_register_driver(&skge_driver);
}
--
1.7.1

View File

@ -1,2 +1,2 @@
091abeb4684ce03d1d936851618687b6 linux-2.6.35.tar.bz2
0dbd6ebf242a1428d4161bc32b1306fa patch-2.6.35.6.bz2
198e4e72ea9cc7f9f25bb5881167aa2e patch-2.6.35.8.bz2

View File

@ -1,13 +0,0 @@
Fix typo in Xen patch from 2.6.35.5
--- linux-2.6.35.noarch.orig/drivers/xen/events.c
+++ linux-2.6.35.noarch/drivers/xen/events.c
@@ -935,7 +935,7 @@ static struct irq_chip xen_dynamic_chip
.retrigger = retrigger_dynirq,
};
-static struct irq_chip en_percpu_chip __read_mostly = {
+static struct irq_chip xen_percpu_chip __read_mostly = {
.name = "xen-percpu",
.disable = disable_dynirq,