From owner-svn-src-all@freebsd.org Mon Jan 8 16:09:11 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E46D8E74A3C; Mon, 8 Jan 2018 16:09:11 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (br1.CN84in.dnsmgr.net [69.59.192.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A005F824ED; Mon, 8 Jan 2018 16:09:11 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (localhost [127.0.0.1]) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3) with ESMTP id w08G99DU022352; Mon, 8 Jan 2018 08:09:09 -0800 (PST) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: (from freebsd@localhost) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3/Submit) id w08G9941022351; Mon, 8 Jan 2018 08:09:09 -0800 (PST) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <201801081609.w08G9941022351@pdx.rh.CN85.dnsmgr.net> Subject: Re: svn commit: r327699 - head/sys/sys In-Reply-To: <201801081554.w08FsUvX058393@repo.freebsd.org> To: "Pedro F. Giffuni" Date: Mon, 8 Jan 2018 08:09:08 -0800 (PST) CC: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Reply-To: rgrimes@freebsd.org X-Mailer: ELM [version 2.4ME+ PL121h (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 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: Mon, 08 Jan 2018 16:09:12 -0000 > Author: pfg > Date: Mon Jan 8 15:54:29 2018 > New Revision: 327699 > URL: https://svnweb.freebsd.org/changeset/base/327699 > > Log: > Revert r327697: > malloc(9): drop the __result_use_check attribute for the kernel allocator. > > My bad: __result_use_check just checks the for the general and we always > want to make sure allocated memory is used, not only checked for nullness. > > Add it to reallocf since that was missing. Please try not to combine a revert with an add, it makes it messy to try and figure out things in the future when only the svn log is being used to analyze stuff as digging in mail archives becomes painful. Revert, then commit the add standalone, is the better sequence in this type of situation. > > Modified: > head/sys/sys/malloc.h > > Modified: head/sys/sys/malloc.h > ============================================================================== > --- head/sys/sys/malloc.h Mon Jan 8 15:41:49 2018 (r327698) > +++ head/sys/sys/malloc.h Mon Jan 8 15:54:29 2018 (r327699) > @@ -176,7 +176,7 @@ void *contigmalloc(unsigned long size, struct malloc_t > __alloc_size(1) __alloc_align(6); > void free(void *addr, struct malloc_type *type); > void *malloc(unsigned long size, struct malloc_type *type, int flags) > - __malloc_like __alloc_size(1); > + __malloc_like __result_use_check __alloc_size(1); > void *mallocarray(size_t nmemb, size_t size, struct malloc_type *type, > int flags) __malloc_like __result_use_check > __alloc_size(1) __alloc_size(2); > @@ -187,9 +187,9 @@ void malloc_type_freed(struct malloc_type *type, unsig > void malloc_type_list(malloc_type_list_func_t *, void *); > void malloc_uninit(void *); > void *realloc(void *addr, unsigned long size, struct malloc_type *type, > - int flags) __alloc_size(2); > + int flags) __result_use_check __alloc_size(2); > void *reallocf(void *addr, unsigned long size, struct malloc_type *type, > - int flags) __alloc_size(2); > + int flags) __result_use_check __alloc_size(2); > > struct malloc_type *malloc_desc2type(const char *desc); > #endif /* _KERNEL */ > > -- Rod Grimes rgrimes@freebsd.org