Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752101AbdCCJHS (ORCPT ); Fri, 3 Mar 2017 04:07:18 -0500 Received: from mga05.intel.com ([192.55.52.43]:27410 "EHLO mga05.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751578AbdCCJHN (ORCPT ); Fri, 3 Mar 2017 04:07:13 -0500 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.35,236,1484035200"; d="scan'208";a="1117935823" From: Elena Reshetova To: linux-kernel@vger.kernel.org Cc: linux-fsdevel@vger.kernel.org, peterz@infradead.org, gregkh@linuxfoundation.org, miklos@szeredi.hu, Elena Reshetova Subject: [PATCH 0/3] fs, fuse subsystem refcount conversions Date: Fri, 3 Mar 2017 11:04:02 +0200 Message-Id: <1488531845-23463-1-git-send-email-elena.reshetova@intel.com> X-Mailer: git-send-email 2.7.4 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1193 Lines: 29 Now when new refcount_t type and API are finally merged (see include/linux/refcount.h), the following patches convert various refcounters in the fuse filesystem from atomic_t to refcount_t. By doing this we prevent intentional or accidental underflows or overflows that can led to use-after-free vulnerabilities. The below patches are fully independent and can be cherry-picked separately. Since we convert all kernel subsystems in the same fashion, resulting in about 300 patches, we have to group them for sending at least in some fashion to be manageable. Please excuse the long cc list. These patches have been tested using tests supplied with libfuse. Not sure if this is the right way to test it. No output or failures with result to refcount conversions. refcount WARNs were on. Elena Reshetova (3): fs, fuse: convert fuse_file.count from atomic_t to refcount_t fs, fuse: convert fuse_req.count from atomic_t to refcount_t fs, fuse: convert fuse_conn.count from atomic_t to refcount_t fs/fuse/dev.c | 10 +++++----- fs/fuse/file.c | 8 ++++---- fs/fuse/fuse_i.h | 7 ++++--- fs/fuse/inode.c | 6 +++--- 4 files changed, 16 insertions(+), 15 deletions(-) -- 2.7.4