From owner-svn-src-stable@freebsd.org Sat Jul 29 11:27:56 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 223C1DC1C5D; Sat, 29 Jul 2017 11:27:56 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E362768FD5; Sat, 29 Jul 2017 11:27:55 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v6TBRtAa022709; Sat, 29 Jul 2017 11:27:55 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v6TBRtD7022708; Sat, 29 Jul 2017 11:27:55 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201707291127.v6TBRtD7022708@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Sat, 29 Jul 2017 11:27:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r321683 - stable/11/sys/boot/zfs X-SVN-Group: stable-11 X-SVN-Commit-Author: mav X-SVN-Commit-Paths: stable/11/sys/boot/zfs X-SVN-Commit-Revision: 321683 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 29 Jul 2017 11:27:56 -0000 Author: mav Date: Sat Jul 29 11:27:54 2017 New Revision: 321683 URL: https://svnweb.freebsd.org/changeset/base/321683 Log: MFC r314504 (by tsoome): loader: r314112 did introduce dereference freed pointer entry CID: 1371675 Reported by: Coverity Differential Revision: https://reviews.freebsd.org/D9846 Modified: stable/11/sys/boot/zfs/zfsimpl.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/boot/zfs/zfsimpl.c ============================================================================== --- stable/11/sys/boot/zfs/zfsimpl.c Sat Jul 29 10:31:57 2017 (r321682) +++ stable/11/sys/boot/zfs/zfsimpl.c Sat Jul 29 11:27:54 2017 (r321683) @@ -2217,7 +2217,7 @@ zfs_lookup(const struct zfsmount *mount, const char *u char path[1024]; int symlinks_followed = 0; struct stat sb; - struct obj_list *entry; + struct obj_list *entry, *tentry; STAILQ_HEAD(, obj_list) on_cache = STAILQ_HEAD_INITIALIZER(on_cache); spa = mount->spa; @@ -2365,7 +2365,7 @@ zfs_lookup(const struct zfsmount *mount, const char *u *dnode = dn; done: - STAILQ_FOREACH(entry, &on_cache, entry) + STAILQ_FOREACH_SAFE(entry, &on_cache, entry, tentry) free(entry); return (rc); }