From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753194AbdBUWzr (ORCPT ); Tue, 21 Feb 2017 17:55:47 -0500 Received: from ipmail04.adl6.internode.on.net ([150.101.137.141]:14814 "EHLO ipmail04.adl6.internode.on.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753076AbdBUWzj (ORCPT ); Tue, 21 Feb 2017 17:55:39 -0500 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A2DXFgBuxKxYEFkELHleHAEBBAEBCgEBg1GBaocGh0+PdgEBAQEBAQaBIoxOhBOCRIQchhwEAgKCcFgBAgEBAQEBAgYBAQEBAQEBAThEhHEBBTocIxAIAxgJJQ8FJQMHGhOJYQyxTYs+AQEIAgElIIVnhTSICIIxAQScC5ISgXCPLEiSXVaBASAUCBcVhT6BXCw1ijoBAQE Date: Wed, 22 Feb 2017 09:55:34 +1100 From: Dave Chinner To: Elena Reshetova Cc: linux-kernel@vger.kernel.org, linux-xfs@vger.kernel.org, peterz@infradead.org, gregkh@linuxfoundation.org, darrick.wong@oracle.com, Hans Liljestrand , Kees Cook , David Windsor Subject: Re: [PATCH 1/7] fs, xfs: convert xfs_bui_log_item.bui_refcount from atomic_t to refcount_t Message-ID: <20170221225534.GB23007@dastard> References: <1487692147-17066-1-git-send-email-elena.reshetova@intel.com> <1487692147-17066-2-git-send-email-elena.reshetova@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1487692147-17066-2-git-send-email-elena.reshetova@intel.com> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Feb 21, 2017 at 05:49:01PM +0200, Elena Reshetova wrote: > refcount_t type and corresponding API should be > used instead of atomic_t when the variable is used as > a reference counter. This allows to avoid accidental > refcounter overflows that might lead to use-after-free > situations. I'm missing something: how do you overflow a log item object reference count? Cheers, Dave. -- Dave Chinner david@fromorbit.com