From owner-svn-src-head@FreeBSD.ORG Sat Apr 5 16:54:48 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4866A49C; Sat, 5 Apr 2014 16:54:48 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::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 315166C8; Sat, 5 Apr 2014 16:54:48 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s35GsmBH082767; Sat, 5 Apr 2014 16:54:48 GMT (envelope-from dchagin@svn.freebsd.org) Received: (from dchagin@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s35GsmgT082766; Sat, 5 Apr 2014 16:54:48 GMT (envelope-from dchagin@svn.freebsd.org) Message-Id: <201404051654.s35GsmgT082766@svn.freebsd.org> From: Dmitry Chagin Date: Sat, 5 Apr 2014 16:54:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r264151 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 05 Apr 2014 16:54:48 -0000 Author: dchagin Date: Sat Apr 5 16:54:47 2014 New Revision: 264151 URL: http://svnweb.freebsd.org/changeset/base/264151 Log: Prevent alq from panic when the invalid alq_file path specified. MFC after: 1 week Modified: head/sys/kern/kern_alq.c Modified: head/sys/kern/kern_alq.c ============================================================================== --- head/sys/kern/kern_alq.c Sat Apr 5 16:38:27 2014 (r264150) +++ head/sys/kern/kern_alq.c Sat Apr 5 16:54:47 2014 (r264151) @@ -488,10 +488,12 @@ alq_open(struct alq **alqp, const char * KASSERT((count >= 0), ("%s: count < 0", __func__)); if (count > 0) { - ret = alq_open_flags(alqp, file, cred, cmode, size*count, 0); - (*alqp)->aq_flags |= AQ_LEGACY; - (*alqp)->aq_entmax = count; - (*alqp)->aq_entlen = size; + if ((ret = alq_open_flags(alqp, file, cred, cmode, + size*count, 0)) == 0) { + (*alqp)->aq_flags |= AQ_LEGACY; + (*alqp)->aq_entmax = count; + (*alqp)->aq_entlen = size; + } } else ret = alq_open_flags(alqp, file, cred, cmode, size, 0);