Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S941589AbcKQSCt convert rfc822-to-8bit (ORCPT ); Thu, 17 Nov 2016 13:02:49 -0500 Received: from mga03.intel.com ([134.134.136.65]:46314 "EHLO mga03.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S941410AbcKQSCi (ORCPT ); Thu, 17 Nov 2016 13:02:38 -0500 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.31,506,1473145200"; d="scan'208";a="32595764" From: "Reshetova, Elena" To: Peter Zijlstra CC: David Windsor , Kees Cook , Greg KH , Will Deacon , Arnd Bergmann , Thomas Gleixner , "Ingo Molnar" , "H. Peter Anvin" , LKML , Alexei Starovoitov , Daniel Borkmann Subject: RE: [RFC][PATCH 2/7] kref: Add kref_read() Thread-Topic: [RFC][PATCH 2/7] kref: Add kref_read() Thread-Index: AQHSPp8xNqFGs6lR9EeBqDMncz0eH6DZp9cAgAAIWACAANc8gIAA3lqAgACT3QCAAOQVAIAAQc2AgAADroCAAACTUIAACisAgAAmZoCAACeygA== Date: Thu, 17 Nov 2016 18:02:33 +0000 Message-ID: <2236FBA76BA1254E88B949DDB74E612B41C142E6@IRSMSX102.ger.corp.intel.com> References: <20161114174446.486581399@infradead.org> <20161115073322.GC28248@kroah.com> <20161115080314.GD3142@twins.programming.kicks-ass.net> <20161116100925.GM3142@twins.programming.kicks-ass.net> <20161117083458.GZ3142@twins.programming.kicks-ass.net> <20161117124339.GC3117@twins.programming.kicks-ass.net> <2236FBA76BA1254E88B949DDB74E612B41C14089@IRSMSX102.ger.corp.intel.com> <20161117132206.GE3117@twins.programming.kicks-ass.net> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [163.33.239.182] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 576 Lines: 13 > Even if we now find all occurrences of atomic_t used as refcounter > (which we cannot actually guarantee in any case unless someone > manually reads every line) and convert it to refcount_t, we still have > atomic_t type present and new usage of it as refount will crawl in. It > is just a matter of time IMO. >Improve tooling. The patterns shouldn't be _that_ hard to find. Once the tools are good, new code isn't a problem either. Moreover, thinking of out of tree drivers: you think they would always do checkpatch or run some of our tools for security checks?