提交 b7ebbb77 编写于 作者: L Linus Torvalds

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: udlfb: Add vmalloc.h include
  staging: remove aten2011 driver
  Staging: android: lowmemorykiller.c: fix it for "oom: move oom_adj value from task_struct to mm_struct"
  Staging: serqt_usb2: fix memory leak in error case
  Staging: serqt_usb2: add missing calls to tty_kref_put()
...@@ -103,8 +103,6 @@ source "drivers/staging/pohmelfs/Kconfig" ...@@ -103,8 +103,6 @@ source "drivers/staging/pohmelfs/Kconfig"
source "drivers/staging/stlc45xx/Kconfig" source "drivers/staging/stlc45xx/Kconfig"
source "drivers/staging/uc2322/Kconfig"
source "drivers/staging/b3dfg/Kconfig" source "drivers/staging/b3dfg/Kconfig"
source "drivers/staging/phison/Kconfig" source "drivers/staging/phison/Kconfig"
......
...@@ -34,7 +34,6 @@ obj-$(CONFIG_ANDROID) += android/ ...@@ -34,7 +34,6 @@ obj-$(CONFIG_ANDROID) += android/
obj-$(CONFIG_DST) += dst/ obj-$(CONFIG_DST) += dst/
obj-$(CONFIG_POHMELFS) += pohmelfs/ obj-$(CONFIG_POHMELFS) += pohmelfs/
obj-$(CONFIG_STLC45XX) += stlc45xx/ obj-$(CONFIG_STLC45XX) += stlc45xx/
obj-$(CONFIG_USB_SERIAL_ATEN2011) += uc2322/
obj-$(CONFIG_B3DFG) += b3dfg/ obj-$(CONFIG_B3DFG) += b3dfg/
obj-$(CONFIG_IDE_PHISON) += phison/ obj-$(CONFIG_IDE_PHISON) += phison/
obj-$(CONFIG_PLAN9AUTH) += p9auth/ obj-$(CONFIG_PLAN9AUTH) += p9auth/
......
...@@ -96,19 +96,21 @@ static int lowmem_shrink(int nr_to_scan, gfp_t gfp_mask) ...@@ -96,19 +96,21 @@ static int lowmem_shrink(int nr_to_scan, gfp_t gfp_mask)
read_lock(&tasklist_lock); read_lock(&tasklist_lock);
for_each_process(p) { for_each_process(p) {
struct mm_struct *mm;
int oom_adj; int oom_adj;
task_lock(p); task_lock(p);
if (!p->mm) { mm = p->mm;
if (!mm) {
task_unlock(p); task_unlock(p);
continue; continue;
} }
oom_adj = p->oomkilladj; oom_adj = mm->oom_adj;
if (oom_adj < min_adj) { if (oom_adj < min_adj) {
task_unlock(p); task_unlock(p);
continue; continue;
} }
tasksize = get_mm_rss(p->mm); tasksize = get_mm_rss(mm);
task_unlock(p); task_unlock(p);
if (tasksize <= 0) if (tasksize <= 0)
continue; continue;
......
...@@ -360,18 +360,18 @@ static void qt_read_bulk_callback(struct urb *urb) ...@@ -360,18 +360,18 @@ static void qt_read_bulk_callback(struct urb *urb)
if (port_paranoia_check(port, __func__) != 0) { if (port_paranoia_check(port, __func__) != 0) {
dbg("%s - port_paranoia_check, exiting\n", __func__); dbg("%s - port_paranoia_check, exiting\n", __func__);
qt_port->ReadBulkStopped = 1; qt_port->ReadBulkStopped = 1;
return; goto exit;
} }
if (!serial) { if (!serial) {
dbg("%s - bad serial pointer, exiting\n", __func__); dbg("%s - bad serial pointer, exiting\n", __func__);
return; goto exit;
} }
if (qt_port->closePending == 1) { if (qt_port->closePending == 1) {
/* Were closing , stop reading */ /* Were closing , stop reading */
dbg("%s - (qt_port->closepending == 1\n", __func__); dbg("%s - (qt_port->closepending == 1\n", __func__);
qt_port->ReadBulkStopped = 1; qt_port->ReadBulkStopped = 1;
return; goto exit;
} }
/* /*
...@@ -381,7 +381,7 @@ static void qt_read_bulk_callback(struct urb *urb) ...@@ -381,7 +381,7 @@ static void qt_read_bulk_callback(struct urb *urb)
*/ */
if (qt_port->RxHolding == 1) { if (qt_port->RxHolding == 1) {
qt_port->ReadBulkStopped = 1; qt_port->ReadBulkStopped = 1;
return; goto exit;
} }
if (urb->status) { if (urb->status) {
...@@ -389,7 +389,7 @@ static void qt_read_bulk_callback(struct urb *urb) ...@@ -389,7 +389,7 @@ static void qt_read_bulk_callback(struct urb *urb)
dbg("%s - nonzero read bulk status received: %d\n", dbg("%s - nonzero read bulk status received: %d\n",
__func__, urb->status); __func__, urb->status);
return; goto exit;
} }
if (tty && RxCount) { if (tty && RxCount) {
...@@ -463,6 +463,8 @@ static void qt_read_bulk_callback(struct urb *urb) ...@@ -463,6 +463,8 @@ static void qt_read_bulk_callback(struct urb *urb)
} }
schedule_work(&port->work); schedule_work(&port->work);
exit:
tty_kref_put(tty);
} }
/* /*
...@@ -736,6 +738,11 @@ static int qt_startup(struct usb_serial *serial) ...@@ -736,6 +738,11 @@ static int qt_startup(struct usb_serial *serial)
if (!qt_port) { if (!qt_port) {
dbg("%s: kmalloc for quatech_port (%d) failed!.", dbg("%s: kmalloc for quatech_port (%d) failed!.",
__func__, i); __func__, i);
for(--i; i >= 0; i--) {
port = serial->port[i];
kfree(usb_get_serial_port_data(port));
usb_set_serial_port_data(port, NULL);
}
return -ENOMEM; return -ENOMEM;
} }
spin_lock_init(&qt_port->lock); spin_lock_init(&qt_port->lock);
...@@ -1041,7 +1048,7 @@ static void qt_block_until_empty(struct tty_struct *tty, ...@@ -1041,7 +1048,7 @@ static void qt_block_until_empty(struct tty_struct *tty,
} }
} }
static void qt_close( struct usb_serial_port *port) static void qt_close(struct usb_serial_port *port)
{ {
struct usb_serial *serial = port->serial; struct usb_serial *serial = port->serial;
struct quatech_port *qt_port; struct quatech_port *qt_port;
...@@ -1068,6 +1075,7 @@ static void qt_close( struct usb_serial_port *port) ...@@ -1068,6 +1075,7 @@ static void qt_close( struct usb_serial_port *port)
/* wait up to for transmitter to empty */ /* wait up to for transmitter to empty */
if (serial->dev) if (serial->dev)
qt_block_until_empty(tty, qt_port); qt_block_until_empty(tty, qt_port);
tty_kref_put(tty);
/* Close uart channel */ /* Close uart channel */
status = qt_close_channel(serial, index); status = qt_close_channel(serial, index);
......
config USB_SERIAL_ATEN2011
tristate "ATEN 2011 USB to serial device support"
depends on USB_SERIAL
default N
---help---
Say Y here if you want to use a ATEN 2011 dual port USB to serial
adapter.
To compile this driver as a module, choose M here: the module will be
called aten2011.
obj-$(CONFIG_USB_SERIAL_ATEN2011) += aten2011.o
TODO:
- checkpatch.pl cleanups
- remove dead and useless code (auditing the tty ioctls to
verify that they really are correct and needed.)
Please send any patches to Greg Kroah-Hartman <greg@kroah.com> and
Russell Lang <gsview@ghostgum.com.au>.
此差异已折叠。
...@@ -21,6 +21,7 @@ ...@@ -21,6 +21,7 @@
#include <linux/mm.h> #include <linux/mm.h>
#include <linux/fb.h> #include <linux/fb.h>
#include <linux/mutex.h> #include <linux/mutex.h>
#include <linux/vmalloc.h>
#include "udlfb.h" #include "udlfb.h"
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册