From patchwork Thu Feb 29 16:30:08 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luis Henriques X-Patchwork-Id: 208409 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:2097:b0:108:e6aa:91d0 with SMTP id gs23csp521241dyb; Thu, 29 Feb 2024 08:33:25 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCUiVqup5kVYcdEkvfqzQHIrdixGyZiZITAFpHoOylQyAprpbXUKVY4je6iKkzs6erxWSL8KnzOA1itvrGK+VhqLQj3cGg== X-Google-Smtp-Source: AGHT+IEyIfgMh48zzS7vUZCzpr5ETpFQ6loNCXrKpheSTIcJwCbXSuicmO5IW6ROhDnj1dXfqeLE X-Received: by 2002:a05:6102:284f:b0:472:54a1:4c5a with SMTP id az15-20020a056102284f00b0047254a14c5amr2414570vsb.18.1709224405094; Thu, 29 Feb 2024 08:33:25 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709224405; cv=pass; d=google.com; s=arc-20160816; b=hNoZcm5Uxkm694rAKGHg1Iv/O2ySrBOXVAUXFwgVMrUZ3xHWKciiEzxcOIVdIbm9fA VnB1S5KWgyRPRC334dQKIf4Im/VAkXri/KUZoIpyL4F8tuB8z5lHRiqVl7pFIAT4Wfew 58gb/pKwlNCnC3zHKKm6gBkgklgrUEWXgc457wW9rV7zxpsCTOtRJT1j0czyv6Cvw71/ IRAjBc6YFhpCXRFPWselJe/D17j3Ty/5eyw/cAWAJGj8U8XzlLtP5KZDTRu7cgo7U4RH gJfViXEGclty9YvMoKG+sZ2N/FqC2tyOHls9KjoYNvLRBA0fS9JIwSO8CVbZrbf1kRbo u1lA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from; bh=GzDIoIzg2qxCxOoijDvz5f8DbHu2S6EY+M5uaRRkgWg=; fh=jGdaoZ9f8fxaZ4S3XMcGs4Y5Dr6Ro1lg3HBgLAvBHb8=; b=M18jVFWYzGcJhhjWoKVjEWzWeKUSmWvxaKwVfkimZjQJfwUWNcOQZTuvCRqNQRT+23 iTxEA51PZSwXRjRu5k1/ex0BPmhHsMe1QWVq/U3WUcjcSRRSiOjrriSCN7+0Sf34Fkgl YGXuExl5+P+aUjvbJTOYtMQc/OH+8+epegECxwZ6/WLlAP4lpAXBKs0JBCwzfGVAJsI3 Vn+RmOE9WmwLKTzUevf/eu+bIpQI/o9dOO1nFpTq1cEbRyrs+ezK9DmrLJ0netnvWpvG eGNu1yUQbXXddW7t2J+UuCpuM2Jw6Yazke2TNAmy8a0nhf9cNnz3o765r8g8y38SRMaz LXvg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=suse.de dmarc=pass fromdomain=suse.de); spf=pass (google.com: domain of linux-kernel+bounces-87088-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-87088-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=suse.de Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id h19-20020a0561023d9300b0046ec92a654fsi290822vsv.778.2024.02.29.08.33.24 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 29 Feb 2024 08:33:25 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-87088-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=suse.de dmarc=pass fromdomain=suse.de); spf=pass (google.com: domain of linux-kernel+bounces-87088-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-87088-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=suse.de Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id D9C8E1C2355A for ; Thu, 29 Feb 2024 16:33:24 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 618577A12D; Thu, 29 Feb 2024 16:30:21 +0000 (UTC) Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.223.130]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id CD41663B9; Thu, 29 Feb 2024 16:30:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=195.135.223.130 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709224219; cv=none; b=J9LAZXBiqWpmHfiXOdGz9P4WjMjUnniMyWa1x94z9PDBSck8HyKkIZR+UM0VFIsieHo0liDjUAqAWxhwLWrrS5AvBYteghLKifXCP1L7eZzKnhWaY8nKEMHOXla/DHnqExbsiXvgKIDPb4VE0ujOrwN91S4pB+EkWsMIh4tSu4Q= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709224219; c=relaxed/simple; bh=Xk9XcUV/m/3qcxL2T7wAJKSjMepPVZ/pH5SeAdJs0Ps=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=Bze0lyIMrz2HfK5K/SP8NxAoMjq0TeCiXtmbDWtKvYytYgmuUB3XZ8dLZGF7nIdjVOjL3kl4eBmQAiov3TPdOOTyBR6t6H/e8O+WKLm4nJqn4CKaNfUYu853odRD48/saBgpETPnxY83syKC31IpcDCIfjqB6c2txjX3OrS+Dg8= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de; spf=pass smtp.mailfrom=suse.de; arc=none smtp.client-ip=195.135.223.130 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.de Received: from imap1.dmz-prg2.suse.org (imap1.dmz-prg2.suse.org [IPv6:2a07:de40:b281:104:10:150:64:97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id E036C21FD4; Thu, 29 Feb 2024 16:30:15 +0000 (UTC) Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id 2150613A8B; Thu, 29 Feb 2024 16:30:15 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap1.dmz-prg2.suse.org with ESMTPSA id wNTjBBex4GU0PwAAD6G6ig (envelope-from ); Thu, 29 Feb 2024 16:30:15 +0000 Received: from localhost (brahms.olymp [local]) by brahms.olymp (OpenSMTPD) with ESMTPA id aac9d32e; Thu, 29 Feb 2024 16:30:14 +0000 (UTC) From: Luis Henriques To: Theodore Ts'o , Andreas Dilger , Alexander Viro , Christian Brauner , Jan Kara , Miklos Szeredi , Amir Goldstein Cc: linux-ext4@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-unionfs@vger.kernel.org, linux-kernel@vger.kernel.org, Luis Henriques Subject: [PATCH 1/3] fs_parser: handle parameters that can be empty and don't have a value Date: Thu, 29 Feb 2024 16:30:08 +0000 Message-ID: <20240229163011.16248-2-lhenriques@suse.de> In-Reply-To: <20240229163011.16248-1-lhenriques@suse.de> References: <20240229163011.16248-1-lhenriques@suse.de> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Spam-Level: Authentication-Results: smtp-out1.suse.de; none X-Rspamd-Server: rspamd2.dmz-prg2.suse.org X-Spamd-Result: default: False [-4.00 / 50.00]; REPLY(-4.00)[] X-Spam-Score: -4.00 X-Rspamd-Queue-Id: E036C21FD4 X-Spam-Flag: NO X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1792251690199317541 X-GMAIL-MSGID: 1792251690199317541 Currently, only parameters that have the fs_parameter_spec 'type' set to NULL are handled as 'flag' types. However, parameters that have the 'fs_param_can_be_empty' flag set and their value is NULL should also be handled as 'flag' type, as their type is set to 'fs_value_is_flag'. Signed-off-by: Luis Henriques Signed-off-by: Christian Brauner --- fs/fs_parser.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/fs/fs_parser.c b/fs/fs_parser.c index edb3712dcfa5..53f6cb98a3e0 100644 --- a/fs/fs_parser.c +++ b/fs/fs_parser.c @@ -119,7 +119,8 @@ int __fs_parse(struct p_log *log, /* Try to turn the type we were given into the type desired by the * parameter and give an error if we can't. */ - if (is_flag(p)) { + if (is_flag(p) || + (!param->string && (p->flags & fs_param_can_be_empty))) { if (param->type != fs_value_is_flag) return inval_plog(log, "Unexpected value for '%s'", param->key); From patchwork Thu Feb 29 16:30:09 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luis Henriques X-Patchwork-Id: 208411 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:2097:b0:108:e6aa:91d0 with SMTP id gs23csp526329dyb; Thu, 29 Feb 2024 08:41:26 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCXDzC+CupoYwkbv1zA+SHpgOtPlZx1yfcxk+6t+uOQLbNCqEnahIkK4c8V3ZcvslwuZlVyoANE1lPm1o5J/U47M0qz0rg== X-Google-Smtp-Source: AGHT+IF2D5MsRrpctQ4HjROBqbr+RrXzy7uBtfcxvuUhV1YAbO4VB1eMkKVER+rOklQAfC9UMEGO X-Received: by 2002:a05:6e02:dee:b0:365:a941:1b7d with SMTP id m14-20020a056e020dee00b00365a9411b7dmr2666165ilj.18.1709224886442; Thu, 29 Feb 2024 08:41:26 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709224886; cv=pass; d=google.com; s=arc-20160816; b=TyykZthE38spXZwg2z30rI+ir7ICww2hXv22oZcK/txrSFZg8gRNPlaV3ff5rX/5v9 6eKlCLawvalDiRo+eEiDv9iCJPXKXrl3ycGUYIx4fS7LJzlERCW0XnYBwyqUz4dWk3Ys V1fTBicgO9IXWlLK2tMJtsylK0q6f8+v6VNstPpRXWTChNDUOqMNPE1ihsAaf4VAFq7z hjkUKPXuUdnG7xMUmLQ7ITHBKXNBDNz3OqDrXIGfrZ+tTELNXel9A4DcE2QUzk2Hq3BB hLyQAi7Qu/K+tkPicbATNwQzpZhFhJyv5kO93AZ5A11BDxEQETGYY5zCRE5l+4R5hSyW 8Xvg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from; bh=S35D1OR+mA1m+N+6brm0O8P0hi0mWzDKaobaBOcjjrg=; fh=jGdaoZ9f8fxaZ4S3XMcGs4Y5Dr6Ro1lg3HBgLAvBHb8=; b=yDMWGrqFtPxZtTqgPcitVArFyqcxRWOP+NFnYzYqVt75ZXe3QQRoI2EkOfQu6TFqRJ V90GU+T+r54j8DSvSdBYOZ37ddVyPS6FBfrd9tOrZECNciiJJ5B4K2B8OYNLgZcbsjoD CLRFEwnP9/isQMWnSXyB43wBG3EA+VBE6Vv3SCFDyyT1MUpHHyTda9b3Bt9WmUcwKgDS m+/TFED+fc0kUViVWx7cry2w6NvfgzzApeFgcZ78nGBhxXZnS/9F144FH0tmRIR7grgo EVlVex4WWUJ373oHMfUCP3wrNkQTMZZaagJlwHX++Mhu4pNJMxwHNYw2Ug79ED8LYAyk zn3A==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=suse.de dmarc=pass fromdomain=suse.de); spf=pass (google.com: domain of linux-kernel+bounces-87089-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-87089-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=suse.de Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id b7-20020a056a000cc700b006e584551d6bsi1688211pfv.258.2024.02.29.08.41.26 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 29 Feb 2024 08:41:26 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-87089-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=suse.de dmarc=pass fromdomain=suse.de); spf=pass (google.com: domain of linux-kernel+bounces-87089-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-87089-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=suse.de Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id DAD6928BD01 for ; Thu, 29 Feb 2024 16:33:38 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id C1F2F7A13B; Thu, 29 Feb 2024 16:30:21 +0000 (UTC) Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.223.130]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7D8FA160638; Thu, 29 Feb 2024 16:30:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=195.135.223.130 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709224220; cv=none; b=hBPv59AVeJOSCvrXCS0lIzE9e1rdEnAInjRJE4Kc+HI5O9xDN2zPnt2N3KmPnZ7RuS11p9nbzeRG+UI1LBuKNBJEcUu/RI7xCeTKHm9iyQoVOYRGm3EX3kJMmvB2EmwOZJyCg9jugxDlLNopWyi1FeY607WjFEVuLkmjBds2A80= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709224220; c=relaxed/simple; bh=vTk9qY7Ap4iFsr2Q/nS6b1xXOiZqaEGYtgbyecVJ1DA=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=q9RA8N867OCZN485wPgnbFg9UUjtqoKbz6+PdKT2hqIME4z2MheIq/8rKYQmmXJSGkBSXllNOezjo/7LmhkxxFC+Q1f9I5QzsZaPsj0bfedfdVlQQe7vKbwFKLxnpDUpc8SagBlGWaiI0VarGRL1J8n1yyaob/TF51lxEi25DZw= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de; spf=pass smtp.mailfrom=suse.de; arc=none smtp.client-ip=195.135.223.130 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.de Received: from imap1.dmz-prg2.suse.org (imap1.dmz-prg2.suse.org [IPv6:2a07:de40:b281:104:10:150:64:97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id C35BD21E07; Thu, 29 Feb 2024 16:30:16 +0000 (UTC) Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id 0355813A4B; Thu, 29 Feb 2024 16:30:15 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap1.dmz-prg2.suse.org with ESMTPSA id MMIpORex4GU0PwAAD6G6ig (envelope-from ); Thu, 29 Feb 2024 16:30:15 +0000 Received: from localhost (brahms.olymp [local]) by brahms.olymp (OpenSMTPD) with ESMTPA id 71ffe845; Thu, 29 Feb 2024 16:30:14 +0000 (UTC) From: Luis Henriques To: Theodore Ts'o , Andreas Dilger , Alexander Viro , Christian Brauner , Jan Kara , Miklos Szeredi , Amir Goldstein Cc: linux-ext4@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-unionfs@vger.kernel.org, linux-kernel@vger.kernel.org, Luis Henriques Subject: [PATCH 2/3] ext4: fix mount parameters check for empty values Date: Thu, 29 Feb 2024 16:30:09 +0000 Message-ID: <20240229163011.16248-3-lhenriques@suse.de> In-Reply-To: <20240229163011.16248-1-lhenriques@suse.de> References: <20240229163011.16248-1-lhenriques@suse.de> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Spam-Level: Authentication-Results: smtp-out1.suse.de; none X-Rspamd-Server: rspamd2.dmz-prg2.suse.org X-Spamd-Result: default: False [-4.00 / 50.00]; REPLY(-4.00)[] X-Spam-Score: -4.00 X-Rspamd-Queue-Id: C35BD21E07 X-Spam-Flag: NO X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1792252194676708737 X-GMAIL-MSGID: 1792252194676708737 Now that parameters that have the flag 'fs_param_can_be_empty' set and their value is NULL are handled as 'flag' type, we need to properly check for empty (NULL) values. Signed-off-by: Luis Henriques --- fs/ext4/super.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fs/ext4/super.c b/fs/ext4/super.c index 0f931d0c227d..44ba2212dfb3 100644 --- a/fs/ext4/super.c +++ b/fs/ext4/super.c @@ -2183,12 +2183,12 @@ static int ext4_parse_param(struct fs_context *fc, struct fs_parameter *param) switch (token) { #ifdef CONFIG_QUOTA case Opt_usrjquota: - if (!*param->string) + if (!param->string) return unnote_qf_name(fc, USRQUOTA); else return note_qf_name(fc, USRQUOTA, param); case Opt_grpjquota: - if (!*param->string) + if (!param->string) return unnote_qf_name(fc, GRPQUOTA); else return note_qf_name(fc, GRPQUOTA, param); From patchwork Thu Feb 29 16:30:10 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luis Henriques X-Patchwork-Id: 208410 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:2097:b0:108:e6aa:91d0 with SMTP id gs23csp521547dyb; Thu, 29 Feb 2024 08:33:52 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCVfl6NRh6E7L8blLlQnJRDCXyjuMeRR1scwoC6hg/HX4SGFfzgE4Hx8cnjElzQ+SZ4m/CnzCBAG7/HwL4vNtWjmcbct6A== X-Google-Smtp-Source: AGHT+IGCT0+aT2q4vyFUVL2fUMt2q0ZVym9serZUEXG3atOnYgb8n5JSKpcSB9/RwEZnXbgOSTa2 X-Received: by 2002:a1f:d946:0:b0:4d3:35ac:3553 with SMTP id q67-20020a1fd946000000b004d335ac3553mr2733883vkg.10.1709224432661; Thu, 29 Feb 2024 08:33:52 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709224432; cv=pass; d=google.com; s=arc-20160816; b=SCGC1i/zWmjuOq/lOmPF8ozV7w6zsgGAlCdqDFhLheJB22I9eNT1N3sVHn6/EPa6/5 Qiw7eUhdKtDzV6eQjBlP7+V8DqapzJLel8B0GmLbprgTHrTSfrTxb/0J49zzMpW7d1uu 6X2/xNzviFa6AumBOwK/w4vr3yNqN2PwnXH8NBZn6JUzCFvs88xLjykUOyoyp141UYDN orM7OlBcXhSG4Jr3uYDerNv3VDoC4Rd2wujF5ZHWICajfb+xpSsUrtKCvvoE5H9rLX2s SUYZ1zDI7fOkQO0bWKK/c9PEBBflZ3epNCyfc6UtiuT9l1dREW7rKUckmp7p8mCWekKy ganw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from; bh=jLvHQVGDVDaZj/+IzGodoOjcGc/wj7OEewe/zHwFSCc=; fh=jGdaoZ9f8fxaZ4S3XMcGs4Y5Dr6Ro1lg3HBgLAvBHb8=; b=L701VsICXec+2HzQLia94Yqcg0bwz6Bx8wup+f7ujqxADMwdDYppBhpOdnQ/anPKZ4 ll+mOKyg8ZI5PZQNxQ6vRTKyPz2kkATRPJZYLEdkHB6+z86RDD2X7GvSw7vnYiXPpCWB CxDg8vlYm81gg3J0tnhqlB9PSBm2b89N2rgCX+//piLietXgaTV4aQssPdLcDNCf7vIN zSDatTQy6uE7+P8oM8pFSpYQuG6rJeYzrsbOOylC167yKihbd/jEpy7Kca2Mf5Gy+CVn zk8AjpLGkwCaOYN6IGat0ae2QnDfXOs1Qhxux7hhSwWbPew9HE2XOhLLuG3FbPX5Mv7r HAow==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=suse.de dmarc=pass fromdomain=suse.de); spf=pass (google.com: domain of linux-kernel+bounces-87090-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-87090-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=suse.de Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id o36-20020a05612217a400b004c02adabbdbsi299964vkf.295.2024.02.29.08.33.52 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 29 Feb 2024 08:33:52 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-87090-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=suse.de dmarc=pass fromdomain=suse.de); spf=pass (google.com: domain of linux-kernel+bounces-87090-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-87090-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=suse.de Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 571451C235CB for ; Thu, 29 Feb 2024 16:33:52 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 98DD513441A; Thu, 29 Feb 2024 16:30:22 +0000 (UTC) Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.223.130]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 74A1E381B0; Thu, 29 Feb 2024 16:30:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=195.135.223.130 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709224221; cv=none; b=lsF24aMoUe1awThDe0rxMPxaGCbqUkphiBAFU83JXSpF6R3hXjNQymk+p85QTGCMQsNXCQQXBoz7lVmjSVmDavlwPcoSOCLwJFhGMNg//soa7fttdjJC15vCAbx+UN0vV/YHGzj4UZFV8mYl0HmtIZ4AD8p2dlA2YdUleGtl0KI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709224221; c=relaxed/simple; bh=6/KrjLjKH3bauC/9VQHcqfuKTv2YG01tiR8gHwzXGeM=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=R7t78A9Rgy+56mEwEI0BXEbRdNzBjOnyFifnt3nC2YBcMfOnhD1Wpp8aaepujSZKFq3ScCG/GZH8hn20tsgmI7vPtJpQFQyGmEy7rRLPMsQlLmSclex/v9qIXz1XCAT+Dop4l94QYdknK0cyM8Xy64UfeQbE3yNQ5Jf7QnmOeDE= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de; spf=pass smtp.mailfrom=suse.de; arc=none smtp.client-ip=195.135.223.130 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.de Received: from imap1.dmz-prg2.suse.org (imap1.dmz-prg2.suse.org [IPv6:2a07:de40:b281:104:10:150:64:97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id A728921FE2; Thu, 29 Feb 2024 16:30:17 +0000 (UTC) Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id DA54713A4B; Thu, 29 Feb 2024 16:30:16 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap1.dmz-prg2.suse.org with ESMTPSA id CEMPMhix4GU0PwAAD6G6ig (envelope-from ); Thu, 29 Feb 2024 16:30:16 +0000 Received: from localhost (brahms.olymp [local]) by brahms.olymp (OpenSMTPD) with ESMTPA id bdc647ed; Thu, 29 Feb 2024 16:30:14 +0000 (UTC) From: Luis Henriques To: Theodore Ts'o , Andreas Dilger , Alexander Viro , Christian Brauner , Jan Kara , Miklos Szeredi , Amir Goldstein Cc: linux-ext4@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-unionfs@vger.kernel.org, linux-kernel@vger.kernel.org, Luis Henriques Subject: [PATCH 3/3] overlay: fix mount parameters check for empty values Date: Thu, 29 Feb 2024 16:30:10 +0000 Message-ID: <20240229163011.16248-4-lhenriques@suse.de> In-Reply-To: <20240229163011.16248-1-lhenriques@suse.de> References: <20240229163011.16248-1-lhenriques@suse.de> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Authentication-Results: smtp-out1.suse.de; none X-Spamd-Result: default: False [-4.00 / 50.00]; REPLY(-4.00)[] X-Rspamd-Server: rspamd1.dmz-prg2.suse.org X-Rspamd-Queue-Id: A728921FE2 X-Spam-Level: X-Spam-Score: -4.00 X-Spam-Flag: NO X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1792251719147794173 X-GMAIL-MSGID: 1792251719147794173 Now that parameters that have the flag 'fs_param_can_be_empty' set and their value is NULL are handled as 'flag' type, we need to properly check for empty (NULL) values. Signed-off-by: Luis Henriques --- fs/overlayfs/params.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/overlayfs/params.c b/fs/overlayfs/params.c index 112b4b12f825..09428af6abc5 100644 --- a/fs/overlayfs/params.c +++ b/fs/overlayfs/params.c @@ -441,7 +441,7 @@ static int ovl_parse_param_lowerdir(const char *name, struct fs_context *fc) /* drop all existing lower layers */ ovl_reset_lowerdirs(ctx); - if (!*name) + if (!name) return 0; if (*name == ':') {