diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2009-01-29 21:14:20 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-01-29 21:14:20 -0500 |
commit | ca493d171b66e96f542501b7eb572bc8380f690d (patch) | |
tree | 2ff1b212f0f515cfb7afa1467d4315f436bc9b88 /drivers | |
parent | 5488ace40be22d3f23f58190ae48b2c8d4691f2b (diff) | |
parent | dcbbcefb6a6d540b605421e85fbaa4cea3fef5a2 (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging-2.6:
Staging: poch: fix verification of memory area
Staging: usbip: usbip_start_threads(): handle kernel_thread failure
staging: agnx: drivers/staging/agnx/agnx.h needs <linux/io.h>
Staging: android: task_get_unused_fd_flags: fix the wrong usage of tsk->signal
Staging: android: Add lowmemorykiller documentation.
Staging: android: fix build error on 64bit boxes
Staging: android: timed_gpio: Fix build to build on kernels after 2.6.25.
Staging: android: binder: fix arm build errors
Staging: meilhaus: fix Kbuild
Staging: comedi: fix Kbuild
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/staging/agnx/agnx.h | 2 | ||||
-rw-r--r-- | drivers/staging/android/binder.c | 16 | ||||
-rw-r--r-- | drivers/staging/android/lowmemorykiller.txt | 16 | ||||
-rw-r--r-- | drivers/staging/android/timed_gpio.c | 5 | ||||
-rw-r--r-- | drivers/staging/comedi/Kconfig | 1 | ||||
-rw-r--r-- | drivers/staging/meilhaus/Kconfig | 21 | ||||
-rw-r--r-- | drivers/staging/poch/poch.c | 2 | ||||
-rw-r--r-- | drivers/staging/usbip/usbip_common.c | 16 |
8 files changed, 56 insertions, 23 deletions
diff --git a/drivers/staging/agnx/agnx.h b/drivers/staging/agnx/agnx.h index a75b0db3726c..20f36da62475 100644 --- a/drivers/staging/agnx/agnx.h +++ b/drivers/staging/agnx/agnx.h | |||
@@ -1,6 +1,8 @@ | |||
1 | #ifndef AGNX_H_ | 1 | #ifndef AGNX_H_ |
2 | #define AGNX_H_ | 2 | #define AGNX_H_ |
3 | 3 | ||
4 | #include <linux/io.h> | ||
5 | |||
4 | #include "xmit.h" | 6 | #include "xmit.h" |
5 | 7 | ||
6 | #define PFX KBUILD_MODNAME ": " | 8 | #define PFX KBUILD_MODNAME ": " |
diff --git a/drivers/staging/android/binder.c b/drivers/staging/android/binder.c index 6a4ceacb33f5..758131cad08a 100644 --- a/drivers/staging/android/binder.c +++ b/drivers/staging/android/binder.c | |||
@@ -319,6 +319,7 @@ int task_get_unused_fd_flags(struct task_struct *tsk, int flags) | |||
319 | int fd, error; | 319 | int fd, error; |
320 | struct fdtable *fdt; | 320 | struct fdtable *fdt; |
321 | unsigned long rlim_cur; | 321 | unsigned long rlim_cur; |
322 | unsigned long irqs; | ||
322 | 323 | ||
323 | if (files == NULL) | 324 | if (files == NULL) |
324 | return -ESRCH; | 325 | return -ESRCH; |
@@ -335,12 +336,11 @@ repeat: | |||
335 | * N.B. For clone tasks sharing a files structure, this test | 336 | * N.B. For clone tasks sharing a files structure, this test |
336 | * will limit the total number of files that can be opened. | 337 | * will limit the total number of files that can be opened. |
337 | */ | 338 | */ |
338 | rcu_read_lock(); | 339 | rlim_cur = 0; |
339 | if (tsk->signal) | 340 | if (lock_task_sighand(tsk, &irqs)) { |
340 | rlim_cur = tsk->signal->rlim[RLIMIT_NOFILE].rlim_cur; | 341 | rlim_cur = tsk->signal->rlim[RLIMIT_NOFILE].rlim_cur; |
341 | else | 342 | unlock_task_sighand(tsk, &irqs); |
342 | rlim_cur = 0; | 343 | } |
343 | rcu_read_unlock(); | ||
344 | if (fd >= rlim_cur) | 344 | if (fd >= rlim_cur) |
345 | goto out; | 345 | goto out; |
346 | 346 | ||
@@ -2649,14 +2649,14 @@ static void binder_vma_open(struct vm_area_struct *vma) | |||
2649 | { | 2649 | { |
2650 | struct binder_proc *proc = vma->vm_private_data; | 2650 | struct binder_proc *proc = vma->vm_private_data; |
2651 | if (binder_debug_mask & BINDER_DEBUG_OPEN_CLOSE) | 2651 | if (binder_debug_mask & BINDER_DEBUG_OPEN_CLOSE) |
2652 | printk(KERN_INFO "binder: %d open vm area %lx-%lx (%ld K) vma %lx pagep %lx\n", proc->pid, vma->vm_start, vma->vm_end, (vma->vm_end - vma->vm_start) / SZ_1K, vma->vm_flags, vma->vm_page_prot.pgprot); | 2652 | printk(KERN_INFO "binder: %d open vm area %lx-%lx (%ld K) vma %lx pagep %lx\n", proc->pid, vma->vm_start, vma->vm_end, (vma->vm_end - vma->vm_start) / SZ_1K, vma->vm_flags, pgprot_val(vma->vm_page_prot)); |
2653 | dump_stack(); | 2653 | dump_stack(); |
2654 | } | 2654 | } |
2655 | static void binder_vma_close(struct vm_area_struct *vma) | 2655 | static void binder_vma_close(struct vm_area_struct *vma) |
2656 | { | 2656 | { |
2657 | struct binder_proc *proc = vma->vm_private_data; | 2657 | struct binder_proc *proc = vma->vm_private_data; |
2658 | if (binder_debug_mask & BINDER_DEBUG_OPEN_CLOSE) | 2658 | if (binder_debug_mask & BINDER_DEBUG_OPEN_CLOSE) |
2659 | printk(KERN_INFO "binder: %d close vm area %lx-%lx (%ld K) vma %lx pagep %lx\n", proc->pid, vma->vm_start, vma->vm_end, (vma->vm_end - vma->vm_start) / SZ_1K, vma->vm_flags, vma->vm_page_prot.pgprot); | 2659 | printk(KERN_INFO "binder: %d close vm area %lx-%lx (%ld K) vma %lx pagep %lx\n", proc->pid, vma->vm_start, vma->vm_end, (vma->vm_end - vma->vm_start) / SZ_1K, vma->vm_flags, pgprot_val(vma->vm_page_prot)); |
2660 | proc->vma = NULL; | 2660 | proc->vma = NULL; |
2661 | } | 2661 | } |
2662 | 2662 | ||
@@ -2677,7 +2677,7 @@ static int binder_mmap(struct file *filp, struct vm_area_struct *vma) | |||
2677 | vma->vm_end = vma->vm_start + SZ_4M; | 2677 | vma->vm_end = vma->vm_start + SZ_4M; |
2678 | 2678 | ||
2679 | if (binder_debug_mask & BINDER_DEBUG_OPEN_CLOSE) | 2679 | if (binder_debug_mask & BINDER_DEBUG_OPEN_CLOSE) |
2680 | printk(KERN_INFO "binder_mmap: %d %lx-%lx (%ld K) vma %lx pagep %lx\n", proc->pid, vma->vm_start, vma->vm_end, (vma->vm_end - vma->vm_start) / SZ_1K, vma->vm_flags, vma->vm_page_prot.pgprot); | 2680 | printk(KERN_INFO "binder_mmap: %d %lx-%lx (%ld K) vma %lx pagep %lx\n", proc->pid, vma->vm_start, vma->vm_end, (vma->vm_end - vma->vm_start) / SZ_1K, vma->vm_flags, pgprot_val(vma->vm_page_prot)); |
2681 | 2681 | ||
2682 | if (vma->vm_flags & FORBIDDEN_MMAP_FLAGS) { | 2682 | if (vma->vm_flags & FORBIDDEN_MMAP_FLAGS) { |
2683 | ret = -EPERM; | 2683 | ret = -EPERM; |
diff --git a/drivers/staging/android/lowmemorykiller.txt b/drivers/staging/android/lowmemorykiller.txt new file mode 100644 index 000000000000..bd5c0c028968 --- /dev/null +++ b/drivers/staging/android/lowmemorykiller.txt | |||
@@ -0,0 +1,16 @@ | |||
1 | The lowmemorykiller driver lets user-space specify a set of memory thresholds | ||
2 | where processes with a range of oom_adj values will get killed. Specify the | ||
3 | minimum oom_adj values in /sys/module/lowmemorykiller/parameters/adj and the | ||
4 | number of free pages in /sys/module/lowmemorykiller/parameters/minfree. Both | ||
5 | files take a comma separated list of numbers in ascending order. | ||
6 | |||
7 | For example, write "0,8" to /sys/module/lowmemorykiller/parameters/adj and | ||
8 | "1024,4096" to /sys/module/lowmemorykiller/parameters/minfree to kill processes | ||
9 | with a oom_adj value of 8 or higher when the free memory drops below 4096 pages | ||
10 | and kill processes with a oom_adj value of 0 or higher when the free memory | ||
11 | drops below 1024 pages. | ||
12 | |||
13 | The driver considers memory used for caches to be free, but if a large | ||
14 | percentage of the cached memory is locked this can be very inaccurate | ||
15 | and processes may not get killed until the normal oom killer is triggered. | ||
16 | |||
diff --git a/drivers/staging/android/timed_gpio.c b/drivers/staging/android/timed_gpio.c index bea68c9fc942..903270cbbe02 100644 --- a/drivers/staging/android/timed_gpio.c +++ b/drivers/staging/android/timed_gpio.c | |||
@@ -18,7 +18,7 @@ | |||
18 | #include <linux/platform_device.h> | 18 | #include <linux/platform_device.h> |
19 | #include <linux/hrtimer.h> | 19 | #include <linux/hrtimer.h> |
20 | #include <linux/err.h> | 20 | #include <linux/err.h> |
21 | #include <asm/arch/gpio.h> | 21 | #include <linux/gpio.h> |
22 | 22 | ||
23 | #include "timed_gpio.h" | 23 | #include "timed_gpio.h" |
24 | 24 | ||
@@ -49,7 +49,8 @@ static ssize_t gpio_enable_show(struct device *dev, struct device_attribute *att | |||
49 | 49 | ||
50 | if (hrtimer_active(&gpio_data->timer)) { | 50 | if (hrtimer_active(&gpio_data->timer)) { |
51 | ktime_t r = hrtimer_get_remaining(&gpio_data->timer); | 51 | ktime_t r = hrtimer_get_remaining(&gpio_data->timer); |
52 | remaining = r.tv.sec * 1000 + r.tv.nsec / 1000000; | 52 | struct timeval t = ktime_to_timeval(r); |
53 | remaining = t.tv_sec * 1000 + t.tv_usec; | ||
53 | } else | 54 | } else |
54 | remaining = 0; | 55 | remaining = 0; |
55 | 56 | ||
diff --git a/drivers/staging/comedi/Kconfig b/drivers/staging/comedi/Kconfig index b501bfb9c754..b47ca1e7e383 100644 --- a/drivers/staging/comedi/Kconfig +++ b/drivers/staging/comedi/Kconfig | |||
@@ -1,6 +1,7 @@ | |||
1 | config COMEDI | 1 | config COMEDI |
2 | tristate "Data Acquision support (comedi)" | 2 | tristate "Data Acquision support (comedi)" |
3 | default N | 3 | default N |
4 | depends on m | ||
4 | ---help--- | 5 | ---help--- |
5 | Enable support a wide range of data acquision devices | 6 | Enable support a wide range of data acquision devices |
6 | for Linux. | 7 | for Linux. |
diff --git a/drivers/staging/meilhaus/Kconfig b/drivers/staging/meilhaus/Kconfig index 6def83fa2c96..923af22a4686 100644 --- a/drivers/staging/meilhaus/Kconfig +++ b/drivers/staging/meilhaus/Kconfig | |||
@@ -4,6 +4,7 @@ | |||
4 | 4 | ||
5 | menuconfig MEILHAUS | 5 | menuconfig MEILHAUS |
6 | tristate "Meilhaus support" | 6 | tristate "Meilhaus support" |
7 | depends on m | ||
7 | ---help--- | 8 | ---help--- |
8 | If you have a Meilhaus card, say Y (or M) here. | 9 | If you have a Meilhaus card, say Y (or M) here. |
9 | 10 | ||
@@ -18,7 +19,7 @@ if MEILHAUS | |||
18 | config ME0600 | 19 | config ME0600 |
19 | tristate "Meilhaus ME-600 support" | 20 | tristate "Meilhaus ME-600 support" |
20 | default n | 21 | default n |
21 | depends on PCI | 22 | depends on PCI && m |
22 | help | 23 | help |
23 | This driver supports the Meilhaus ME-600 family of boards | 24 | This driver supports the Meilhaus ME-600 family of boards |
24 | that do data collection and multipurpose I/O. | 25 | that do data collection and multipurpose I/O. |
@@ -29,7 +30,7 @@ config ME0600 | |||
29 | config ME0900 | 30 | config ME0900 |
30 | tristate "Meilhaus ME-900 support" | 31 | tristate "Meilhaus ME-900 support" |
31 | default n | 32 | default n |
32 | depends on PCI | 33 | depends on PCI && m |
33 | help | 34 | help |
34 | This driver supports the Meilhaus ME-900 family of boards | 35 | This driver supports the Meilhaus ME-900 family of boards |
35 | that do data collection and multipurpose I/O. | 36 | that do data collection and multipurpose I/O. |
@@ -40,7 +41,7 @@ config ME0900 | |||
40 | config ME1000 | 41 | config ME1000 |
41 | tristate "Meilhaus ME-1000 support" | 42 | tristate "Meilhaus ME-1000 support" |
42 | default n | 43 | default n |
43 | depends on PCI | 44 | depends on PCI && m |
44 | help | 45 | help |
45 | This driver supports the Meilhaus ME-1000 family of boards | 46 | This driver supports the Meilhaus ME-1000 family of boards |
46 | that do data collection and multipurpose I/O. | 47 | that do data collection and multipurpose I/O. |
@@ -51,7 +52,7 @@ config ME1000 | |||
51 | config ME1400 | 52 | config ME1400 |
52 | tristate "Meilhaus ME-1400 support" | 53 | tristate "Meilhaus ME-1400 support" |
53 | default n | 54 | default n |
54 | depends on PCI | 55 | depends on PCI && m |
55 | help | 56 | help |
56 | This driver supports the Meilhaus ME-1400 family of boards | 57 | This driver supports the Meilhaus ME-1400 family of boards |
57 | that do data collection and multipurpose I/O. | 58 | that do data collection and multipurpose I/O. |
@@ -62,7 +63,7 @@ config ME1400 | |||
62 | config ME1600 | 63 | config ME1600 |
63 | tristate "Meilhaus ME-1600 support" | 64 | tristate "Meilhaus ME-1600 support" |
64 | default n | 65 | default n |
65 | depends on PCI | 66 | depends on PCI && m |
66 | help | 67 | help |
67 | This driver supports the Meilhaus ME-1600 family of boards | 68 | This driver supports the Meilhaus ME-1600 family of boards |
68 | that do data collection and multipurpose I/O. | 69 | that do data collection and multipurpose I/O. |
@@ -73,7 +74,7 @@ config ME1600 | |||
73 | config ME4600 | 74 | config ME4600 |
74 | tristate "Meilhaus ME-4600 support" | 75 | tristate "Meilhaus ME-4600 support" |
75 | default n | 76 | default n |
76 | depends on PCI | 77 | depends on PCI && m |
77 | help | 78 | help |
78 | This driver supports the Meilhaus ME-4600 family of boards | 79 | This driver supports the Meilhaus ME-4600 family of boards |
79 | that do data collection and multipurpose I/O. | 80 | that do data collection and multipurpose I/O. |
@@ -84,7 +85,7 @@ config ME4600 | |||
84 | config ME6000 | 85 | config ME6000 |
85 | tristate "Meilhaus ME-6000 support" | 86 | tristate "Meilhaus ME-6000 support" |
86 | default n | 87 | default n |
87 | depends on PCI | 88 | depends on PCI && m |
88 | help | 89 | help |
89 | This driver supports the Meilhaus ME-6000 family of boards | 90 | This driver supports the Meilhaus ME-6000 family of boards |
90 | that do data collection and multipurpose I/O. | 91 | that do data collection and multipurpose I/O. |
@@ -95,7 +96,7 @@ config ME6000 | |||
95 | config ME8100 | 96 | config ME8100 |
96 | tristate "Meilhaus ME-8100 support" | 97 | tristate "Meilhaus ME-8100 support" |
97 | default n | 98 | default n |
98 | depends on PCI | 99 | depends on PCI && m |
99 | help | 100 | help |
100 | This driver supports the Meilhaus ME-8100 family of boards | 101 | This driver supports the Meilhaus ME-8100 family of boards |
101 | that do data collection and multipurpose I/O. | 102 | that do data collection and multipurpose I/O. |
@@ -106,7 +107,7 @@ config ME8100 | |||
106 | config ME8200 | 107 | config ME8200 |
107 | tristate "Meilhaus ME-8200 support" | 108 | tristate "Meilhaus ME-8200 support" |
108 | default n | 109 | default n |
109 | depends on PCI | 110 | depends on PCI && m |
110 | help | 111 | help |
111 | This driver supports the Meilhaus ME-8200 family of boards | 112 | This driver supports the Meilhaus ME-8200 family of boards |
112 | that do data collection and multipurpose I/O. | 113 | that do data collection and multipurpose I/O. |
@@ -117,7 +118,7 @@ config ME8200 | |||
117 | config MEDUMMY | 118 | config MEDUMMY |
118 | tristate "Meilhaus dummy driver" | 119 | tristate "Meilhaus dummy driver" |
119 | default n | 120 | default n |
120 | depends on PCI | 121 | depends on PCI && m |
121 | help | 122 | help |
122 | This provides a dummy driver for the Meilhaus driver package | 123 | This provides a dummy driver for the Meilhaus driver package |
123 | 124 | ||
diff --git a/drivers/staging/poch/poch.c b/drivers/staging/poch/poch.c index ec343ef53a85..0d111ddfabb2 100644 --- a/drivers/staging/poch/poch.c +++ b/drivers/staging/poch/poch.c | |||
@@ -1026,7 +1026,7 @@ static int poch_ioctl(struct inode *inode, struct file *filp, | |||
1026 | } | 1026 | } |
1027 | break; | 1027 | break; |
1028 | case POCH_IOC_GET_COUNTERS: | 1028 | case POCH_IOC_GET_COUNTERS: |
1029 | if (access_ok(VERIFY_WRITE, argp, sizeof(struct poch_counters))) | 1029 | if (!access_ok(VERIFY_WRITE, argp, sizeof(struct poch_counters))) |
1030 | return -EFAULT; | 1030 | return -EFAULT; |
1031 | 1031 | ||
1032 | spin_lock_irq(&channel->counters_lock); | 1032 | spin_lock_irq(&channel->counters_lock); |
diff --git a/drivers/staging/usbip/usbip_common.c b/drivers/staging/usbip/usbip_common.c index 72e209276ea7..22f93dd0ba03 100644 --- a/drivers/staging/usbip/usbip_common.c +++ b/drivers/staging/usbip/usbip_common.c | |||
@@ -406,8 +406,20 @@ void usbip_start_threads(struct usbip_device *ud) | |||
406 | /* | 406 | /* |
407 | * threads are invoked per one device (per one connection). | 407 | * threads are invoked per one device (per one connection). |
408 | */ | 408 | */ |
409 | kernel_thread(usbip_thread, (void *)&ud->tcp_rx, 0); | 409 | int retval; |
410 | kernel_thread(usbip_thread, (void *)&ud->tcp_tx, 0); | 410 | |
411 | retval = kernel_thread(usbip_thread, (void *)&ud->tcp_rx, 0); | ||
412 | if (retval < 0) { | ||
413 | printk(KERN_ERR "Creating tcp_rx thread for ud %p failed.\n", | ||
414 | ud); | ||
415 | return; | ||
416 | } | ||
417 | retval = kernel_thread(usbip_thread, (void *)&ud->tcp_tx, 0); | ||
418 | if (retval < 0) { | ||
419 | printk(KERN_ERR "Creating tcp_tx thread for ud %p failed.\n", | ||
420 | ud); | ||
421 | return; | ||
422 | } | ||
411 | 423 | ||
412 | /* confirm threads are starting */ | 424 | /* confirm threads are starting */ |
413 | wait_for_completion(&ud->tcp_rx.thread_done); | 425 | wait_for_completion(&ud->tcp_rx.thread_done); |