Bug 200991 - [patch] do not assert that the new rtentry mutex is not initialized
Summary: [patch] do not assert that the new rtentry mutex is not initialized
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: CURRENT
Hardware: Any Any
: --- Affects Only Me
Assignee: freebsd-bugs (Nobody)
URL:
Keywords: patch
Depends on:
Blocks:
 
Reported: 2015-06-20 12:19 UTC by luke.tw
Modified: 2016-09-22 18:28 UTC (History)
3 users (show)

See Also:
cem: mfc-stable10-


Attachments
rtentry lock patch (561 bytes, patch)
2015-06-20 12:19 UTC, luke.tw
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description luke.tw 2015-06-20 12:19:22 UTC
Created attachment 157895 [details]
rtentry lock patch

Similar to r277489, do not assert that the new rtentry mutex is not initialized. The backing memory contains garbage and might trigger the assertion.
Comment 1 commit-hook freebsd_committer freebsd_triage 2016-08-01 23:08:00 UTC
A commit references this bug:

Author: cem
Date: Mon Aug  1 23:07:32 UTC 2016
New revision: 303651
URL: https://svnweb.freebsd.org/changeset/base/303651

Log:
  rtentry: Initialize rt_mtx with MTX_NEW

  The "rtentry" zone does not use UMA_ZONE_ZINIT, so it is invalid to assume the
  mutex's memory will be zero.  Without MTX_NEW, garbage backing memory may
  trigger the "re-initializing a mutex" assertion.

  PR:		200991
  Submitted by:	Chang-Hsien Tsai <luke.tw AT gmail.com>

Changes:
  head/sys/net/route.h
Comment 2 Conrad Meyer freebsd_committer freebsd_triage 2016-08-01 23:08:39 UTC
Thanks!