Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 360701
b: refs/heads/master
c: f45655f
h: refs/heads/master
i:
  360699: 4c7f252
v: v3
  • Loading branch information
Heiko Carstens authored and Martin Schwidefsky committed Feb 28, 2013
1 parent 241d797 commit d9d3f7f
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: d7b788cd06a3080ebf0b2f5f2e008d4fda2b336e
refs/heads/master: f45655f6a65538237359abce55edab9cfcc6d82f
2 changes: 2 additions & 0 deletions trunk/arch/s390/lib/uaccess_mvcos.c
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,8 @@ static size_t strncpy_from_user_mvcos(size_t count, const char __user *src,
{
size_t done, len, offset, len_str;

if (unlikely(!count))
return 0;
done = 0;
do {
offset = (size_t)src & ~PAGE_MASK;
Expand Down
4 changes: 4 additions & 0 deletions trunk/arch/s390/lib/uaccess_pt.c
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,8 @@ static size_t strnlen_user_pt(size_t count, const char __user *src)
unsigned long offset, done, len, kaddr;
size_t len_str;

if (unlikely(!count))
return 0;
if (segment_eq(get_fs(), KERNEL_DS))
return strnlen((const char __kernel __force *) src, count) + 1;
done = 0;
Expand Down Expand Up @@ -202,6 +204,8 @@ static size_t strncpy_from_user_pt(size_t count, const char __user *src,
{
size_t n = strnlen_user_pt(count, src);

if (unlikely(!count))
return 0;
if (!n)
return -EFAULT;
if (n > count)
Expand Down
2 changes: 2 additions & 0 deletions trunk/arch/s390/lib/uaccess_std.c
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,8 @@ size_t strnlen_user_std(size_t size, const char __user *src)
register unsigned long reg0 asm("0") = 0UL;
unsigned long tmp1, tmp2;

if (unlikely(!size))
return 0;
asm volatile(
" la %2,0(%1)\n"
" la %3,0(%0,%1)\n"
Expand Down

0 comments on commit d9d3f7f

Please sign in to comment.