Bug 206224 - bv_cnt is sometimes examined without holding the bufobj lock
Summary: bv_cnt is sometimes examined without holding the bufobj lock
Status: New
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: CURRENT
Hardware: Any Any
: --- Affects Only Me
Assignee: freebsd-bugs mailing list
URL:
Keywords: patch
Depends on:
Blocks:
 
Reported: 2016-01-14 04:13 UTC by Ravi Pokala
Modified: 2016-01-17 01:05 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ravi Pokala 2016-01-14 04:13:44 UTC
While looking at other stuff, a colleague found that bv_cnt was sometimes looked at without the corresponding bufobj being locked.
Comment 1 Ravi Pokala 2016-01-14 04:35:26 UTC
Proposed patch on Phabricator: https://reviews.freebsd.org/D4931
Comment 2 commit-hook freebsd_committer 2016-01-17 01:05:21 UTC
A commit references this bug:

Author: rpokala
Date: Sun Jan 17 01:04:20 UTC 2016
New revision: 294200
URL: https://svnweb.freebsd.org/changeset/base/294200

Log:
  [PR 206224] bv_cnt is sometimes examined without holding the bufobj lock

  Add locking around access to bv_cnt which is currently being done unlocked

  PR:		206224
  Reviewed by:	imp
  Approved by:	jhb
  MFC after:	1 week
  Sponsored by:	Panasas, Inc.
  Differential Revision:	https://reviews.freebsd.org/D4931

Changes:
  head/sys/fs/nandfs/nandfs_segment.c