From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.8 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7C1EAC433FF for ; Thu, 8 Aug 2019 07:52:55 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 4F419217D7 for ; Thu, 8 Aug 2019 07:52:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731724AbfHHHwy (ORCPT ); Thu, 8 Aug 2019 03:52:54 -0400 Received: from mx1.redhat.com ([209.132.183.28]:54284 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731635AbfHHHwx (ORCPT ); Thu, 8 Aug 2019 03:52:53 -0400 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 79E08C08EC07; Thu, 8 Aug 2019 07:52:53 +0000 (UTC) Received: from gondolin (dhcp-192-181.str.redhat.com [10.33.192.181]) by smtp.corp.redhat.com (Postfix) with ESMTP id 1E74519C69; Thu, 8 Aug 2019 07:52:51 +0000 (UTC) Date: Thu, 8 Aug 2019 09:52:49 +0200 From: Cornelia Huck To: Chuhong Yuan Cc: Christian Borntraeger , Janosch Frank , David Hildenbrand , Heiko Carstens , Vasily Gorbik , linux-s390@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 2/2] s390/mm: Use refcount_t for refcount Message-ID: <20190808095249.4fc40eb1.cohuck@redhat.com> In-Reply-To: <20190808071826.6649-1-hslester96@gmail.com> References: <20190808071826.6649-1-hslester96@gmail.com> Organization: Red Hat GmbH MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.31]); Thu, 08 Aug 2019 07:52:53 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 8 Aug 2019 15:18:26 +0800 Chuhong Yuan wrote: > Reference counters are preferred to use refcount_t instead of > atomic_t. > This is because the implementation of refcount_t can prevent > overflows and detect possible use-after-free. > So convert atomic_t ref counters to refcount_t. > > Signed-off-by: Chuhong Yuan > --- > arch/s390/include/asm/gmap.h | 4 +++- > arch/s390/mm/gmap.c | 10 +++++----- > 2 files changed, 8 insertions(+), 6 deletions(-) Reviewed-by: Cornelia Huck