mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [GIT PATCH] STAGING patches for 2.6-git
@ 2009-01-28 23:23 Greg KH
  2009-01-28 23:26 ` [PATCH 01/10] Staging: comedi: fix Kbuild Greg Kroah-Hartman
                   ` (9 more replies)
  0 siblings, 10 replies; 11+ messages in thread
From: Greg KH @ 2009-01-28 23:23 UTC (permalink / raw)
  To: Linus Torvalds, Andrew Morton; +Cc: linux-kernel

Here are some tiny staging patches that fix some build errors and common
Kconfig problems that people have reported.  There are also a few other
minor, "obvious" bugfixes to some of the drivers as well and a
documentation update.

Please pull from:
	master.kernel.org:/pub/scm/linux/kernel/git/gregkh/staging-2.6.git/

All but one of these have been in the -next releases with no known build
errors.  The one that wasn't was pointed out to me by Randy Dunlap and
fixes a build issue on 64bit boxes that he found.

The patches will be sent as a follow-on to this message to lkml for people
to see.

thanks,

greg k-h

--------------

 drivers/staging/agnx/agnx.h                 |    2 ++
 drivers/staging/android/binder.c            |   16 ++++++++--------
 drivers/staging/android/lowmemorykiller.txt |   16 ++++++++++++++++
 drivers/staging/android/timed_gpio.c        |    5 +++--
 drivers/staging/comedi/Kconfig              |    1 +
 drivers/staging/meilhaus/Kconfig            |   21 +++++++++++----------
 drivers/staging/poch/poch.c                 |    2 +-
 drivers/staging/usbip/usbip_common.c        |   16 ++++++++++++++--
 8 files changed, 56 insertions(+), 23 deletions(-)
 create mode 100644 drivers/staging/android/lowmemorykiller.txt

---------------

Arve Hjønnevåg (3):
      Staging: android: binder: fix arm build errors
      Staging: android: timed_gpio: Fix build to build on kernels after 2.6.25.
      Staging: android: Add lowmemorykiller documentation.

Geert Uytterhoeven (1):
      staging: agnx: drivers/staging/agnx/agnx.h needs <linux/io.h>

Greg Kroah-Hartman (3):
      Staging: comedi: fix Kbuild
      Staging: meilhaus: fix Kbuild
      Staging: android: fix build error on 64bit boxes

Oleg Nesterov (1):
      Staging: android: task_get_unused_fd_flags: fix the wrong usage of tsk->signal

Roel Kluin (2):
      Staging: usbip: usbip_start_threads(): handle kernel_thread failure
      Staging: poch: fix verification of memory area


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [PATCH 01/10] Staging: comedi: fix Kbuild
  2009-01-28 23:23 [GIT PATCH] STAGING patches for 2.6-git Greg KH
@ 2009-01-28 23:26 ` Greg Kroah-Hartman
  2009-01-28 23:26 ` [PATCH 02/10] Staging: meilhaus: " Greg Kroah-Hartman
                   ` (8 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: Greg Kroah-Hartman @ 2009-01-28 23:26 UTC (permalink / raw)
  To: linux-kernel; +Cc: Greg Kroah-Hartman

comedi doesn't like being built into the kernel right now, so force it
to be a module.

Reported-by: Kamalesh Babulal <kamalesh@linux.vnet.ibm.com>
Reported-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/comedi/Kconfig |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/drivers/staging/comedi/Kconfig b/drivers/staging/comedi/Kconfig
index b501bfb..b47ca1e 100644
--- a/drivers/staging/comedi/Kconfig
+++ b/drivers/staging/comedi/Kconfig
@@ -1,6 +1,7 @@
 config COMEDI
 	tristate "Data Acquision support (comedi)"
 	default N
+	depends on m
 	---help---
 	  Enable support a wide range of data acquision devices
 	  for Linux.
-- 
1.6.0.2


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [PATCH 02/10] Staging: meilhaus: fix Kbuild
  2009-01-28 23:23 [GIT PATCH] STAGING patches for 2.6-git Greg KH
  2009-01-28 23:26 ` [PATCH 01/10] Staging: comedi: fix Kbuild Greg Kroah-Hartman
@ 2009-01-28 23:26 ` Greg Kroah-Hartman
  2009-01-28 23:26 ` [PATCH 03/10] Staging: android: binder: fix arm build errors Greg Kroah-Hartman
                   ` (7 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: Greg Kroah-Hartman @ 2009-01-28 23:26 UTC (permalink / raw)
  To: linux-kernel; +Cc: Greg Kroah-Hartman

The Meilhaus drivers do not like being built into the kernel right now,
so force them to be a module.

Reported-by: Kamalesh Babulal <kamalesh@linux.vnet.ibm.com>
Reported-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/meilhaus/Kconfig |   21 +++++++++++----------
 1 files changed, 11 insertions(+), 10 deletions(-)

diff --git a/drivers/staging/meilhaus/Kconfig b/drivers/staging/meilhaus/Kconfig
index 6def83f..923af22 100644
--- a/drivers/staging/meilhaus/Kconfig
+++ b/drivers/staging/meilhaus/Kconfig
@@ -4,6 +4,7 @@
 
 menuconfig MEILHAUS
 	tristate "Meilhaus support"
+	depends on m
 	---help---
 	  If you have a Meilhaus card, say Y (or M) here.
 
@@ -18,7 +19,7 @@ if MEILHAUS
 config ME0600
 	tristate "Meilhaus ME-600 support"
 	default n
-	depends on PCI
+	depends on PCI && m
 	help
 	  This driver supports the Meilhaus ME-600 family of boards
 	  that do data collection and multipurpose I/O.
@@ -29,7 +30,7 @@ config ME0600
 config ME0900
 	tristate "Meilhaus ME-900 support"
 	default n
-	depends on PCI
+	depends on PCI && m
 	help
 	  This driver supports the Meilhaus ME-900 family of boards
 	  that do data collection and multipurpose I/O.
@@ -40,7 +41,7 @@ config ME0900
 config ME1000
 	tristate "Meilhaus ME-1000 support"
 	default n
-	depends on PCI
+	depends on PCI && m
 	help
 	  This driver supports the Meilhaus ME-1000 family of boards
 	  that do data collection and multipurpose I/O.
@@ -51,7 +52,7 @@ config ME1000
 config ME1400
 	tristate "Meilhaus ME-1400 support"
 	default n
-	depends on PCI
+	depends on PCI && m
 	help
 	  This driver supports the Meilhaus ME-1400 family of boards
 	  that do data collection and multipurpose I/O.
@@ -62,7 +63,7 @@ config ME1400
 config ME1600
 	tristate "Meilhaus ME-1600 support"
 	default n
-	depends on PCI
+	depends on PCI && m
 	help
 	  This driver supports the Meilhaus ME-1600 family of boards
 	  that do data collection and multipurpose I/O.
@@ -73,7 +74,7 @@ config ME1600
 config ME4600
 	tristate "Meilhaus ME-4600 support"
 	default n
-	depends on PCI
+	depends on PCI && m
 	help
 	  This driver supports the Meilhaus ME-4600 family of boards
 	  that do data collection and multipurpose I/O.
@@ -84,7 +85,7 @@ config ME4600
 config ME6000
 	tristate "Meilhaus ME-6000 support"
 	default n
-	depends on PCI
+	depends on PCI && m
 	help
 	  This driver supports the Meilhaus ME-6000 family of boards
 	  that do data collection and multipurpose I/O.
@@ -95,7 +96,7 @@ config ME6000
 config ME8100
 	tristate "Meilhaus ME-8100 support"
 	default n
-	depends on PCI
+	depends on PCI && m
 	help
 	  This driver supports the Meilhaus ME-8100 family of boards
 	  that do data collection and multipurpose I/O.
@@ -106,7 +107,7 @@ config ME8100
 config ME8200
 	tristate "Meilhaus ME-8200 support"
 	default n
-	depends on PCI
+	depends on PCI && m
 	help
 	  This driver supports the Meilhaus ME-8200 family of boards
 	  that do data collection and multipurpose I/O.
@@ -117,7 +118,7 @@ config ME8200
 config MEDUMMY
 	tristate "Meilhaus dummy driver"
 	default n
-	depends on PCI
+	depends on PCI && m
 	help
 	  This provides a dummy driver for the Meilhaus driver package
 
-- 
1.6.0.2


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [PATCH 03/10] Staging: android: binder: fix arm build errors
  2009-01-28 23:23 [GIT PATCH] STAGING patches for 2.6-git Greg KH
  2009-01-28 23:26 ` [PATCH 01/10] Staging: comedi: fix Kbuild Greg Kroah-Hartman
  2009-01-28 23:26 ` [PATCH 02/10] Staging: meilhaus: " Greg Kroah-Hartman
@ 2009-01-28 23:26 ` Greg Kroah-Hartman
  2009-01-28 23:26 ` [PATCH 04/10] Staging: android: timed_gpio: Fix build to build on kernels after 2.6.25 Greg Kroah-Hartman
                   ` (6 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: Greg Kroah-Hartman @ 2009-01-28 23:26 UTC (permalink / raw)
  To: linux-kernel; +Cc: Arve Hjønnevåg, Greg Kroah-Hartman

From: Arve Hjønnevåg <arve@android.com>

Reported-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/android/binder.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/android/binder.c b/drivers/staging/android/binder.c
index 6a4ceac..ab014bc 100644
--- a/drivers/staging/android/binder.c
+++ b/drivers/staging/android/binder.c
@@ -2649,14 +2649,14 @@ static void binder_vma_open(struct vm_area_struct *vma)
 {
 	struct binder_proc *proc = vma->vm_private_data;
 	if (binder_debug_mask & BINDER_DEBUG_OPEN_CLOSE)
-		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);
+		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));
 	dump_stack();
 }
 static void binder_vma_close(struct vm_area_struct *vma)
 {
 	struct binder_proc *proc = vma->vm_private_data;
 	if (binder_debug_mask & BINDER_DEBUG_OPEN_CLOSE)
-		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);
+		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));
 	proc->vma = NULL;
 }
 
@@ -2677,7 +2677,7 @@ static int binder_mmap(struct file *filp, struct vm_area_struct *vma)
 		vma->vm_end = vma->vm_start + SZ_4M;
 
 	if (binder_debug_mask & BINDER_DEBUG_OPEN_CLOSE)
-		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);
+		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));
 
 	if (vma->vm_flags & FORBIDDEN_MMAP_FLAGS) {
 		ret = -EPERM;
-- 
1.6.0.2


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [PATCH 04/10] Staging: android: timed_gpio: Fix build to build on kernels after 2.6.25.
  2009-01-28 23:23 [GIT PATCH] STAGING patches for 2.6-git Greg KH
                   ` (2 preceding siblings ...)
  2009-01-28 23:26 ` [PATCH 03/10] Staging: android: binder: fix arm build errors Greg Kroah-Hartman
@ 2009-01-28 23:26 ` Greg Kroah-Hartman
  2009-01-28 23:26 ` [PATCH 05/10] Staging: android: fix build error on 64bit boxes Greg Kroah-Hartman
                   ` (5 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: Greg Kroah-Hartman @ 2009-01-28 23:26 UTC (permalink / raw)
  To: linux-kernel; +Cc: Arve Hjønnevåg, Mike Lockwood, Greg Kroah-Hartman

From: Arve Hjønnevåg <arve@android.com>

Reported-by: Randy Dunlap <randy.dunlap@oracle.com>
Cc: Mike Lockwood <lockwood@android.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/android/timed_gpio.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/staging/android/timed_gpio.c b/drivers/staging/android/timed_gpio.c
index bea68c9..b41b20e 100644
--- a/drivers/staging/android/timed_gpio.c
+++ b/drivers/staging/android/timed_gpio.c
@@ -18,7 +18,7 @@
 #include <linux/platform_device.h>
 #include <linux/hrtimer.h>
 #include <linux/err.h>
-#include <asm/arch/gpio.h>
+#include <linux/gpio.h>
 
 #include "timed_gpio.h"
 
-- 
1.6.0.2


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [PATCH 05/10] Staging: android: fix build error on 64bit boxes
  2009-01-28 23:23 [GIT PATCH] STAGING patches for 2.6-git Greg KH
                   ` (3 preceding siblings ...)
  2009-01-28 23:26 ` [PATCH 04/10] Staging: android: timed_gpio: Fix build to build on kernels after 2.6.25 Greg Kroah-Hartman
@ 2009-01-28 23:26 ` Greg Kroah-Hartman
  2009-01-28 23:26 ` [PATCH 06/10] Staging: android: Add lowmemorykiller documentation Greg Kroah-Hartman
                   ` (4 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: Greg Kroah-Hartman @ 2009-01-28 23:26 UTC (permalink / raw)
  To: linux-kernel; +Cc: Greg Kroah-Hartman, Arve Hjønnevåg, Mike Lockwood

ktime_t isn't ment to directly access on all arches, so use the proper
conversion functions instead to figure out what time is remaining.

Reported-by: Randy Dunlap <randy.dunlap@oracle.com>
Cc: Arve Hjønnevåg <arve@android.com>
Cc: Mike Lockwood <lockwood@android.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/android/timed_gpio.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/drivers/staging/android/timed_gpio.c b/drivers/staging/android/timed_gpio.c
index b41b20e..903270c 100644
--- a/drivers/staging/android/timed_gpio.c
+++ b/drivers/staging/android/timed_gpio.c
@@ -49,7 +49,8 @@ static ssize_t gpio_enable_show(struct device *dev, struct device_attribute *att
 
 	if (hrtimer_active(&gpio_data->timer)) {
 		ktime_t r = hrtimer_get_remaining(&gpio_data->timer);
-		remaining = r.tv.sec * 1000 + r.tv.nsec / 1000000;
+		struct timeval t = ktime_to_timeval(r);
+		remaining = t.tv_sec * 1000 + t.tv_usec;
 	} else
 		remaining = 0;
 
-- 
1.6.0.2


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [PATCH 06/10] Staging: android: Add lowmemorykiller documentation.
  2009-01-28 23:23 [GIT PATCH] STAGING patches for 2.6-git Greg KH
                   ` (4 preceding siblings ...)
  2009-01-28 23:26 ` [PATCH 05/10] Staging: android: fix build error on 64bit boxes Greg Kroah-Hartman
@ 2009-01-28 23:26 ` Greg Kroah-Hartman
  2009-01-28 23:26 ` [PATCH 07/10] Staging: android: task_get_unused_fd_flags: fix the wrong usage of tsk->signal Greg Kroah-Hartman
                   ` (3 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: Greg Kroah-Hartman @ 2009-01-28 23:26 UTC (permalink / raw)
  To: linux-kernel; +Cc: Arve Hjønnevåg, Greg Kroah-Hartman

From: Arve Hjønnevåg <arve@android.com>

Signed-off-by: Arve Hjønnevåg <arve@android.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/android/lowmemorykiller.txt |   16 ++++++++++++++++
 1 files changed, 16 insertions(+), 0 deletions(-)
 create mode 100644 drivers/staging/android/lowmemorykiller.txt

diff --git a/drivers/staging/android/lowmemorykiller.txt b/drivers/staging/android/lowmemorykiller.txt
new file mode 100644
index 0000000..bd5c0c0
--- /dev/null
+++ b/drivers/staging/android/lowmemorykiller.txt
@@ -0,0 +1,16 @@
+The lowmemorykiller driver lets user-space specify a set of memory thresholds
+where processes with a range of oom_adj values will get killed. Specify the
+minimum oom_adj values in /sys/module/lowmemorykiller/parameters/adj and the
+number of free pages in /sys/module/lowmemorykiller/parameters/minfree. Both
+files take a comma separated list of numbers in ascending order.
+
+For example, write "0,8" to /sys/module/lowmemorykiller/parameters/adj and
+"1024,4096" to /sys/module/lowmemorykiller/parameters/minfree to kill processes
+with a oom_adj value of 8 or higher when the free memory drops below 4096 pages
+and kill processes with a oom_adj value of 0 or higher when the free memory
+drops below 1024 pages.
+
+The driver considers memory used for caches to be free, but if a large
+percentage of the cached memory is locked this can be very inaccurate
+and processes may not get killed until the normal oom killer is triggered.
+
-- 
1.6.0.2


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [PATCH 07/10] Staging: android: task_get_unused_fd_flags: fix the wrong usage of tsk->signal
  2009-01-28 23:23 [GIT PATCH] STAGING patches for 2.6-git Greg KH
                   ` (5 preceding siblings ...)
  2009-01-28 23:26 ` [PATCH 06/10] Staging: android: Add lowmemorykiller documentation Greg Kroah-Hartman
@ 2009-01-28 23:26 ` Greg Kroah-Hartman
  2009-01-28 23:26 ` [PATCH 08/10] staging: agnx: drivers/staging/agnx/agnx.h needs <linux/io.h> Greg Kroah-Hartman
                   ` (2 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: Greg Kroah-Hartman @ 2009-01-28 23:26 UTC (permalink / raw)
  To: linux-kernel
  Cc: Oleg Nesterov, Arve Hjønnevåg, Brian Swetland,
	Greg Kroah-Hartman

From: Oleg Nesterov <oleg@redhat.com>

Compile tested.

task_struct->signal is not protected by RCU, the code is bogus.
Change the code to take ->siglock to pin ->signal.

Signed-off-by: Oleg Nesterov <oleg@redhat.com>
Cc: Arve Hjønnevåg <arve@android.com>
Cc: Brian Swetland <swetland@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/android/binder.c |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/staging/android/binder.c b/drivers/staging/android/binder.c
index ab014bc..758131c 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)
 	int fd, error;
 	struct fdtable *fdt;
 	unsigned long rlim_cur;
+	unsigned long irqs;
 
 	if (files == NULL)
 		return -ESRCH;
@@ -335,12 +336,11 @@ repeat:
 	 * N.B. For clone tasks sharing a files structure, this test
 	 * will limit the total number of files that can be opened.
 	 */
-	rcu_read_lock();
-	if (tsk->signal)
+	rlim_cur = 0;
+	if (lock_task_sighand(tsk, &irqs)) {
 		rlim_cur = tsk->signal->rlim[RLIMIT_NOFILE].rlim_cur;
-	else
-		rlim_cur = 0;
-	rcu_read_unlock();
+		unlock_task_sighand(tsk, &irqs);
+	}
 	if (fd >= rlim_cur)
 		goto out;
 
-- 
1.6.0.2


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [PATCH 08/10] staging: agnx: drivers/staging/agnx/agnx.h needs <linux/io.h>
  2009-01-28 23:23 [GIT PATCH] STAGING patches for 2.6-git Greg KH
                   ` (6 preceding siblings ...)
  2009-01-28 23:26 ` [PATCH 07/10] Staging: android: task_get_unused_fd_flags: fix the wrong usage of tsk->signal Greg Kroah-Hartman
@ 2009-01-28 23:26 ` Greg Kroah-Hartman
  2009-01-28 23:26 ` [PATCH 09/10] Staging: usbip: usbip_start_threads(): handle kernel_thread failure Greg Kroah-Hartman
  2009-01-28 23:26 ` [PATCH 10/10] Staging: poch: fix verification of memory area Greg Kroah-Hartman
  9 siblings, 0 replies; 11+ messages in thread
From: Greg Kroah-Hartman @ 2009-01-28 23:26 UTC (permalink / raw)
  To: linux-kernel; +Cc: Geert Uytterhoeven, Greg Kroah-Hartman

From: Geert Uytterhoeven <geert@linux-m68k.org>

On m68k:
drivers/staging/agnx/agnx.h: In function 'agnx_read32':
drivers/staging/agnx/agnx.h:10: error: implicit declaration of function 'ioread32'
drivers/staging/agnx/agnx.h: In function 'agnx_write32':
drivers/staging/agnx/agnx.h:15: error: implicit declaration of function 'iowrite32'
drivers/staging/agnx/sta.c: In function 'get_sta_power':
drivers/staging/agnx/sta.c:94: error: implicit declaration of function 'memcpy_fromio'
drivers/staging/agnx/sta.c: In function 'set_sta_power':
drivers/staging/agnx/sta.c:103: error: implicit declaration of function 'memcpy_toio'

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/agnx/agnx.h |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/drivers/staging/agnx/agnx.h b/drivers/staging/agnx/agnx.h
index a75b0db..20f36da 100644
--- a/drivers/staging/agnx/agnx.h
+++ b/drivers/staging/agnx/agnx.h
@@ -1,6 +1,8 @@
 #ifndef AGNX_H_
 #define AGNX_H_
 
+#include <linux/io.h>
+
 #include "xmit.h"
 
 #define PFX				KBUILD_MODNAME ": "
-- 
1.6.0.2


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [PATCH 09/10] Staging: usbip: usbip_start_threads(): handle kernel_thread failure
  2009-01-28 23:23 [GIT PATCH] STAGING patches for 2.6-git Greg KH
                   ` (7 preceding siblings ...)
  2009-01-28 23:26 ` [PATCH 08/10] staging: agnx: drivers/staging/agnx/agnx.h needs <linux/io.h> Greg Kroah-Hartman
@ 2009-01-28 23:26 ` Greg Kroah-Hartman
  2009-01-28 23:26 ` [PATCH 10/10] Staging: poch: fix verification of memory area Greg Kroah-Hartman
  9 siblings, 0 replies; 11+ messages in thread
From: Greg Kroah-Hartman @ 2009-01-28 23:26 UTC (permalink / raw)
  To: linux-kernel; +Cc: Roel Kluin, Greg Kroah-Hartman

From: Roel Kluin <roel.kluin@gmail.com>

kernel_thread may fail, notice this.

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/usbip/usbip_common.c |   16 ++++++++++++++--
 1 files changed, 14 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/usbip/usbip_common.c b/drivers/staging/usbip/usbip_common.c
index 72e2092..22f93dd 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)
 	/*
 	 * threads are invoked per one device (per one connection).
 	 */
-	kernel_thread(usbip_thread, (void *)&ud->tcp_rx, 0);
-	kernel_thread(usbip_thread, (void *)&ud->tcp_tx, 0);
+	int retval;
+
+	retval = kernel_thread(usbip_thread, (void *)&ud->tcp_rx, 0);
+	if (retval < 0) {
+		printk(KERN_ERR "Creating tcp_rx thread for ud %p failed.\n",
+				ud);
+		return;
+	}
+	retval = kernel_thread(usbip_thread, (void *)&ud->tcp_tx, 0);
+	if (retval < 0) {
+		printk(KERN_ERR "Creating tcp_tx thread for ud %p failed.\n",
+				ud);
+		return;
+	}
 
 	/* confirm threads are starting */
 	wait_for_completion(&ud->tcp_rx.thread_done);
-- 
1.6.0.2


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [PATCH 10/10] Staging: poch: fix verification of memory area
  2009-01-28 23:23 [GIT PATCH] STAGING patches for 2.6-git Greg KH
                   ` (8 preceding siblings ...)
  2009-01-28 23:26 ` [PATCH 09/10] Staging: usbip: usbip_start_threads(): handle kernel_thread failure Greg Kroah-Hartman
@ 2009-01-28 23:26 ` Greg Kroah-Hartman
  9 siblings, 0 replies; 11+ messages in thread
From: Greg Kroah-Hartman @ 2009-01-28 23:26 UTC (permalink / raw)
  To: linux-kernel; +Cc: Roel Kluin, Greg Kroah-Hartman

From: Roel Kluin <roel.kluin@gmail.com>

fix verification of memory area

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/poch/poch.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/staging/poch/poch.c b/drivers/staging/poch/poch.c
index ec343ef..0d111dd 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,
 		}
 		break;
 	case POCH_IOC_GET_COUNTERS:
-		if (access_ok(VERIFY_WRITE, argp, sizeof(struct poch_counters)))
+		if (!access_ok(VERIFY_WRITE, argp, sizeof(struct poch_counters)))
 			return -EFAULT;
 
 		spin_lock_irq(&channel->counters_lock);
-- 
1.6.0.2


^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2009-01-28 23:32 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-01-28 23:23 [GIT PATCH] STAGING patches for 2.6-git Greg KH
2009-01-28 23:26 ` [PATCH 01/10] Staging: comedi: fix Kbuild Greg Kroah-Hartman
2009-01-28 23:26 ` [PATCH 02/10] Staging: meilhaus: " Greg Kroah-Hartman
2009-01-28 23:26 ` [PATCH 03/10] Staging: android: binder: fix arm build errors Greg Kroah-Hartman
2009-01-28 23:26 ` [PATCH 04/10] Staging: android: timed_gpio: Fix build to build on kernels after 2.6.25 Greg Kroah-Hartman
2009-01-28 23:26 ` [PATCH 05/10] Staging: android: fix build error on 64bit boxes Greg Kroah-Hartman
2009-01-28 23:26 ` [PATCH 06/10] Staging: android: Add lowmemorykiller documentation Greg Kroah-Hartman
2009-01-28 23:26 ` [PATCH 07/10] Staging: android: task_get_unused_fd_flags: fix the wrong usage of tsk->signal Greg Kroah-Hartman
2009-01-28 23:26 ` [PATCH 08/10] staging: agnx: drivers/staging/agnx/agnx.h needs <linux/io.h> Greg Kroah-Hartman
2009-01-28 23:26 ` [PATCH 09/10] Staging: usbip: usbip_start_threads(): handle kernel_thread failure Greg Kroah-Hartman
2009-01-28 23:26 ` [PATCH 10/10] Staging: poch: fix verification of memory area Greg Kroah-Hartman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®