Skip to content

Commit

Permalink
Blackfin arch: fix bug libstdc++ calling writev with an iovec contain…
Browse files Browse the repository at this point in the history
…ing { 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>
  • Loading branch information
Bernd Schmidt authored and Bryan Wu committed Oct 10, 2007
1 parent ef4a47d commit bc41bb1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion arch/blackfin/kernel/process.c
Original file line number Diff line number Diff line change
Expand Up @@ -395,7 +395,8 @@ void finish_atomic_sections (struct pt_regs *regs)
#if defined(CONFIG_ACCESS_CHECK)
int _access_ok(unsigned long addr, unsigned long size)
{

if (size == 0)
return 1;
if (addr > (addr + size))
return 0;
if (segment_eq(get_fs(), KERNEL_DS))
Expand Down

0 comments on commit bc41bb1

Please sign in to comment.