提交 bc41bb11 编写于 作者: B Bernd Schmidt 提交者: Bryan Wu

Blackfin arch: fix bug libstdc++ calling writev with an iovec containing {...

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: NBernd Schmidt <bernd.schmidt@analog.com>
Signed-off-by: NBryan Wu <bryan.wu@analog.com>
上级 ef4a47db
......@@ -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))
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册