From patchwork Wed Apr 24 22:51:18 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 791541 Delivered-To: patch@linaro.org Received: by 2002:a5d:4884:0:b0:346:15ad:a2a with SMTP id g4csp1091944wrq; Wed, 24 Apr 2024 15:53:10 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCWaHdssRucT5uXIYfNNHgtGVASzmVVJHFCxbwqSxSZdF4sLT5AzdR/XmHGlFuX2TbqonpK62AjpDstRPZPzWh3A X-Google-Smtp-Source: AGHT+IFkLaextGu8rHtjTAKm+df+z4aQWnx0L3cM+rssbxGDm/sDroNI4F8yFs6k1VItjJ5bjn52 X-Received: by 2002:a05:620a:2445:b0:790:888e:4c5a with SMTP id h5-20020a05620a244500b00790888e4c5amr4732597qkn.34.1713999190640; Wed, 24 Apr 2024 15:53:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1713999190; cv=none; d=google.com; s=arc-20160816; b=TBmFtY5XqNT+kst+6+Xt7K26/KKb8eacdxEatlXxBCLRSC1yeNWTmxvbx50TsjOTLB aNvlX/1BDEbowvkXkF9BztMlO8mmV0aIMqVBKFIZyaAdHZKhaYNzwlSaaj3TF3p5F9WQ lY86AoyFCtodPN9MnS1BDvl/b8NpIEB3T+3IIRxbGIGyuBkooPCtCoMrqsig9sYQCXSA Hofv1qkMzMSJPVb/0QTlgfC+VU44OOjrVJ3t57mfjbQ/fTurXk+r7waMNnq+8wrV8jdt xGFHSrML1dT6vHaQ5fgUniSs0Y0dhqdlKbLPXco3A7H6Sj/6bQwr3uJsD8kaUd6Z/pkB Yxeg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=JI74xSWz9fuppvIeUIbROGR0F/ne9t6G9LvnZBioEes=; fh=TF63Ze67lDnVlkd8xmxXNff2WGh+3exboZvnQbD94Yg=; b=lxgjCZC5khpdQq0L6Q3xPMVt+RyoSk2fH5fH9sblUFj6Uz5q35yR1yvGtGmn3Lz8Sk p+EDo/cPMZaWm7Y++VyOzCy/uztJ9Feh703sEyyzOsBe6KX6Uug+ng5bYt082qcnEgJ6 O94HTAdOiefYlJcQu9E9ZWYtPbtPSVy0GJZi32ivJ88Oy0dyt37bgvfhnt7NwnSM+Zmh x3Sroe1uCfEv/azKiMs2oQGCuiEUt0yBO1M+Mc9dJkHg3QCXcHiF/NQD2WXAvfqXEnCz wzPzPy5eTTYlbWqM/EtDPf980NTvnpdXz46KPSBGbulMMf65zmJ0oItXhKQerXK09cYc hTuw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=vFFYISOW; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id c12-20020a37e10c000000b0078ee5516fa0si13097620qkm.776.2024.04.24.15.53.10 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 24 Apr 2024 15:53:10 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=vFFYISOW; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rzlSe-0006wp-Sk; Wed, 24 Apr 2024 18:51:32 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rzlSe-0006wg-4O for qemu-devel@nongnu.org; Wed, 24 Apr 2024 18:51:32 -0400 Received: from mail-pf1-x433.google.com ([2607:f8b0:4864:20::433]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rzlSc-0006fj-Jd for qemu-devel@nongnu.org; Wed, 24 Apr 2024 18:51:31 -0400 Received: by mail-pf1-x433.google.com with SMTP id d2e1a72fcca58-6ed04c91c46so440465b3a.0 for ; Wed, 24 Apr 2024 15:51:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1713999089; x=1714603889; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=JI74xSWz9fuppvIeUIbROGR0F/ne9t6G9LvnZBioEes=; b=vFFYISOWbkz8WiNiX8NK85XdoRJFaLvVP0UtTB/eC/2cdLyQBF+JDdRIQkgYVgIZte b0XS3NjHKPj07e6RFvp31rxsOQl8KKH68o/ImMi1UqKMYjnnq81O3+hrETts0otDg5tQ wbFvMC5Qqqsn35tTEMatqtUPjWTfqQa7j5xij+c3BSvIUf+IOzG9b9FMPMBDFZ3ymBAM DxcJn1+FRQM8IAyb8Sc1N1+L1cEJi/ydKuvia3rgSiwvqOOrXk0dAoqiF0gUTKniyrjO 17n5/wVQkr+0YhHWi+MoVDPw+aMdiMZay/rRdF+8QDd5yB04Bn/n4Sb7vVEyqxVegxfX eyHg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713999089; x=1714603889; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=JI74xSWz9fuppvIeUIbROGR0F/ne9t6G9LvnZBioEes=; b=FWGLdJvnUl4q+2sySUphS7WnbNY7L4vGNmqxCd086WPUp4JiZvtQOeokBwhq6UkV6G 5ABhhQDTu4UU9QC45NFWkq9HSAeQ+09XEl2wtK1BrvVJWDsuGy0ygTUCS191jiD04VQB Xv6auRA9NmqEkLdmkeARiy6AWN5SjGDvvg5LY95S+aEhIBRSH7iPG8ADMC7cTQ1XrqLV zcC6vPXOfguHuSyxuaXHjhnhuilD3d2aPMzZ1N2ykw+bdK02sndqJCIdj29NeOYdgXu9 leuM1baJgH0FOrSNIs/iz9faWG7jOT60Gx1WtR0AQGHRNel5o+uGPSOZ3xevPQz+vE4g Shrg== X-Gm-Message-State: AOJu0YzX24+LGIDOVYq/4r6scZBZGegVgtbSizhI2LIxTzARYy9aJFi+ GbG7Q4vRf7xP4gonBRHIFtftzlF1Ry/Ht5wY/rvsmoAPNVS0LMsPk9pOINc8D9uBIr5/G88IKJP J X-Received: by 2002:a05:6a00:190c:b0:6ea:8793:6d64 with SMTP id y12-20020a056a00190c00b006ea87936d64mr4605726pfi.23.1713999089139; Wed, 24 Apr 2024 15:51:29 -0700 (PDT) Received: from stoup.. ([156.19.246.23]) by smtp.gmail.com with ESMTPSA id it12-20020a056a00458c00b006ead792b6f2sm11960864pfb.1.2024.04.24.15.51.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 24 Apr 2024 15:51:28 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: Michael Tokarev Subject: [PULL 4/9] linux-user: do_setsockopt: make ip_mreq_source local to the place where it is used Date: Wed, 24 Apr 2024 15:51:18 -0700 Message-Id: <20240424225123.929152-5-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240424225123.929152-1-richard.henderson@linaro.org> References: <20240424225123.929152-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::433; envelope-from=richard.henderson@linaro.org; helo=mail-pf1-x433.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Michael Tokarev Signed-off-by: Michael Tokarev Message-Id: <20240331100737.2724186-4-mjt@tls.msk.ru> Signed-off-by: Richard Henderson --- linux-user/syscall.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/linux-user/syscall.c b/linux-user/syscall.c index cca9cafe4f..1fedf16650 100644 --- a/linux-user/syscall.c +++ b/linux-user/syscall.c @@ -2049,7 +2049,6 @@ static abi_long do_setsockopt(int sockfd, int level, int optname, { abi_long ret; int val; - struct ip_mreq_source *ip_mreq_source; switch(level) { case SOL_TCP: @@ -2123,6 +2122,9 @@ static abi_long do_setsockopt(int sockfd, int level, int optname, case IP_UNBLOCK_SOURCE: case IP_ADD_SOURCE_MEMBERSHIP: case IP_DROP_SOURCE_MEMBERSHIP: + { + struct ip_mreq_source *ip_mreq_source; + if (optlen != sizeof (struct target_ip_mreq_source)) return -TARGET_EINVAL; @@ -2133,7 +2135,7 @@ static abi_long do_setsockopt(int sockfd, int level, int optname, ret = get_errno(setsockopt(sockfd, level, optname, ip_mreq_source, optlen)); unlock_user (ip_mreq_source, optval_addr, 0); break; - + } default: goto unimplemented; }