From owner-cvs-src@FreeBSD.ORG Wed Jun 22 15:20:12 2005 Return-Path: X-Original-To: cvs-src@FreeBSD.org Delivered-To: cvs-src@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0049316A41C; Wed, 22 Jun 2005 15:20:11 +0000 (GMT) (envelope-from jhb@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id E21FF43D48; Wed, 22 Jun 2005 15:20:11 +0000 (GMT) (envelope-from jhb@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id j5MFKBLV045465; Wed, 22 Jun 2005 15:20:11 GMT (envelope-from jhb@repoman.freebsd.org) Received: (from jhb@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id j5MFKBKd045464; Wed, 22 Jun 2005 15:20:11 GMT (envelope-from jhb) Message-Id: <200506221520.j5MFKBKd045464@repoman.freebsd.org> From: John Baldwin Date: Wed, 22 Jun 2005 15:20:11 +0000 (UTC) To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org X-FreeBSD-CVS-Branch: HEAD Cc: Subject: cvs commit: src/lib/libdevinfo devinfo.c X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Jun 2005 15:20:12 -0000 jhb 2005-06-22 15:20:11 UTC FreeBSD src repository Modified files: lib/libdevinfo devinfo.c Log: Clear devinfo_generation in devinfo_free() since we are freeing all of the cached state. Otherwise, a subsequent call to devinfo_init() would succeed without reading the device tree from the kernel thinking that the cached state was up to date since the generation count was the same. However, since the cached state was actually free'd, attempts to examine the tree after the second devinfo_init() would fail. Reported by: Juho Vuori juho dot vuori at kepa dot fi Submitted by: Stefan Farfeleder stefan at fafoe dot narf dot at Approved by: re (dwhite) MFC after: 1 week Revision Changes Path 1.8 +1 -0 src/lib/libdevinfo/devinfo.c