Age | Commit message (Collapse) | Author |
|
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
|
|
Now that we're murder-synchronous, this code path will never be
called (and if it does, it doesn't tell us anything useful other
than we killed a task that was already being killed by somebody
else but hadn't gotten its' signal yet)
Signed-off-by: San Mehat <san@google.com>
|
|
As it turns out, the CONFIG_PROFILING interfaces leak a
task struct if the notifier chain returns NOTIFY_OK.. doh.
This patch reworks lowmemkiller to use the new generic task
free notifier chain.
Signed-off-by: San Mehat <san@google.com>
|
|
binder_deferred_release was not unmapping the page from the buffer
before freeing it, causing memory corruption. This only happened
when page(s) had not been freed by binder_update_page_range, which
properly unmaps the pages.
This only happens on architectures with VIPT aliasing.
To reproduce, create a program which opens, mmaps, munmaps, then closes
the binder very quickly. This should leave a page allocated when the
binder is released. When binder_deferrred_release is called on the
close, the page will remain mapped to the address in the linear
proc->buffer. Later, we may map the same physical page to a different
virtual address that has different coloring, and this may cause
aliasing to occur.
PAGE_POISONING will greatly increase your chances of noticing any
problems.
Change-Id: I6941bf212881b8bf846bdfda43d3609c7ae4892e
Signed-off-by: Christopher Lais <chris+android@zenthought.org>
|
|
This patch optimizes lowmemkiller to not do any work when it has an outstanding
kill-request. This greatly reduces the pressure on the task_list lock
(improving interactivity), as well as improving the vmscan performance
when under heavy memory pressure (by up to 20x in tests).
Note: For this enhancement to work, you need CONFIG_PROFILING
Signed-off-by: San Mehat <san@google.com>
|
|
As part of formating the mass storage device, Host sends the INQUIRY
scsi command. As per the standard, the command length for this
command should be 6 bytes, whereas the Vista host sends 12 bytes.
When the command length of the command is not equal to the standard
length, the device sends a phase error as part of the status phase.
When the host receives a phase error, it re-enumerates, hence the
error.
If the command is INQUIRY, and the command length is 12 bytes,
treating this as a good command and not sending the phase error
to the host fixes this issue.
Signed-off-by: Velempati Chiranjeevi <c_cvelem@qualcomm.com>
Signed-off-by: Mike Lockwood <lockwood@android.com>
|
|
Under certain circumstances, a process can take awhile to
handle a sig-kill (especially if it's in a scheduler group with
a very low share ratio). When this occurs, lowmemkiller returns
to vmscan indicating the process memory has been freed - even
though the process is still waiting to die. Since the memory
hasn't actually freed, lowmemkiller is called again shortly after,
and picks the same process to die; regardless of the fact that
it has already been 'scheduled' to die and the memory has already
been reported to vmscan as having been freed.
Solution is to check fatal_signal_pending() on the selected
task, and if it's already pending destruction return; indicating
to vmscan that no resources were freed on this pass.
Signed-off-by: San Mehat <san@google.com>
|
|
Some drivers flush the global workqueue when closed. This would deadlock if
the last reference to the file was released from the binder.
Change-Id: Ifdabc0b383fecb20836d1bbb9786c632402a14e1
Signed-off-by: Arve Hjønnevåg <arve@android.com>
|
|
The timed output device never previously checked the return value of sscanf,
resulting in an uninitialized int being passed to enable() if input value
was invalid.
Signed-off-by: Mike Lockwood <lockwood@android.com>
|
|
Pulling in some code from file_storage.c, we now handle interface changes
in do_set_config(), which is now not called until any pending requests have
been successfully completed or cancelled.
This fixes a race condition that resulted in usb_ep_free_request() being called
while the request is still busy.
Signed-off-by: Mike Lockwood <lockwood@android.com>
|
|
Change-Id: Ib9655177bfaf00bd5682e1ac0d7e813e16a47eea
|
|
|
|
Change-Id: Iaefeca497de02fe36b7f5d79075912f6e349ec53
Signed-off-by: Arve Hjønnevåg <arve@android.com>
|
|
Change-Id: Ia0f9c8cec68054c6600a799ef864ebf1185c93ab
Signed-off-by: Arve Hjønnevåg <arve@android.com>
|
|
Change-Id: I6e9c064ba024329099cb833b2ae9ab43c2ad8c6d
Signed-off-by: Arve Hjønnevåg <arve@android.com>
|
|
The old code did not allways disable interrupts when called from thread
context, but tried to lock the same spinlock from interrupt context.
This was merged from a change to drivers/usb/function/mass_storage.c
in the android-msm-2.6.29 branch.
Signed-off-by: Arve Hjønnevåg <arve@android.com>
Signed-off-by: Mike Lockwood <lockwood@android.com>
|
|
This fixes a load ordering issue that occurred if a function driver loads before
the android gadget driver is initialized.
Signed-off-by: Mike Lockwood <lockwood@android.com>
|
|
Signed-off-by: Iliyan Malchev <malchev@google.com>
|
|
This avoids excessive caching at the block level layer when copying large
files to the storage device.
Signed-off-by: Mike Lockwood <lockwood@android.com>
|
|
This fixes a kernel panic in rndis.c when receiving the
OID_GEN_VENDOR_DESCRIPTION command.
Signed-off-by: Mike Lockwood <lockwood@android.com>
|
|
Change-Id: I9156bad829e8c65087f122b48cc57638902fab12
Signed-off-by: Dima Zavin <dima@android.com>
|
|
Signed-off-by: Mike Lockwood <lockwood@android.com>
|
|
Signed-off-by: Mike Lockwood <lockwood@android.com>
|
|
Signed-off-by: Mike Lockwood <lockwood@android.com>
|
|
Signed-off-by: San Mehat <san@google.com>
|
|
gether_disconnect() is always called before gether_connect() by the different
USB ethernet functions, so this warning was firing during normal operation.
Change-Id: I178cc7d1f67e9e87ac2e99c6674c4db8fcddf4a0
Signed-off-by: Mike Lockwood <lockwood@android.com>
|
|
Change-Id: I85973ebfcbfae6b401fb8b402842309c72655149
Signed-off-by: Mike Lockwood <lockwood@android.com>
|
|
Lets non-standard NAND drivers take advantage of known NAND
chip information.
Change-Id: I87e2fcb40b07b2ec91e102f1fa7f419a4b4af0a3
Signed-off-by: Dima Zavin <dima@android.com>
|
|
Only set device descriptor bDeviceClass field to USB_CLASS_COMM when
the RNDIS function is actually enabled.
Signed-off-by: Mike Lockwood <lockwood@android.com>
|
|
Signed-off-by: Mike Lockwood <lockwood@android.com>
|
|
Signed-off-by: Mike Lockwood <lockwood@android.com>
|
|
is set
Signed-off-by: Mike Lockwood <lockwood@android.com>
|
|
Signed-off-by: Mike Lockwood <lockwood@android.com>
|
|
Signed-off-by: Mike Lockwood <lockwood@android.com>
|
|
Signed-off-by: San Mehat <san@google.com>
|
|
Change-Id: I9e98250a04e5505ce2db2edd355e8fdf8391cabd
Signed-off-by: Arve Hjønnevåg <arve@android.com>
|
|
Change-Id: I15d809d8c3002e5bf397a2b154e3803ea0e73642
Signed-off-by: Arve Hjønnevåg <arve@android.com>
|
|
erase kpanic partition when there is no data(console and thread)
Signed-off-by: Tom Zhu <a2289c@android-hal-04.(none)>
Signed-off-by: San Mehat <san@google.com>
|
|
Add bad block handling in apanic
Signed-off-by: Tom Zhu <ling.zhu@motorola.com>
Signed-off-by: San Mehat <san@google.com>
misc: apanic: Improved bad-block / watchdog handling
1. handle cases that there is no more good blocks
2. touch softlockup watchdog at the start of apanic
3. change unsigned char get_bb() to unsigned int get_bb()
4. return idx instead of rc2, to keep the previous written pages.
Signed-off-by: Tom Zhu <ling.zhu@motorola.com>
Signed-off-by: San Mehat <san@google.com>
|
|
Signed-off-by: San Mehat <san@google.com>
|
|
This driver triggers when the kernel panics and attempts to
write critical debug data to the flash.
Signed-off-by: San Mehat <san@google.com>
drivers: apanic: checkpatch fixes
Signed-off-by: San Mehat <san@google.com>
apanic: Fix a few cases of calling non-atomic things from atomic
We need to pay special care to not enrage cond_resched(), and the
base nand bb stuff calls schedule() so thats out.
Signed-off-by: San Mehat <san@google.com>
|
|
Signed-off-by: San Mehat <san@google.com>
mtd: nand_base: fix nand_panic_wait
fix the problem of nand_panic_wait
Signed-off-by: Tom Zhu <a2289c@android-hal-04.(none)>
Signed-off-by: San Mehat <san@google.com>
|
|
Rather than hard-lock the kernel, we now BUG() when a driver takes
> 3 seconds to suspend. If the underlying platform supports panic dumps,
then the data can be collected for debug.
Signed-off-by: San Mehat <san@google.com>
|
|
UART TX. The idea here is to provide a mechanism where we can wakeup our peer before sending data.
Signed-off-by: San Mehat <san@google.com>
|
|
Signed-off-by: Nick Pelly <npelly@google.com>
|
|
This provides kernel_debugger() which can be called from an interrupt
context low level debugger wedge to execute commands that inspect
kernel state. It doesn't do much on its own.
Signed-off-by: Brian Swetland <swetland@google.com>
kernel_debugger_core: Add sysrq command.
sysrq <c> will run the sysrq command <c> and dump what
was added to the kernel log while the command ran.
Signed-off-by: Brian Swetland <swetland@google.com>
Signed-off-by: Arve Hjønnevåg <arve@android.com>
|
|
net: Fix a bitmask in PPPoPNS and rename constants in PPPoPNS and PPPoLAC.
Signed-off-by: Chia-chi Yeh <chiachi@android.com>
net: Fix a potential deadlock while releasing PPPoLAC/PPPoPNS socket.
PPP driver guarantees that no thread will be executing start_xmit() after
returning from ppp_unregister_channel(). To achieve this, a spinlock (downl)
is used. In pppolac_release(), ppp_unregister_channel() is called after sk_udp
is locked. At the same time, another thread might be running in pppolac_xmit()
with downl. Thus a deadlock will occur if the thread tries to lock sk_udp.
The same situation might happen on sk_raw in pppopns_release().
Signed-off-by: Chia-chi Yeh <chiachi@android.com>
net: Force PPPoLAC and PPPoPNS to bind an interface before creating PPP channel.
It is common to manipulate the routing table after configuring PPP device.
Since both PPPoLAC and PPPoPNS run over IP, care must be taken to make sure
that there is no loop in the routing table.
Although this can be done by adding a host route, it might still cause
problems when the interface is down for some reason.
To solve this, this patch forces both drivers to bind an interface before
creating PPP channel, so the system will not re-route the tunneling sockets
to another interface when the original one is down. Another benefit is that
now the host route is no longer required, so there is no need to remove it
when PPP channel is closed.
Signed-off-by: Chia-chi Yeh <chiachi@android.com>
net: Avoid sleep-inside-spinlock in PPPoLAC and PPPoPNS.
Since recv() and xmit() are called with a spinlock held, routines which might
sleep cannot be used. This issue is solved by following changes:
Incoming packets are now processed in backlog handler, recv_core(), instead of
recv(). Since backlog handler is always executed with socket spinlock held, the
requirement of ppp_input() is still satisfied.
Outgoing packets are now processed in workqueue handler, xmit_core(), instead of
xmit(). Note that kernel_sendmsg() is no longer used to prevent touching dead
sockets.
In release(), lock_sock() and pppox_unbind_sock() ensure that no thread is in
recv_core() or xmit(). Then socket handlers are restored before release_sock(),
so no packets will leak in backlog queue.
Signed-off-by: Chia-chi Yeh <chiachi@android.com>
net: Fix msg_iovlen in PPPoLAC and PPPoPNS.
Although any positive value should work (which is always true in both drivers),
the correct value should be 1.
Signed-off-by: Chia-chi Yeh <chiachi@android.com>
|
|
Signed-off-by: Chia-chi Yeh <chiachi@android.com>
|
|
Change-Id: I3ae3ee7520951ae24269db0ef2898c6455cf6bcc
Signed-off-by: Chia-chi Yeh <chiachi@android.com>
|
|
usb: gadget: f_mass_storage: use dev_set_name()
Replacing strcpy() to device->bus_id which no longer exists in 2.6.32
Change-Id: Id978c881f457044c750bfd62f4c5bcc35bcd4fc5
Signed-off-by: Mike Lockwood <lockwood@android.com>
USB: gadget: f_adb: Claim endpoints so they are not reused by another function.
Change-Id: Ic9536cca800162e701c81cab36054f51ea759b72
Signed-off-by: Mike Lockwood <lockwood@android.com>
USB: gadget: f_acm: Fix crashes in acm_set_alt()
Change-Id: I91b761d392f8b1ca8784c69069b43e402b90d6a4
Signed-off-by: Mike Lockwood <lockwood@android.com>
USB: gadget: f_acm: Include android code only if CONFIG_USB_ANDROID_ACM is set.
Signed-off-by: Mike Lockwood <lockwood@android.com>
USB: gadget: Android support for RNDIS serial ethernet function.
Signed-off-by: Mike Lockwood <lockwood@android.com>
USB: gadget: android: Add function name to android_register_function printk.
Change-Id: I38bf79d9b544cdeaec9385f7482a131417fc4b23
Signed-off-by: Mike Lockwood <lockwood@android.com>
|