dect
/
linux-2.6
Archived
13
0
Fork 0
Commit Graph

29 Commits

Author SHA1 Message Date
Arve Hjønnevåg 861a0dcc39 Staging: binder: Defer flush and release operations to avoid deadlocks.
If a transaction that contains a file descriptor fails on a later object,
the new file descriptor needs to be closed. If this is a binder file
descriptor we would deadlock in flush. If there were no other references to
the file at this point release would also be called.

Signed-off-by: Arve Hjønnevåg <arve@android.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-04-17 11:06:27 -07:00
Arve Hjønnevåg 0cf24a7dc9 Staging: binder: Prevent the wrong thread from adding a transaction to the stack.
If a thread is part of a transaction stack, it is only allowed to make
another call if it was the target of the top transaction on the stack.

Signed-off-by: Arve Hjønnevåg <arve@android.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-04-17 11:06:27 -07:00
Arve Hjønnevåg 7af7467efa Staging: binder: Cast to uintptr_t instead of size_t when aligning pointers
Signed-off-by: Arve Hjønnevåg <arve@android.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-04-17 11:06:26 -07:00
Arve Hjønnevåg 282ca175d4 Staging: binder: Keep a reference to the files_struct while the driver is mmapped
This prevents breaking fget_light if a single threaded application
allows incoming file descriptors (in replies or on nodes).
Should also prevent inserting a file in the wrong files_struct if the
receving process execs in the middle of a transaction (between
task_get_unused_fd_flags and task_fd_install).

Signed-off-by: Arve Hjønnevåg <arve@android.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-04-17 11:06:26 -07:00
Arve Hjønnevåg ea5c4cc68e Staging: binder: Add more offset validation.
Check that datasize is not smaller than one flat_binder_object.
Check that offsets are aligned.
Check that offsets_size is aligned.

Signed-off-by: Arve Hjønnevåg <arve@android.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-04-17 11:06:26 -07:00
Arve Hjønnevåg 4ddfc911e3 Staging: binder: mmap fixes.
Only allow a binder file pointer to be mmapped once. The buffer management
code cannot deal with more then one area.
Also remove leftover mutex_unlock if mmap fails.

Signed-off-by: Arve Hjønnevåg <arve@android.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-04-17 11:06:26 -07:00
Arve Hjønnevåg 85e0b0cbbf Staging: binder: Don't create two proc entries with the same name if the driver is opened twice in one process.
Signed-off-by: Arve Hjønnevåg <arve@android.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-04-17 11:06:26 -07:00
Arve Hjønnevåg 1d8cbcf5d6 Staging: binder: Remove VM_EXEC check.
Many platforms do not support mappings without VM_EXEC.

Signed-off-by: Arve Hjønnevåg <arve@android.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-04-17 11:06:26 -07:00
Randy Dunlap bdd345d856 Staging: Android: fix more printk formats
Fix more android ram_console printk format warnings:

drivers/staging/android/ram_console.c:238: warning: format '%d' expects type 'int', but argument 3 has type 'size_t'
drivers/staging/android/ram_console.c:238: warning: format '%d' expects type 'int', but argument 4 has type 'size_t'

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-04-03 14:53:30 -07:00
Randy Dunlap 7fce939942 Staging: android: ram_console: fix printk format warning
Fix android printk format warnings:

linux-next-20090209/drivers/staging/android/ram_console.c:228: warning: format '%d' expects type 'int', but argument 3 has type 'size_t'
linux-next-20090209/drivers/staging/android/ram_console.c:228: warning: format '%d' expects type 'int', but argument 4 has type 'size_t'
linux-next-20090209/drivers/staging/android/ram_console.c:326: warning: format '%x' expects type 'unsigned int', but argument 2 has type 'size_t'
linux-next-20090209/drivers/staging/android/ram_console.c:326: warning: format '%x' expects type 'unsigned int', but argument 3 has type 'size_t'

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-04-03 14:53:30 -07:00
Randy Dunlap 45eb7ae173 Staging: android: binder: fix printk format warnings
Fix printk format warnings in android binder:

drivers/staging/android/binder.c:2652: warning: format '%lx' expects type 'long unsigned int', but argument 7 has type 'pgprotval_t'
drivers/staging/android/binder.c:2659: warning: format '%lx' expects type 'long unsigned int', but argument 7 has type 'pgprotval_t'
drivers/staging/android/binder.c:2680: warning: format '%lx' expects type 'long unsigned int', but argument 7 has type 'pgprotval_t'

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-04-03 14:53:29 -07:00
Greg Kroah-Hartman d88dfb8dc4 Staging: android: fix up units in timed_gpio
The last build fix I did messed up the units of the sysfs file.

This puts them back to be milliseconds, like they originally were.


Thanks to Juha Motorsportcom for pointing this out.

Reported-by: Juha Motorsportcom <juha_motorsportcom@luukku.com>
Cc: Mike Lockwood <lockwood@android.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-02-09 11:26:18 -08:00
Arve Hjønnevåg 5701c0519b Staging: android: ram_console: Disable ECC when early init is enabled and validate buffer size
Signed-off-by: Arve Hjønnevåg <arve@android.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-02-09 11:26:18 -08:00
Oleg Nesterov 1176e83aff Staging: android: task_get_unused_fd_flags: fix the wrong usage of tsk->signal
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>
2009-01-28 15:49:05 -08:00
Arve Hjønnevåg 191805ac41 Staging: android: Add lowmemorykiller documentation.
Signed-off-by: Arve Hjønnevåg <arve@android.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-28 15:49:05 -08:00
Greg Kroah-Hartman 07960058f0 Staging: android: fix build error on 64bit boxes
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>
2009-01-28 15:49:05 -08:00
Arve Hjønnevåg 2d0db6bf50 Staging: android: timed_gpio: Fix build to build on kernels after 2.6.25.
Reported-by: Randy Dunlap <randy.dunlap@oracle.com>
Cc: Mike Lockwood <lockwood@android.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-28 15:49:05 -08:00
Arve Hjønnevåg c171ac36b7 Staging: android: binder: fix arm build errors
Reported-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-28 15:49:05 -08:00
Greg Kroah-Hartman 7a9c67a6ad Staging: android: binder: fix build errors
This fixes the build errors and warnings in the binder driver.  It can't
be a module, due to a lack of some of the symbols being exported.

Also added a MODULE_LICENSE(), as it was missing.

Cc: Arve Hjønnevåg <arve@android.com>
Cc: Brian Swetland <swetland@google.com>
Cc: Robert Love <rlove@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-06 13:52:46 -08:00
San Mehat 08b88cc784 Staging: android: add lowmemorykiller driver
From: San Mehat <san@android.com>
Cc: Brian Swetland <swetland@google.com>
Cc: Robert Love <rlove@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-06 13:52:45 -08:00
Greg Kroah-Hartman 1fa7026ff0 Staging: android: remove dummy android.c driver
There are files now in the drivers/staging/android/ directory, so the
dummy android.c file can be safely removed.

Cc: Robert Love <rlove@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-06 13:52:44 -08:00
Mike Lockwood 653d1290be Staging: android: timed_gpio: Rename android_timed_gpio to timed_gpio
Signed-off-by: Mike Lockwood <lockwood@android.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-06 13:52:43 -08:00
Mike Lockwood 99f41131b8 Staging: android: add timed_gpio driver
driver for GPIOs that turn back off after a delay

From: Mike Lockwood <lockwood@android.com>
Signed-off-by: Brian Swetland <swetland@google.com>
Cc: Robert Love <rlove@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-06 13:52:42 -08:00
Arve Hjønnevåg adc567e8a9 Staging: android: add ram_console driver
Doesn't quite link properly under all configurations, and it has way too
many different build options, but it's a start.

Signed-off-by: Arve Hjønnevåg <arve@android.com>
Signed-off-by: Brian Swetland <swetland@google.com>
Cc: Robert Love <rlove@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-06 13:52:42 -08:00
Robert Love 875f194c48 Staging: android: add logging driver
Signed-off-by: Robert Love <rlove@google.com>
Signed-off-by: Brian Swetland <swetland@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-06 13:52:42 -08:00
J.R. Mauro 9279bcc316 staging: android: binder: Fix use of euid
Task credentials were moved and must be accessed through task_struct.cred

Signed-off-by: J.R. Mauro <jrm8005@gmail.com>
Cc: Arve Hjønnevåg <arve@android.com>
Cc: Brian Swetland <swetland@google.com>
Cc: Robert Love <rlove@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-06 13:52:42 -08:00
J.R. Mauro a2bf2153cb Staging: android: binder: Fix gcc warnings about improper format specifiers for size_t in printk
Use the proper format specifiers for printing size_t values.

Signed-off-by: J.R. Mauro <jrm8005@gmail.com>
Cc: Arve Hjønnevåg <arve@android.com>
Cc: Brian Swetland <swetland@google.com>
Cc: Robert Love <rlove@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-06 13:52:41 -08:00
Arve Hjønnevåg 457b9a6f09 Staging: android: add binder driver
It builds, but not as a module, and with lots of warnings.

I also had to fix up a few syntax errors to get it to build
properly, I'm doubting that anyone has built it in a while :(

Signed-off-by: Arve Hjønnevåg <arve@android.com>
Signed-off-by: Brian Swetland <swetland@google.com>
Cc: Robert Love <rlove@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-06 13:52:41 -08:00
Greg Kroah-Hartman 6dc9c9e8b0 Staging: add android framework
This prepares us to start adding the android drivers
to the build.

The dummy android.c file will go away in the next few patches, as it
will not be needed once drivers/staging/android/ has a driver in it.

Cc: Robert Love <rlove@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-06 13:52:41 -08:00