From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-18.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5B6B5C433DB for ; Mon, 18 Jan 2021 18:53:13 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 295D922CA2 for ; Mon, 18 Jan 2021 18:53:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2390630AbhARLk5 (ORCPT ); Mon, 18 Jan 2021 06:40:57 -0500 Received: from mail.kernel.org ([198.145.29.99]:33436 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2390269AbhARLht (ORCPT ); Mon, 18 Jan 2021 06:37:49 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 419D822BF3; Mon, 18 Jan 2021 11:36:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1610969819; bh=05DX630A9PR7Oe8hMyY9ck96ad9ymBtgx3IIv8RXasY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=F768+eqL4yKHu6w9kZE2ZcfNE6FuzZ9Qikr0IrG5tJuW8X2zdS9IGH+RnonTXp8AC A9G2StNgHE87p5dcPUAyM/h818x09+4OiwwjOTcyysawqpmH3+FXlS9kHUXgH+batl mn3+YCyc2szcB94jEmjzfifWkG2TsoZuiS729COw= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Nir Soffer , Mike Snitzer Subject: [PATCH 4.19 38/43] dm: eliminate potential source of excessive kernel log noise Date: Mon, 18 Jan 2021 12:35:01 +0100 Message-Id: <20210118113336.790087745@linuxfoundation.org> X-Mailer: git-send-email 2.30.0 In-Reply-To: <20210118113334.966227881@linuxfoundation.org> References: <20210118113334.966227881@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Mike Snitzer commit 0378c625afe80eb3f212adae42cc33c9f6f31abf upstream. There wasn't ever a real need to log an error in the kernel log for ioctls issued with insufficient permissions. Simply return an error and if an admin/user is sufficiently motivated they can enable DM's dynamic debugging to see an explanation for why the ioctls were disallowed. Reported-by: Nir Soffer Fixes: e980f62353c6 ("dm: don't allow ioctls to targets that don't map to whole devices") Signed-off-by: Mike Snitzer Signed-off-by: Greg Kroah-Hartman --- drivers/md/dm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/md/dm.c +++ b/drivers/md/dm.c @@ -515,7 +515,7 @@ static int dm_blk_ioctl(struct block_dev * subset of the parent bdev; require extra privileges. */ if (!capable(CAP_SYS_RAWIO)) { - DMWARN_LIMIT( + DMDEBUG_LIMIT( "%s: sending ioctl %x to DM device without required privilege.", current->comm, cmd); r = -ENOIOCTLCMD;