From owner-svn-src-all@FreeBSD.ORG Sat Aug 15 03:01:04 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0266E1065696; Sat, 15 Aug 2009 03:01:03 +0000 (UTC) (envelope-from asmrookie@gmail.com) Received: from mail-fx0-f205.google.com (mail-fx0-f205.google.com [209.85.220.205]) by mx1.freebsd.org (Postfix) with ESMTP id 1EE2F8FC41; Sat, 15 Aug 2009 03:01:02 +0000 (UTC) Received: by fxm1 with SMTP id 1so1410736fxm.7 for ; Fri, 14 Aug 2009 20:01:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:received:in-reply-to :references:date:x-google-sender-auth:message-id:subject:from:to:cc :content-type:content-transfer-encoding; bh=ZRonFAq3aRIdt/oYZLYaRuYzS1/HRtDfP32g0xr++AU=; b=RqY9xyccdlDQX+IYVRQzUcwy83D8uQZ5IaPupl0hzziAU5pCl15rnmT+hXuOzXehxY 20gHli3AYNAssLuSU2iGxoHcKMuytyOiwDgXvIA3EjD3mqg9jVV6lrRGMvdqx1sqoxOf 4XF/Cu4DGdLHw8xtcwwzmoh9vbhiROJVaHM2U= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; b=I/+wtGQT4vJM5uIqLrG92e4wwjWClGyczz6hJn5/QB8EthDnZv9A1dLnSmoN02VUeE I/GHYiFl9RYQ8s6Yp49pcoKwXsczlsLAOrvAcUuEk+AxnHUOuR4g9IpmNoBpjlLlnpap KfZTE1HhgLKXw6owCNNs81K6llnJaJi5GOvuU= MIME-Version: 1.0 Sender: asmrookie@gmail.com Received: by 10.223.113.9 with SMTP id y9mr631359fap.61.1250303630020; Fri, 14 Aug 2009 19:33:50 -0700 (PDT) In-Reply-To: <200908142146.n7ELksKZ048760@svn.freebsd.org> References: <200908142146.n7ELksKZ048760@svn.freebsd.org> Date: Sat, 15 Aug 2009 04:33:49 +0200 X-Google-Sender-Auth: 62226973df3521b6 Message-ID: <3bbf2fe10908141933u91d0305jdc7301526adb69e2@mail.gmail.com> From: Attilio Rao To: "Bjoern A. Zeeb" Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r196226 - in head/sys: kern sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Aug 2009 03:01:04 -0000 2009/8/14 Bjoern A. Zeeb : > Author: bz > Date: Fri Aug 14 21:46:54 2009 > New Revision: 196226 > URL: http://svn.freebsd.org/changeset/base/196226 > > Log: > Add a new macro to test that a variable could be loaded atomically. > Check that the given variable is at most uintptr_t in size and that > it is aligned. > > Note: ASSERT_ATOMIC_LOAD() uses ALIGN() to check for adequate > alignment -- however, the function of ALIGN() is to guarantee > alignment, and therefore may lead to stronger alignment > enforcement than necessary for types that are smaller than > sizeof(uintptr_t). > > Add checks to mtx, rw and sx locks init functions to detect possible > breakage. This was used during debugging of the problem fixed with > r196118 where a pointer was on an un-aligned address in the dpcpu area. > > In collaboration with: rwatson > Reviewed by: rwatson > Approved by: re (kib) > > Modified: > head/sys/kern/kern_mutex.c > head/sys/kern/kern_rwlock.c > head/sys/kern/kern_sx.c > head/sys/sys/systm.h I think you should cover the lockmgr case too. Attilio -- Peace can only be achieved by understanding - A. Einstein