Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1032791AbdI0Ath (ORCPT ); Tue, 26 Sep 2017 20:49:37 -0400 Received: from mail-by2nam01on0053.outbound.protection.outlook.com ([104.47.34.53]:65182 "EHLO NAM01-BY2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1030619AbdI0Atf (ORCPT ); Tue, 26 Sep 2017 20:49:35 -0400 Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Yuri.Norov@cavium.com; Date: Wed, 27 Sep 2017 03:49:18 +0300 From: Yury Norov To: Andrew Morton , Al Viro , linux-kernel@vger.kernel.org Subject: Re: [PATCH] IPC: fix put_compat_shm_info() Message-ID: <20170927004918.j5tgulqial4f67zh@yury-thinkpad> References: <20170927003254.17604-1-ynorov@caviumnetworks.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170927003254.17604-1-ynorov@caviumnetworks.com> User-Agent: NeoMutt/20170113 (1.7.2) X-Originating-IP: [176.59.118.21] X-ClientProxiedBy: DB6PR0801CA0066.eurprd08.prod.outlook.com (2603:10a6:4:2b::34) To MWHPR0701MB3833.namprd07.prod.outlook.com (2603:10b6:301:7f::26) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 6444f2b4-b926-442e-9809-08d505419ea8 X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(22001)(2017030254152)(2017052603199)(201703131423075)(201703031133081)(201702281549075);SRVR:MWHPR0701MB3833; X-Microsoft-Exchange-Diagnostics: 1;MWHPR0701MB3833;3:w+Xy2XvUiZeUcZ0eKFeTdywtVAyqWAlKijRjCgo+HkpO4no+bf41ySv/qrBcrEvCHRpV3sK9PLmbLziu/JgoFQa1MpjytAzb9HkIBr5n25Ypzh2gjoRgTAT+EThcmS0CB4Ugb1MWCvqwHLScZGIB8saGBVv95t7DcNKuHrflPJr5oT5tIYVgQ545mPaJP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niwuLMYuvqa4it3pxZ9G7etNG8mCv9adHLulkysDgWJs4J8XXL/9rhia/xzkcyRsOGpliyVyoykFEoaaOi5pv6eB+gUo5MaiOfrwz+youLY1eYzN/ADYKIRdHDBjok2MoKyQg8052R1Vh5E4TYD1iXCBJkMSnRVHcDdDHeKQReXPhGbNXOOHY6WLdhMWn4GDnLXntrYNvPd1xgihqVkhdXnUwHSEj/r/lm//juxb3Du/SMOw4Z7HIUP88Z9dUN599zypxKScwNFrv4=;4:iBRIbyeuSoM1fLMX30VBTToAsfCnVJWZcDVSD88D742YBiL8T5BIkLXQ5Fr36QGV9T1jmi6eOupR82fGOkX//9sbnntRUmoCzM1aTRi0gU3yPxQJZZJ0a0wraI8RxTKOZOLg+3Bce5xu37E1J7J3+kOO115ZMhskVsaYjP/KOdWiqI/RGwieRN7lG0jLCRlxTI25PnmrGkfHetGEk50UKQ2OJKGRaMg32g701sBTXfEtJGAphnXeGtU+m/DzeYJm X-Exchange-Antispam-Report-Test: UriScan:; X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(2401047)(8121501046)(5005006)(100000703101)(100105400095)(3002001)(93006095)(10201501046)(6041248)(20161123558100)(20161123560025)(20161123564025)(20161123555025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123562025)(6072148)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095);SRVR:MWHPR0701MB3833;BCL:0;PCL:0;RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095);SRVR:MWHPR0701MB3833; X-Forefront-PRVS: 04433051BF X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10009020)(6069001)(6009001)(7916004)(346002)(376002)(199003)(189002)(24454002)(478600001)(101416001)(8676002)(72206003)(5660300001)(2950100002)(42882006)(25786009)(8936002)(68736007)(106356001)(1076002)(23726003)(3846002)(81156014)(6116002)(81166006)(33646002)(76506005)(105586002)(316002)(6486002)(16526017)(16586007)(229853002)(50466002)(33716001)(97736004)(110136005)(58126008)(47776003)(189998001)(6666003)(66066001)(53936002)(6496005)(9686003)(6246003)(83506001)(54356999)(76176999)(50986999)(305945005)(7736002)(2906002);DIR:OUT;SFP:1101;SCL:1;SRVR:MWHPR0701MB3833;H:localhost;FPR:;SPF:None;PTR:InfoNoRecords;A:1;MX:1;LANG:en; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1;MWHPR0701MB3833;23:zuyswBmeoOKL12lLC9I5EMXJ6DVXredV0CGotYK?= =?us-ascii?Q?YznmjbBQn2qfWmZzUvqwN+oQdsGDGtF7yBaMQWp5tdTmfYe6Z/X28Q2Qdc4t?= =?us-ascii?Q?uh7r08U/J+rV96l06OPrlWWetaZ5oSpzkfYoULl5S4dPblaoj6JfYVUGlFCd?= =?us-ascii?Q?9Ps7bLDN84usf7kWAF8DqTpnQJ05mIMJKCS9q6J7OHe2Nd8NmRzd/0j5/DBX?= =?us-ascii?Q?xXrV8juxd9quu+6W9PCFXEvhU/zC3Afi30lKbxpx5DpzT5BEf/p+nLhiRu2x?= =?us-ascii?Q?l3Ab5sfmXjxSv+4idUViugafxw3hKSwfvYJxCFQ5AkVfS8WXuwEhqtjvveQT?= =?us-ascii?Q?Y1RidLmwbsQDjq/KcWk6CIZRL8959HPj0u2whKgsfK0ngrbZRVgBcfJWD4P4?= =?us-ascii?Q?978zuy/oqq7SKWeuijCTOVDCuabD/b/nm79bfjFpDBtqXzdYIE5bxJpj/iai?= =?us-ascii?Q?BzCc1Bd1hBW7D098qPo2ajISEBivlOwuZXoSNt6A9xHmEwhvbZBaihdNOWsn?= =?us-ascii?Q?n/pjUsaKCXe6vUF+OHYebnBdcZ0GiCzL0rgxTbzrYji7eZGmkzQS57CkqmFD?= =?us-ascii?Q?QXQFIHE5QNfYaQDiLhAqhNzgSlXZUrom4v+fm2yh6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GpjmGYR6kWn4fPolp/wTDnEDOn2Q/RSD8x9MMq8LLOrMRjTOrjx14uzguVr+v8qFROLVQTe7Om/7Suo43/ORF1LI3p7Q==;5:7a0ZpgRdM5so4+fY+7L3n8SBTbPOeneC5SrgLVhNWw/WAzrfAv7fbTD9/R7DuG50iQ5TfC3l+Dmi1rFTSEekOyGmVwBMJlV5ZVvyfTvfUGXFymiUAQ0aglhRDtq18pzpFKYxCInPiRmK8LPutobd/g==;24:DizkDvr37Rh8bm1+03PWPlpLcRlCe5bgr6KupmQxB14LXK7fQW8bVC7IF6v0BIBB9Eo9V6fhEAOztls0vZgHAfD7qLWDAbMNYEtiZspOfXk=;7:+3nb0K/lm8l3vaVbUw6fFeHA1Xnz6Rc0S7W/aqb+WSMXVM5y57dEsjBI05nHBs7oHSYbcbILiaYoJzbxLjNXTRKks29gsbMf8Qcxb4Lq5wXy8zDKiIsfNzOi/ZzuMfhj2LO2o+Z2YGXd4va9ePojJnrmZkxBtyg0AiGJ+9zNXnh9N9IRNQ725IRds9ZDxKRti87KtBTGfRCyllfMTrf6I1PftMqqbS0UFFqI9huhy6w= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 Sep 2017 00:49:32.8624 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 711e4ccf-2e9b-4bcf-a551-4094005b6194 X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR0701MB3833 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 989 Lines: 30 On Wed, Sep 27, 2017 at 03:32:54AM +0300, Yury Norov wrote: > There's a typo in put_compat_shm_info() - the first argument > of copy_to_user() is 'up' instead of 'uip'. And 'up' is > occasionly a suitable variable name so the compiler doesn't > complain. > > Signed-off-by: Yury Norov Ah, I just pulled latest sources and found it already fixed. Please forget. > --- > ipc/shm.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/ipc/shm.c b/ipc/shm.c > index 1e2b1692ba2c..badac463e2c8 100644 > --- a/ipc/shm.c > +++ b/ipc/shm.c > @@ -1154,7 +1154,7 @@ static int put_compat_shm_info(struct shm_info *ip, > info.shm_swp = ip->shm_swp; > info.swap_attempts = ip->swap_attempts; > info.swap_successes = ip->swap_successes; > - return copy_to_user(up, &info, sizeof(info)); > + return copy_to_user(uip, &info, sizeof(info)); > } > > static int copy_compat_shmid_to_user(void __user *buf, struct shmid64_ds *in, > -- > 2.11.0