From patchwork Thu Oct 20 15:06:45 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Petr Vorel X-Patchwork-Id: 6238 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4242:0:0:0:0:0 with SMTP id s2csp167863wrr; Thu, 20 Oct 2022 08:17:07 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5NeeE2FDoOFKkIblqUHXTtLGj2KjI4FVhTdkXzUUObNwQToA5ndfaesvESY0e+CI1WKWDb X-Received: by 2002:a05:6402:2744:b0:45c:9978:eae8 with SMTP id z4-20020a056402274400b0045c9978eae8mr12837711edd.361.1666279027594; Thu, 20 Oct 2022 08:17:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666279027; cv=none; d=google.com; s=arc-20160816; b=JDEZ4g8UKFpWlihj6uxk66FkoH7fclRrd5OEROZN38YGXz0DKoFpP//0nbDbQPf6Zw p3xvjFLsyOqcImaUbscf5UmIsJxXHnALmCw3mD+hj5/iNyJh+jCas/hrHE6Y4y5eW9j0 xtwVNA//1gUr692zlJFZwlxozAdMJnw9VeDXLboGTh68lTiK6cj9BUObbUbmvdWaE7S8 PE0xF5j/yK+41W+/wDKF4LfNPEIsacxrIDrkrsyocX+yy3Iy9qVyp8Xo8LkSN9wflwj8 obDRaRkmRZR0SjfrPeUdI6+ULk6w+Q61o2/aM/eI8cbQo7gelI2UuUTiDuEHBa4GccJK 0UOg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature:dkim-signature; bh=H9kD/H/leKyl4VkvwRs3GIyaKPOFO8lA1R3qMpLYsVw=; b=QDQcMMjyjyGLPfPUB8KbHwAYHLZP0Qbbe0UNsKdL31Om/H/kqroUwdnFl1BhGlY0zG TRG9HfG6lXT0zo6LhQqiaIDjhIlgFIL2uEd2Wk2/RYiYXrhQO9gWzOPt7ykfYiv8ZvOa Qp7mGnR3ZmDG1vDuDBlvYg2aldeXJOzqLZ/Yw27R3Afry/BpcFPF436SGztAoISdGy/t sMWnSdSUnWw0Xjh/C4psCfHVwbACo43oLOZnfvd9qepkmrkVOT2XD1kTdFoED+NO167a G+wAosrzrbTI8dbQQp5vzoQtQJN50oRo+fzpIQJxlPL3+NmVAqQTYVi/XygDhmjUgpLy wBOg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.cz header.s=susede2_rsa header.b=DHIwMul6; dkim=neutral (no key) header.i=@suse.cz; 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 Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id qw20-20020a1709066a1400b0078dad5e8d65si15549929ejc.68.2022.10.20.08.16.41; Thu, 20 Oct 2022 08:17:07 -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.cz header.s=susede2_rsa header.b=DHIwMul6; dkim=neutral (no key) header.i=@suse.cz; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229954AbiJTPHD (ORCPT + 99 others); Thu, 20 Oct 2022 11:07:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33050 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229810AbiJTPHC (ORCPT ); Thu, 20 Oct 2022 11:07:02 -0400 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5DE541BB96F for ; Thu, 20 Oct 2022 08:06:59 -0700 (PDT) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 85BE22295F; Thu, 20 Oct 2022 15:06:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1666278417; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=H9kD/H/leKyl4VkvwRs3GIyaKPOFO8lA1R3qMpLYsVw=; b=DHIwMul6gD4J3vnQypXyAniGcYTN5gjoWt2Mxyx0NwJo/BNBaGJnlvbVF1Q3BfAH5x3MjE 9yAQ7eJ3VUUBVU/xEBv9XSFlmqX1EH4SoaM509fatc/N1JBDQs1hpGkcz6Rf1zik+aVx6f PqES4wc1XPZNuM38EUUv920g1QcYPDo= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1666278417; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=H9kD/H/leKyl4VkvwRs3GIyaKPOFO8lA1R3qMpLYsVw=; b=iJbkLeb0Ajd59e9D7YTXkqU3TdCkwRriNLnT+ojzZcFPFW8xNM085LlX3BlX3Lc9vvZ+3k vjH+gIylyK9PShCg== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 4F5C513AF5; Thu, 20 Oct 2022 15:06:57 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id Z/wgERFkUWMJegAAMHmgww (envelope-from ); Thu, 20 Oct 2022 15:06:57 +0000 From: Petr Vorel To: linux-kernel@vger.kernel.org Cc: Petr Vorel , Andrew Morton , Greg Kroah-Hartman , Torsten Hilbrich Subject: [PATCH 1/1] kernel/utsname_sysctl.c: Add missing enum uts_proc value Date: Thu, 20 Oct 2022 17:06:45 +0200 Message-Id: <20221020150645.11719-1-pvorel@suse.cz> X-Mailer: git-send-email 2.38.0 MIME-Version: 1.0 X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED autolearn=ham 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1747220197672788570?= X-GMAIL-MSGID: =?utf-8?q?1747220197672788570?= bfca3dd3d068 added new struct ctl_table uts_kern_table[], but not new enum uts_proc value. It broke the notification mechanism between the sethostname syscall and the pollers of /proc/sys/kernel/hostname. The table uts_kern_table is addressed within uts_proc_notify by the enum value, that's why new enum value is needed. Fixes: bfca3dd3d068 ("kernel/utsname_sysctl.c: print kernel arch") Reported-by: Torsten Hilbrich Signed-off-by: Petr Vorel --- Hi all, I'm sorry to introduce a regression. Torsten Hilbrich reported [1] that hostnamectl set-hostname foo which does poll() got affected by bfca3dd3d068. He also wrote a reproducer [2] which does not require systemd, I tested the patch on dracut initramfs. Kind regards, Petr [1] https://lore.kernel.org/lkml/0c2b92a6-0f25-9538-178f-eee3b06da23f@secunet.com/ [2] https://lore.kernel.org/lkml/ec9e00b9-8b47-7918-c39b-8b0069003169@secunet.com/2-hostname-poll-test.c include/linux/utsname.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/linux/utsname.h b/include/linux/utsname.h index 2b1737c9b244..bf7613ba412b 100644 --- a/include/linux/utsname.h +++ b/include/linux/utsname.h @@ -10,6 +10,7 @@ #include enum uts_proc { + UTS_PROC_ARCH, UTS_PROC_OSTYPE, UTS_PROC_OSRELEASE, UTS_PROC_VERSION,