diff options
author | Bernd Schmidt <bernd.schmidt@analog.com> | 2007-10-10 05:54:19 -0400 |
---|---|---|
committer | Bryan Wu <bryan.wu@analog.com> | 2007-10-10 05:54:19 -0400 |
commit | bc41bb11654f7fbb8cae2d316a7c2ac5ebf759d2 (patch) | |
tree | 00ed385f85322c42e9fcca6511de7f79716b7785 /arch/blackfin | |
parent | ef4a47db52cd8c15b5de07a318e5758d2f1e1bb9 (diff) |
Blackfin arch: fix bug libstdc++ calling writev with an iovec containing { NULL, 0 } fails on Blackfin
Fix a problem reported in the forums - libstdc++ can call writev with an
iovec containing { NULL, 0 }, which works fine on i686-linux, but fails on
Blackfin. Fixed by allowing size 0 transfers to/from userspace regardless
of the address.
Signed-off-by: Bernd Schmidt <bernd.schmidt@analog.com>
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
Diffstat (limited to 'arch/blackfin')
-rw-r--r-- | arch/blackfin/kernel/process.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/blackfin/kernel/process.c b/arch/blackfin/kernel/process.c index de7d048bd4ee..9124467651c4 100644 --- a/arch/blackfin/kernel/process.c +++ b/arch/blackfin/kernel/process.c | |||
@@ -395,7 +395,8 @@ void finish_atomic_sections (struct pt_regs *regs) | |||
395 | #if defined(CONFIG_ACCESS_CHECK) | 395 | #if defined(CONFIG_ACCESS_CHECK) |
396 | int _access_ok(unsigned long addr, unsigned long size) | 396 | int _access_ok(unsigned long addr, unsigned long size) |
397 | { | 397 | { |
398 | 398 | if (size == 0) | |
399 | return 1; | ||
399 | if (addr > (addr + size)) | 400 | if (addr > (addr + size)) |
400 | return 0; | 401 | return 0; |
401 | if (segment_eq(get_fs(), KERNEL_DS)) | 402 | if (segment_eq(get_fs(), KERNEL_DS)) |