Date: Sat, 12 Apr 2014 06:50:11 +0000 (UTC) From: Dmitry Chagin <dchagin@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r264366 - stable/10/sys/kern Message-ID: <201404120650.s3C6oBuv087594@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: dchagin Date: Sat Apr 12 06:50:11 2014 New Revision: 264366 URL: http://svnweb.freebsd.org/changeset/base/264366 Log: MFC r264151: Prevent alq from panic when the invalid alq_file path specified. Modified: stable/10/sys/kern/kern_alq.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/kern/kern_alq.c ============================================================================== --- stable/10/sys/kern/kern_alq.c Sat Apr 12 06:49:10 2014 (r264365) +++ stable/10/sys/kern/kern_alq.c Sat Apr 12 06:50:11 2014 (r264366) @@ -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);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201404120650.s3C6oBuv087594>