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); _______________________________________________ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"