Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752175AbdCSREF (ORCPT ); Sun, 19 Mar 2017 13:04:05 -0400 Received: from mail-wm0-f54.google.com ([74.125.82.54]:36211 "EHLO mail-wm0-f54.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751490AbdCSREE (ORCPT ); Sun, 19 Mar 2017 13:04:04 -0400 MIME-Version: 1.0 From: Arkady Date: Sun, 19 Mar 2017 18:30:33 +0200 X-Google-Sender-Auth: B-UV6gYa1GboBkIlc7dujdPZBGE Message-ID: Subject: Re: [PATCH v6 2/8] debugfs: prevent access to removed files' private data To: linux-kernel@vger.kernel.org Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 450 Lines: 13 Nicolai, Regarding the debugfs_create_file() which ignores .mmap field in the struct file_operations. The patch is a part of the kernel 4.8 in the Ubuntu 16.10 and breaks quite a few online code examples of mmap drivers. Is is acceptable to replace the debugfs_create_file() by a macro and fail the compilation if the .mmap field is not initialized. Alternatively debugfs_create_file() can return an error if .mmap is not NULL. Thank you, Arkady.