Re: svn commit: r326808 - head/sys/kern
Should be fixed in r326824. On Wed, Dec 13, 2017 at 1:58 PM, Fedor Uporovwrote: > Hi, Andrew. > > Thanks for report, I know about the issue. > Just, need to get back home to my laptop to fix it. > Need 2-4 hours. > > On Wed, Dec 13, 2017 at 1:46 PM, Andrew Turner > wrote: > >> >> > On 12 Dec 2017, at 20:15, Fedor Uporov wrote: >> > >> > Author: fsu >> > Date: Tue Dec 12 20:15:57 2017 >> > New Revision: 326808 >> > URL: https://svnweb.freebsd.org/changeset/base/326808 >> > >> > Log: >> > Move buffer size checks outside of the vnode locks. >> > >> > Reviewed by:kib, cem, pfg (mentor) >> > Approved by:pfg (mentor) >> > MFC after: 1 weeks >> > >> > Differential Revision:https://reviews.freebsd.org/D13405 >> >> This breaks the build when MAC is undefined, e.g. the armv7 GENERIC >> kernel. >> >> /usr/home/andrew/freebsd/repo/head-svn/sys/kern/vfs_extattr.c:201:1: >> error: unused label 'done' [-Werror,-Wunused-label] >> done: >> ^ >> /usr/home/andrew/freebsd/repo/head-svn/sys/kern/vfs_extattr.c:376:1: >> error: unused label 'done' [-Werror,-Wunused-label] >> done: >> ^ >> /usr/home/andrew/freebsd/repo/head-svn/sys/kern/vfs_extattr.c:677:1: >> error: unused label 'done' [-Werror,-Wunused-label] >> done: >> ^ >> 3 errors generated. >> >> Andrew >> >> > ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r326808 - head/sys/kern
Hi, Andrew. Thanks for report, I know about the issue. Just, need to get back home to my laptop to fix it. Need 2-4 hours. On Wed, Dec 13, 2017 at 1:46 PM, Andrew Turnerwrote: > > > On 12 Dec 2017, at 20:15, Fedor Uporov wrote: > > > > Author: fsu > > Date: Tue Dec 12 20:15:57 2017 > > New Revision: 326808 > > URL: https://svnweb.freebsd.org/changeset/base/326808 > > > > Log: > > Move buffer size checks outside of the vnode locks. > > > > Reviewed by:kib, cem, pfg (mentor) > > Approved by:pfg (mentor) > > MFC after: 1 weeks > > > > Differential Revision:https://reviews.freebsd.org/D13405 > > This breaks the build when MAC is undefined, e.g. the armv7 GENERIC kernel. > > /usr/home/andrew/freebsd/repo/head-svn/sys/kern/vfs_extattr.c:201:1: > error: unused label 'done' [-Werror,-Wunused-label] > done: > ^ > /usr/home/andrew/freebsd/repo/head-svn/sys/kern/vfs_extattr.c:376:1: > error: unused label 'done' [-Werror,-Wunused-label] > done: > ^ > /usr/home/andrew/freebsd/repo/head-svn/sys/kern/vfs_extattr.c:677:1: > error: unused label 'done' [-Werror,-Wunused-label] > done: > ^ > 3 errors generated. > > Andrew > > ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r326808 - head/sys/kern
> On 12 Dec 2017, at 20:15, Fedor Uporovwrote: > > Author: fsu > Date: Tue Dec 12 20:15:57 2017 > New Revision: 326808 > URL: https://svnweb.freebsd.org/changeset/base/326808 > > Log: > Move buffer size checks outside of the vnode locks. > > Reviewed by:kib, cem, pfg (mentor) > Approved by:pfg (mentor) > MFC after: 1 weeks > > Differential Revision:https://reviews.freebsd.org/D13405 This breaks the build when MAC is undefined, e.g. the armv7 GENERIC kernel. /usr/home/andrew/freebsd/repo/head-svn/sys/kern/vfs_extattr.c:201:1: error: unused label 'done' [-Werror,-Wunused-label] done: ^ /usr/home/andrew/freebsd/repo/head-svn/sys/kern/vfs_extattr.c:376:1: error: unused label 'done' [-Werror,-Wunused-label] done: ^ /usr/home/andrew/freebsd/repo/head-svn/sys/kern/vfs_extattr.c:677:1: error: unused label 'done' [-Werror,-Wunused-label] done: ^ 3 errors generated. Andrew ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r326808 - head/sys/kern
Author: fsu Date: Tue Dec 12 20:15:57 2017 New Revision: 326808 URL: https://svnweb.freebsd.org/changeset/base/326808 Log: Move buffer size checks outside of the vnode locks. Reviewed by:kib, cem, pfg (mentor) Approved by:pfg (mentor) MFC after: 1 weeks Differential Revision:https://reviews.freebsd.org/D13405 Modified: head/sys/kern/vfs_extattr.c Modified: head/sys/kern/vfs_extattr.c == --- head/sys/kern/vfs_extattr.c Tue Dec 12 20:02:48 2017(r326807) +++ head/sys/kern/vfs_extattr.c Tue Dec 12 20:15:57 2017(r326808) @@ -167,6 +167,9 @@ extattr_set_vp(struct vnode *vp, int attrnamespace, co ssize_t cnt; int error; + if (nbytes > IOSIZE_MAX) + return (EINVAL); + error = vn_start_write(vp, , V_WAIT | PCATCH); if (error) return (error); @@ -177,10 +180,6 @@ extattr_set_vp(struct vnode *vp, int attrnamespace, co auio.uio_iov = auio.uio_iovcnt = 1; auio.uio_offset = 0; - if (nbytes > IOSIZE_MAX) { - error = EINVAL; - goto done; - } auio.uio_resid = nbytes; auio.uio_rw = UIO_WRITE; auio.uio_segflg = UIO_USERSPACE; @@ -330,6 +329,9 @@ extattr_get_vp(struct vnode *vp, int attrnamespace, co size_t size, *sizep; int error; + if (nbytes > IOSIZE_MAX) + return (EINVAL); + vn_lock(vp, LK_SHARED | LK_RETRY); /* @@ -346,10 +348,6 @@ extattr_get_vp(struct vnode *vp, int attrnamespace, co auio.uio_iov = auio.uio_iovcnt = 1; auio.uio_offset = 0; - if (nbytes > IOSIZE_MAX) { - error = EINVAL; - goto done; - } auio.uio_resid = nbytes; auio.uio_rw = UIO_READ; auio.uio_segflg = UIO_USERSPACE; @@ -638,6 +636,9 @@ extattr_list_vp(struct vnode *vp, int attrnamespace, v ssize_t cnt; int error; + if (nbytes > IOSIZE_MAX) + return (EINVAL); + vn_lock(vp, LK_EXCLUSIVE | LK_RETRY); auiop = NULL; @@ -649,10 +650,6 @@ extattr_list_vp(struct vnode *vp, int attrnamespace, v auio.uio_iov = auio.uio_iovcnt = 1; auio.uio_offset = 0; - if (nbytes > IOSIZE_MAX) { - error = EINVAL; - goto done; - } auio.uio_resid = nbytes; auio.uio_rw = UIO_READ; auio.uio_segflg = UIO_USERSPACE; ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"