Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp2752156rwd; Fri, 19 May 2023 09:41:40 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ70JJU0rYtlgu4D2EwJTRUaaQssnP4qnlQLf1xw/ctRBpm/1JOXqGcYswyH6HFKRTjtYSpx X-Received: by 2002:a17:903:41c3:b0:1ac:482e:ed4d with SMTP id u3-20020a17090341c300b001ac482eed4dmr3769265ple.18.1684514500365; Fri, 19 May 2023 09:41:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684514500; cv=none; d=google.com; s=arc-20160816; b=H7jS/KWpnCE7lK0+Euqp8aNPc0zQdmQClr8Bkcat4ipGI2O0ALU69fPqfjhdK9ANSc xS8Ux0oGoTLqNQse7E2fVziOM+ECPVwSuq+4ELhFrPBohWQ2hhM9UFDq6ivbAG93zYqO E9rdf+fe2b9vZ1J2Mob11F7OyDFACubUJXIXKti9SUvaSDBNuKcOiZ3LdEYVPvqSt8dT XLLAt0zcbEFYjBf6YIjwiG8q1C3hoDmoCKW4hWucnoUCyoS6ZroNkRpyrIu22WNI6C6x +HM7NvLsMga+JKyk8ZOnWLUHOcpCBzjsITMSN+R/M17a7/GHn2EYWVFPlJxmi+IhDgq9 xb1Q== 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=xLNmNbMfOEFya0NXiVqmdM46U5iwXVuWu3Bo5/6qSKs=; b=bFWMtrhZkAbvF+wgnXCDwC0T3gtMU8uXKqsJ+vquXEE55TSiTlU2c9NfB8KXtaIgIw wsZc7OA7m1jpK+sCDKyl5IG5u1Epl82p90xfX/h+nQ55mw3U5HcFRjpdd3sF7sCQAfJt hqnjzeh3rbvCUwrZ0J/RqF59gayUqFMrz0JGJxYGNq21T/M3scW1ehcJaRTHfODLavFa fqoEe9/Zf0wxgLOjpHjeW9kOMe5nCxkyp1iXp7NGEA8k1Ej4ajdgtx8MsP0YPSqG6dRC q4jrH/6Ldo+9N+KzxZSsxv+En4hPl8GEdaZ8e0JWcsrTtHbMM0L7f3KYOe+wuBZHkd+E okhw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=W6emMQZp; 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=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id t9-20020a170902e84900b001a69d1be184si3967631plg.506.2023.05.19.09.40.54; Fri, 19 May 2023 09:41:40 -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=@linaro.org header.s=google header.b=W6emMQZp; 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=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230188AbjESQOu (ORCPT + 99 others); Fri, 19 May 2023 12:14:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46000 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230135AbjESQOs (ORCPT ); Fri, 19 May 2023 12:14:48 -0400 Received: from mail-wm1-x331.google.com (mail-wm1-x331.google.com [IPv6:2a00:1450:4864:20::331]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6CF28E47 for ; Fri, 19 May 2023 09:14:18 -0700 (PDT) Received: by mail-wm1-x331.google.com with SMTP id 5b1f17b1804b1-3f41dceb9d1so33463185e9.1 for ; Fri, 19 May 2023 09:14:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1684512856; x=1687104856; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=xLNmNbMfOEFya0NXiVqmdM46U5iwXVuWu3Bo5/6qSKs=; b=W6emMQZp60IJdrYM9nYVdezN30gej+RqqqI6uAn6l8ZbDIXi1cmKAHSxNW6EdpnnOB iCqto7vNMb2L8BjOd/FjPKnu9Tn5ieiVYyukoK0HQQSleL4nq0yLr779PZFMVvSlF1Ah GA4BTgtLticao7X/V1H9KyB16edBeUeb/Xj7EkeDvkto9LSqW7kYbphcvxoq/QWKjBXa S5WQioPgay8yIhWiGXOWTaVquahxUgFOQfUHX99V/onAaS2gvD6InA32ArKGxdnHKlQl moAetMYZJzIxUykNBeTQt5g175HuoDl6M6RKK6esiaoClM1SIimg7eTwprITu5Y6sW8H TXNg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684512856; x=1687104856; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=xLNmNbMfOEFya0NXiVqmdM46U5iwXVuWu3Bo5/6qSKs=; b=VjeCFXjbudTSueKQYo2XoSKAHYK6j1sBmye+JXg8jnqj/WhU+OB0IySeTB6pJdrC6K heADfyiszojyFR/d9+6IlFDBu9gUOelajPqGAgSicfgMbqrF4mMcM6RPym88RVSvmsRl nKVh1SZIj7S/p4ulgV5oB3SwQT/c4YFIstyIzEPDG91mMztFilglon0907a5iaNUNbCC mTwEfbIFbOQj2Opg6h9NEOwB73OHZygkDLn4BAsW2HYkf/nd5RHiJARO5i8GSX8tCXkt k4Xa+XF537gFXUFr9GTjXZ+Ua63KgtczOQC7qTuNwJUNRCRnVDkO1bvLhtC76+m0RB3U 6G/Q== X-Gm-Message-State: AC+VfDzQQOxg7BXe+Y+iUFvkW+jXuzBiyUz8g7CLpnv0YoN44LmqRiAk Z9eb1Yzp2pLefx3uqPlpEdyWDEuYiD3FsJrGAso= X-Received: by 2002:a05:600c:2057:b0:3f4:27ff:7d52 with SMTP id p23-20020a05600c205700b003f427ff7d52mr1903670wmg.2.1684512856381; Fri, 19 May 2023 09:14:16 -0700 (PDT) Received: from localhost ([102.36.222.112]) by smtp.gmail.com with ESMTPSA id g17-20020a7bc4d1000000b003f423a04016sm2848205wmk.18.2023.05.19.09.14.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 19 May 2023 09:14:14 -0700 (PDT) Date: Fri, 19 May 2023 19:14:10 +0300 From: Dan Carpenter To: Chuck Lever III Cc: Naresh Kamboju , Linux-Next Mailing List , open list , linux-fsdevel , linux-mm , "lkft-triage@lists.linaro.org" , Al Viro , Christian Brauner , "Paul E. McKenney" , "frederic@kernel.org" , Arnd Bergmann , Anders Roxell , Jakub Kacinski , "David S. Miller" , Netdev Subject: Re: next: qemu-arm64: kernel BUG at fs/inode.c:1763! Message-ID: <5d48dd9a-1822-4917-a77e-193a48ed3bd8@kili.mountain> References: <20680bb5-71c0-4945-a058-05f43bbd03f4@kili.mountain> <3C4B5AC6-275E-4176-BD1A-AB1FBD319C5B@oracle.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3C4B5AC6-275E-4176-BD1A-AB1FBD319C5B@oracle.com> X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED 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 Btw, Smatch doesn't like that file at all... sock->file = sock_alloc_file(sock, O_NONBLOCK, NULL); ^^^^ ^^^^ sock_alloc_file() calls release_sock() on error but the left hand side of the assignment dereferences "sock". This isn't the bug and I didn't report this earlier because there is an assert that it doesn't fail. net/handshake/handshake-test.c:221 handshake_req_submit_test4() error: dereferencing freed memory 'sock' net/handshake/handshake-test.c:233 handshake_req_submit_test4() warn: 'req' was already freed. net/handshake/handshake-test.c:254 handshake_req_submit_test5() error: dereferencing freed memory 'sock' net/handshake/handshake-test.c:290 handshake_req_submit_test6() error: dereferencing freed memory 'sock' net/handshake/handshake-test.c:321 handshake_req_cancel_test1() error: dereferencing freed memory 'sock' net/handshake/handshake-test.c:355 handshake_req_cancel_test2() error: dereferencing freed memory 'sock' net/handshake/handshake-test.c:367 handshake_req_cancel_test2() warn: 'req' was already freed. net/handshake/handshake-test.c:395 handshake_req_cancel_test3() error: dereferencing freed memory 'sock' net/handshake/handshake-test.c:407 handshake_req_cancel_test3() warn: 'req' was already freed. net/handshake/handshake-test.c:451 handshake_req_destroy_test1() error: dereferencing freed memory 'sock' net/handshake/handshake-test.c:463 handshake_req_destroy_test1() warn: 'req' was already freed. regards, dan carpenter