Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp1816860imm; Thu, 23 Aug 2018 09:12:18 -0700 (PDT) X-Google-Smtp-Source: AA+uWPxSU8oWTL1p2FIDUT6EHh4VWdvpWe1ZSgRYoYNpKKzHieyPNFgwF5TT6chmdrPa/6fVMGGF X-Received: by 2002:a62:8913:: with SMTP id v19-v6mr63749837pfd.127.1535040738394; Thu, 23 Aug 2018 09:12:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1535040738; cv=none; d=google.com; s=arc-20160816; b=gifbPu/ICK3t+ffnUwVF8nHqkCNi7aTdGXQK0h5jFlnesRCkHbuLQQmQSOUohKaIDL 9zP3l8F74X02KaVXQWaxvdbuP1yhmFAI80d8ZLb6T1Oc+OO/8PZ+d4pIlWyRTpVGvQhf sAf+PavyT6FZvjiT7yOgr1Yid+rMrViqUtsAqhu+BwHAmaLmQNwjTyYQAUztWXfLlNto POjGIEiadby3vb4K5KHTAlY40t5pw3dKCbXL9iO9jNVvAaxAQpyyLB1ykmI9nGz7bs6+ yxPm8fH1zNGrUHTjm3Gj2yapVKM94cSNt891A9ivVEmtPHzdwGutG8hoPSue1GH/vi8s qAOA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :content-language:accept-language:in-reply-to:references:message-id :date:thread-index:thread-topic:subject:cc:to:from :arc-authentication-results; bh=3NJRzQWeMMQE/vfuBIeLKqXk5tXevxE90UsMPAMVKgw=; b=QdaU1PbFovBqvfE7rWi5pJ2On5+X7PcMeBn80kpLzXFJYGSxeXjzmMMK8eLYTwagaO vEhjwSy96PLgvzVQnj0vZT1YHNBue8rK7ZBxVIMC7cDy/Fjs9hRmb0S6dECVHl2u2v1x QALhQEsUReH8aSV241Wd+i3WjHfEFHKpWmLDVo5CMaiVGMSq0mI8OPVgfoNs5YUkxfKI CX8MK+1k3lf6NsL+VfdN32zAlUKfMhn58/P0XtdXvXttqoyPG1kmDY/OAnRrO/MRNb/t vQ3TKtgbfjVciOuZo0kF+n5O7i9AT/Np5RIVBX5GEwaoC4TvIeTqRqiZtHbkVbAeixWF PgYg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r69-v6si4686402pgr.634.2018.08.23.09.12.03; Thu, 23 Aug 2018 09:12:18 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731502AbeHWOvP convert rfc822-to-8bit (ORCPT + 99 others); Thu, 23 Aug 2018 10:51:15 -0400 Received: from eu-smtp-delivery-211.mimecast.com ([146.101.78.211]:32544 "EHLO eu-smtp-delivery-211.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729486AbeHWOvO (ORCPT ); Thu, 23 Aug 2018 10:51:14 -0400 Received: from AcuMS.aculab.com (156.67.243.126 [156.67.243.126]) (Using TLS) by eu-smtp-1.mimecast.com with ESMTP id uk-mta-21-ll2a5rXaNe2EUF83RZfEmQ-1; Thu, 23 Aug 2018 12:21:56 +0100 Received: from AcuMS.Aculab.com (fd9f:af1c:a25b:0:43c:695e:880f:8750) by AcuMS.aculab.com (fd9f:af1c:a25b:0:43c:695e:880f:8750) with Microsoft SMTP Server (TLS) id 15.0.1347.2; Thu, 23 Aug 2018 12:23:35 +0100 Received: from AcuMS.Aculab.com ([fe80::43c:695e:880f:8750]) by AcuMS.aculab.com ([fe80::43c:695e:880f:8750%12]) with mapi id 15.00.1347.000; Thu, 23 Aug 2018 12:23:35 +0100 From: David Laight To: 'Michal Hocko' , Weikang Shi CC: "akpm@linux-foundation.org" , "alexander.h.duyck@intel.com" , "vbabka@suse.cz" , "mgorman@suse.de" , "l.stach@pengutronix.de" , "vdavydov.dev@gmail.com" , "linux-mm@kvack.org" , "linux-kernel@vger.kernel.org" , "my_email@gmail.com" Subject: RE: [PATCH] fs: fix local var type Thread-Topic: [PATCH] fs: fix local var type Thread-Index: AQHUOtKgUsSAnLeal0y8ska0EIofcaTNMUuQ Date: Thu, 23 Aug 2018 11:23:35 +0000 Message-ID: References: <1535014754-31918-1-git-send-email-swkhack@gmail.com> <20180823111355.GD29735@dhcp22.suse.cz> In-Reply-To: <20180823111355.GD29735@dhcp22.suse.cz> Accept-Language: en-GB, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-exchange-transport-fromentityheader: Hosted x-originating-ip: [10.202.205.33] MIME-Version: 1.0 X-MC-Unique: ll2a5rXaNe2EUF83RZfEmQ-1 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8BIT Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Michal Hocko > Sent: 23 August 2018 12:14 > > On Thu 23-08-18 01:59:14, Weikang Shi wrote: > > In the seq_hex_dump function,the remaining variable is int, but it receive a type of size_t > argument. > > So I change the type of remaining > > The changelog should explain _why_ we need this fix. Is any of the code > path overflowing? > > Besides that I do not think this fix is complete. What about linelen? > > Why do we even need len to be size_t? Why it cannot be int as well. I > strongly doubt we need more than 32b here. Although you may well want 'unsigned int' to avoid the sign extension instruction that gets added for x86_64 when a signed int is added to a pointer. David - Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK Registration No: 1397386 (Wales)