Date: Sun, 3 Feb 2013 18:37:08 +0000 (UTC) From: Dmitry Chagin <dchagin@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r246292 - stable/9/sys/compat/linux Message-ID: <201302031837.r13Ib8wb087318@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: dchagin Date: Sun Feb 3 18:37:08 2013 New Revision: 246292 URL: http://svnweb.freebsd.org/changeset/base/246292 Log: MFC r245908: Arithmetic on pointers takes into account the size of the type. Properly cast the pointer to avoid incorrect pointer scaling. Modified: stable/9/sys/compat/linux/linux_futex.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/compat/linux/linux_futex.c ============================================================================== --- stable/9/sys/compat/linux/linux_futex.c Sun Feb 3 18:27:57 2013 (r246291) +++ stable/9/sys/compat/linux/linux_futex.c Sun Feb 3 18:37:08 2013 (r246292) @@ -1203,7 +1203,7 @@ release_futexes(struct proc *p) if (entry != pending) if (handle_futex_death(p, - (uint32_t *)entry + futex_offset, pi)) { + (uint32_t *)((caddr_t)entry + futex_offset), pi)) { LIN_SDT_PROBE0(futex, release_futexes, return); return; } @@ -1222,7 +1222,7 @@ release_futexes(struct proc *p) } if (pending) - handle_futex_death(p, (uint32_t *)pending + futex_offset, pip); + handle_futex_death(p, (uint32_t *)((caddr_t)pending + futex_offset), pip); LIN_SDT_PROBE0(futex, release_futexes, return); }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201302031837.r13Ib8wb087318>