Received: by 2002:a05:6a10:c7c6:0:0:0:0 with SMTP id h6csp2333602pxy; Tue, 3 Aug 2021 04:00:30 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzOGEkFXz8wgAQvdI/FvGkRYV7UOMqzR5aESW2/l8biTEz6yDEg/o4F/1EDV4o5Qi1Pz6xy X-Received: by 2002:a92:d3d2:: with SMTP id c18mr88603ilh.192.1627988430281; Tue, 03 Aug 2021 04:00:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1627988430; cv=none; d=google.com; s=arc-20160816; b=REuHF+MjUhVdljWdlGjR8ymfjLUQvbibLfKuUn9717sbFrqlnqgqgd3VMRz5VXQHEQ 5p3FHqQT+WgnN/xeTDK4nVhsUjZ91Cykle02vI3Y4mqy6khaGAFjt6bIE8qSciTEn4XA u1heK234XtQPCtzy56Drh59B0Yo9t005ggEvkty8SXgyeQWudqw83P6Fo09aMVMnloRA s99sPF/8uksCWyQTPgEp0s70TvvHqPe/G6a+U659/0hxVJzr6BMuPmIsAMxiwGrm2MWb /8WorhRuIFj5qkZ/5cH3rykwpeUh/Cv7NyMbcH5U2RMbdVrlPMsVLpNILtck4wTMhuh1 CsMw== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=aE8XCCL55f8qnxJqwivFKeV5VGgs9Ifqgx6vr3CKXek=; b=uA+3oHYBimGu8KChv7T2mFUhv3rYN/nL8wUBwdYPi1Xfs5C75NMfuJx2sd6kWC5TuW YBUO6Q0IWSfnyD3B5HMfdqecsGfSWKud/sC8HpO2xi9Ik++x6WshbhhlpH+5jps25SBh eIsMMqdBYVKTIGRm5tELSXJtxfqX4aq1Q6iBxWNyB+0HWyodz+9UqZXF+EjhTqJIlc0N ZaSWTxnFirhcfiVhiDfzIGARoR0C2Lrn3jtSd4jz1BwVVsjM2mRqeA3rif//Fluo2SuR ofUHJ7Pzo4Kzr/JlheSCYLbQiRf9ISd/6QBzzWVm3ytIrlU5VxLd7Qh/IpZgnKYaJKwm ooMA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=JG4rv26a; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id y8si15757912ior.35.2021.08.03.04.00.14; Tue, 03 Aug 2021 04:00:30 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=JG4rv26a; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235538AbhHCLAL (ORCPT + 99 others); Tue, 3 Aug 2021 07:00:11 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:44958 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235515AbhHCLAJ (ORCPT ); Tue, 3 Aug 2021 07:00:09 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1627988398; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=aE8XCCL55f8qnxJqwivFKeV5VGgs9Ifqgx6vr3CKXek=; b=JG4rv26asx9765lwBajA37EFQrQI78lmpMWKf5P3iRz3Pn17lp4qt2etyuV+Kr+Mz6h+Pf wTIvBxp0Yee0QKRZMxfA2s9dOSiLvjltS4pyNP9OKxYPAu5HSbH9sJnh+/a+a9CrYTsSyl 1bqb4BrrhheDt0ZEgEQ9F6oE1uDrH8U= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-60-m4sIGmG_O_enoSoAqyzJYA-1; Tue, 03 Aug 2021 06:59:54 -0400 X-MC-Unique: m4sIGmG_O_enoSoAqyzJYA-1 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id ECA31190B2A0; Tue, 3 Aug 2021 10:59:52 +0000 (UTC) Received: from thuth.com (unknown [10.39.192.110]) by smtp.corp.redhat.com (Postfix) with ESMTP id D0C5660C5F; Tue, 3 Aug 2021 10:59:49 +0000 (UTC) From: Thomas Huth To: linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-nfs@vger.kernel.org Cc: "J. Bruce Fields" , Chuck Lever , Trond Myklebust , Anna Schumaker , Luis Chamberlain , Kees Cook , Iurii Zaikin , linux-s390@vger.kernel.org, Jia He , Pan Xinhui Subject: [PATCH 2/2] lockd: change the proc_handler for nsm_use_hostnames Date: Tue, 3 Aug 2021 12:59:37 +0200 Message-Id: <20210803105937.52052-3-thuth@redhat.com> In-Reply-To: <20210803105937.52052-1-thuth@redhat.com> References: <20210803105937.52052-1-thuth@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org From: Jia He nsm_use_hostnames is a module parameter and it will be exported to sysctl procfs. This is to let user sometimes change it from userspace. But the minimal unit for sysctl procfs read/write it sizeof(int). In big endian system, the converting from/to bool to/from int will cause error for proc items. This patch use a new proc_handler proc_dobool to fix it. Signed-off-by: Jia He Reviewed-by: Pan Xinhui [thuth: Fix typo in commit message] Signed-off-by: Thomas Huth --- fs/lockd/svc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/lockd/svc.c b/fs/lockd/svc.c index 2de048f80eb8..0ab9756ed235 100644 --- a/fs/lockd/svc.c +++ b/fs/lockd/svc.c @@ -584,7 +584,7 @@ static struct ctl_table nlm_sysctls[] = { .data = &nsm_use_hostnames, .maxlen = sizeof(int), .mode = 0644, - .proc_handler = proc_dointvec, + .proc_handler = proc_dobool, }, { .procname = "nsm_local_state", -- 2.27.0