Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp4316884rwl; Mon, 3 Apr 2023 03:15:02 -0700 (PDT) X-Google-Smtp-Source: AKy350b5GZSESPzojChyACp+CNMBFNqZz27q8mwOcV/MKi+qGK72sJDnz9jMx7ID4zjwmFq/r5Td X-Received: by 2002:aa7:c958:0:b0:502:a700:dd35 with SMTP id h24-20020aa7c958000000b00502a700dd35mr1431754edt.36.1680516902693; Mon, 03 Apr 2023 03:15:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680516902; cv=none; d=google.com; s=arc-20160816; b=P+txQMNjNnP4eFtZjsM7Vo/RRIpiR9IQaXQgZiRYH+nYKz40v3mj8WlgKOpN0kdJFv Wut21R5Iacqf1fkSDer23z0VdtUmdnHwyk5Q/zK3WsU1R6NaGT62aZvBRxv3kspK/fQw 3+9b5gJL5mf4kzwOBj56O+DCrfJMD1kONwk0ClInN10veNEgMlO5qsXIINfGFKZ4aGrG KFCSwgkSf3SApAIlOhw2KbyGMMc/J3vyOtu1d6qyrfssMTFZvhczVwKPYMUROxWGrkwl gidilMzd4aa2M8aTh7OG3CKUhYRHo0vfss8Goy+nKUErzQFHBLULowYtcG1RVztswd7l RnvQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=xbObzrBiu/3J+HRWhbDJAlmKtsqOAYeDKL1pxG4gwAM=; b=dEbpgplM59LMxrHLdHtbeyVln01EnVSL9pO4fL0HmztDIFua2Z82BQQawArsvZhoWv xUNFvAVUVnmpDhumjJhhnvsKPI+/pTzInt+gfT4/q0QHHU2AJkMxnaU46rU2yEYCjcpW jSgC0c380jhNQuroFezgusnU9EvHBbRC/lY6hKWoKFGbNUlNAVQ0z/SD1bTtpaHO5F2i CSAVC/R27juyyo471o98gtNfdzeRL67BFjihx+zWWxM/878oZtMgd/veOaqTG7XlLvU2 nxHqIMnIOoAXGWaSZ0973tEZWhs2gZfivTmC8853NegfBp2llc/O35qdSGuQxEEm6Tga 85mw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.com header.s=susede1 header.b=QNq1btEr; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=suse.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id a7-20020aa7d907000000b004fcecd85fe7si2857927edr.77.2023.04.03.03.14.36; Mon, 03 Apr 2023 03:15:02 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.com header.s=susede1 header.b=QNq1btEr; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=suse.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230090AbjDCJ76 (ORCPT + 99 others); Mon, 3 Apr 2023 05:59:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47758 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231990AbjDCJ74 (ORCPT ); Mon, 3 Apr 2023 05:59:56 -0400 Received: from smtp-out1.suse.de (smtp-out1.suse.de [IPv6:2001:67c:2178:6::1c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0256CC5 for ; Mon, 3 Apr 2023 02:59:55 -0700 (PDT) Received: from relay2.suse.de (relay2.suse.de [149.44.160.134]) by smtp-out1.suse.de (Postfix) with ESMTP id B003421B45; Mon, 3 Apr 2023 09:59:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1680515993; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=xbObzrBiu/3J+HRWhbDJAlmKtsqOAYeDKL1pxG4gwAM=; b=QNq1btEr3YyK71tHUjgES5O8xDsMRwvLHZLlO50FFy+FJSV0qEfITRcXdED3CJhEViegYK tYOfZ6i0AH0WC2iEynmItXC8Zfgn9Apmfg9tzhA1KbTrDAxg1C0FuMwM32in9MauwRd7zl SUNKGrs0mJh3h9NOFRjZoRZMFU0X9Rw= Received: from suse.cz (unknown [10.100.208.146]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by relay2.suse.de (Postfix) with ESMTPS id 7C3602C15D; Mon, 3 Apr 2023 09:59:51 +0000 (UTC) Date: Mon, 3 Apr 2023 11:59:50 +0200 From: Petr Mladek To: Stanislav Kinsburskii Cc: Stanislav Kinsburskii , Sergey Senozhatsky , Steven Rostedt , John Ogness , linux-kernel@vger.kernel.org Subject: Re: [PATCH] printk: Remove obsoleted check for non-existent "user" object Message-ID: References: <167929571877.2810.9926967619100618792.stgit@skinsburskii.localdomain> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <167929571877.2810.9926967619100618792.stgit@skinsburskii.localdomain> X-Spam-Status: No, score=-2.5 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon 2023-03-20 00:02:01, Stanislav Kinsburskii wrote: > From: Stanislav Kinsburskii > > The original check for non-null "user" object was introduced by commit > e11fea92e13f ("kmsg: export printk records to the /dev/kmsg interface") when > "user" could be NULL if /dev/ksmg was opened for writing. > > Subsequent change 750afe7babd1 ("printk: add kernel parameter to control > writes to /dev/kmsg") made "user" context required for files opened for write, > but didn't remove now redundant checks for it to be non-NULL. > > This patch removes the dead code while preserving the current logic. > > Signed-off-by: Stanislav Kinsburskii Yup, it looks safe. Reviewed-by: Petr Mladek Best Regards, Petr