Date: Thu, 14 Jun 2012 15:35:14 +0000 (UTC) From: Pawel Jakub Dawidek <pjd@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r237076 - head/sys/kern Message-ID: <201206141535.q5EFZEbw003020@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: pjd Date: Thu Jun 14 15:35:14 2012 New Revision: 237076 URL: http://svn.freebsd.org/changeset/base/237076 Log: - Assert that the filedesc lock is being held when fdisused() is called. - Fix white spaces. MFC after: 1 month Modified: head/sys/kern/kern_descrip.c Modified: head/sys/kern/kern_descrip.c ============================================================================== --- head/sys/kern/kern_descrip.c Thu Jun 14 15:34:10 2012 (r237075) +++ head/sys/kern/kern_descrip.c Thu Jun 14 15:35:14 2012 (r237076) @@ -243,8 +243,10 @@ static int fdisused(struct filedesc *fdp, int fd) { - KASSERT(fd >= 0 && fd < fdp->fd_nfiles, - ("file descriptor %d out of range (0, %d)", fd, fdp->fd_nfiles)); + FILEDESC_LOCK_ASSERT(fdp); + + KASSERT(fd >= 0 && fd < fdp->fd_nfiles, + ("file descriptor %d out of range (0, %d)", fd, fdp->fd_nfiles)); return ((fdp->fd_map[NDSLOT(fd)] & NDBIT(fd)) != 0); }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201206141535.q5EFZEbw003020>