From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id CC12FC77B75 for ; Fri, 19 May 2023 16:14:20 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 34814900005; Fri, 19 May 2023 12:14:20 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 2D214900003; Fri, 19 May 2023 12:14:20 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 14C4F900005; Fri, 19 May 2023 12:14:20 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0015.hostedemail.com [216.40.44.15]) by kanga.kvack.org (Postfix) with ESMTP id F3B13900003 for ; Fri, 19 May 2023 12:14:19 -0400 (EDT) Received: from smtpin20.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay09.hostedemail.com (Postfix) with ESMTP id D252980AD1 for ; Fri, 19 May 2023 16:14:19 +0000 (UTC) X-FDA: 80807501838.20.3364C62 Received: from mail-wm1-f51.google.com (mail-wm1-f51.google.com [209.85.128.51]) by imf27.hostedemail.com (Postfix) with ESMTP id DDE0E40006 for ; Fri, 19 May 2023 16:14:17 +0000 (UTC) Authentication-Results: imf27.hostedemail.com; dkim=pass header.d=linaro.org header.s=google header.b=W6emMQZp; dmarc=pass (policy=none) header.from=linaro.org; spf=pass (imf27.hostedemail.com: domain of dan.carpenter@linaro.org designates 209.85.128.51 as permitted sender) smtp.mailfrom=dan.carpenter@linaro.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1684512858; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=xLNmNbMfOEFya0NXiVqmdM46U5iwXVuWu3Bo5/6qSKs=; b=tO3nN65zUojoL3m1FIc6cfyppWodqJ8h2QO37cHf0MuQoqvVMQJ/A0aIXiOLe6SEAvFWT6 Cld3hstvSF2muMT6OcjOef23EcGvBsO7tfbJW8Qf6DxLQToAA2uzv8SxU2e5TfZrBO5aCN ErL+iLXGA1Az+71JTp8VQvMPmy+Dw6k= ARC-Authentication-Results: i=1; imf27.hostedemail.com; dkim=pass header.d=linaro.org header.s=google header.b=W6emMQZp; dmarc=pass (policy=none) header.from=linaro.org; spf=pass (imf27.hostedemail.com: domain of dan.carpenter@linaro.org designates 209.85.128.51 as permitted sender) smtp.mailfrom=dan.carpenter@linaro.org ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1684512858; a=rsa-sha256; cv=none; b=JqJVWeExeafvEckRlP5TA5xcvqnRRFVkTmcEFsH6gsooZXA66feJupzMeIMPsgT0AhiGZT oVcgi25adREjhD5J0T/ZT42QfaVrJKm4JU+hTknrFlxFxa2V5B+DfhfghW8U5UUmBswsPY KUX1ilLJ6uv/fZu+Gy1xYMlFxY/Qx/8= Received: by mail-wm1-f51.google.com with SMTP id 5b1f17b1804b1-3f4c6c4b51eso33485555e9.2 for ; Fri, 19 May 2023 09:14:17 -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=IES6xfui12j3GL1Bj99Hw4spihj/DnMkDI05htjiUmCn84I1fyPoOCcgj45qAlOz7D tb7a01WCSl5iQ8kYfwMamIa1mQh8SdcdyPSOHIG8NiFJZPfEiVweBEmVXRWZJnb/Tdr6 GcoP8G/GuodylExoFl6spoNkLDymnsjIJB2wY2a1C9Dnx3spuuGhlSLdHBOy3p3Ye+wb jOIDj9utqndHJ+Da+BAmlNayzI8D9Pg9rVFhFbCYfi8l+LflKSlWKlNBB5YQXZYf9WHD bJW3WoOWdXAPJIywvJcyPF0jKZyfxjyDZHA00CCjltLL2QlZVXsSgkMa5rnlCl5A3RK9 SQuQ== X-Gm-Message-State: AC+VfDx0kyywLAtq+v1Z5dOT14d56XhU1pAppPM0PNw6BaK58UvYm9Ae 92129y1CmXdotF3gvexFfL9RfA== X-Google-Smtp-Source: ACHHUZ6+kr+rk2ikjTPVoGRtPwEq2a5sxFt99083Jfvx4xtTxEv8fbxTifXP/vvWbNUAwCPyP195Zg== 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-Rspam-User: X-Stat-Signature: cjh9cf4y6x8btm61isfwzn6115cd3hxh X-Rspamd-Server: rspam07 X-Rspamd-Queue-Id: DDE0E40006 X-HE-Tag: 1684512857-467669 X-HE-Meta: U2FsdGVkX18tVMSuba40QDit0uJqKNsISVzJh8BOFmYojs7Nh83uAUWE89M8SsPlUGPKjas7iC226lUKT2YRAGD0ujTizDxuaOC9wzsysR/0KU0dhtabJ/GmbawE654IIOAOBHtCmmiR1qS6mBC4Ze/uHMp+lWOclYSXH0glgEOXJN1U8kE8hHhujugAO45sZ2txZ604tX02HCXEYXVwkbKI7sFEUKKipKEI0cFt0Jy9+2awR/JGoWpuDL7SiOVGKtEeqccMZkcmRgUCEWAo05u7SDMxzMpEYTTGmg9hClHDY6mmBlG8zhMSg03nD2+Ji45zsGKrfGisKy2iGAD7v1iB4jmlhNCw3gm0vuw+8YHEQmlRUn3jG4zoKvOhzxUym4qJlIpmxk9Rl+Fgq4WVcSwM6MgS5gDy0HtXi55NtMY+TrLG4P5f5SM0XsYmg7ETu4kt1kcQ4E0AiqGgOvEUfepjCu835P2/GHH4guF648+fwRPjF+Twpj7PFCIxvUS2jhxQKaseL91BHPw7HpzGc62nuRk16wWYCa+eruurNz4onAQsUVitsfwGLPmfkCDpmi+tkwEkimNTY5vW6Vu51/rkF8P28YUhMb3ytnbmIBFnUC1aJkH19j1X/Mu11/2ZpdopmP0cuBQ0fnseu2VDzT81ai+sRpaX3D/ENhZ86Cg7t/X9fX4dNvMMeU9h5Xjy/anBTF7tlxhSEkCZz5RM8C4FCvGEF5/g9uDY0Oo4l2TygMPq0C76taL5ctcDWHFYRgTqFCysf1116+169ghdeENjgLQwEUAR7OCdWzRt3KyqgXqy1oLI/nMVQ41XN0wMdsISl2paClHqvpqYbAKZo95VHVva15dACYI6OMhOdTXGBLr0Lzb8DNzgG86AISQK8gx3Lxmr6588vCLL1L2r0C2I4BCCVZUHnVkklFGZ5IiCo71u8jmh2lVWyvO3MTNDbJeNjv8xtDrkNoMFc7o uhhTSCgI oNjfMG7/5ZcbD32eIrmgEsfAsFDyk9BJVIpvGhVAVCCnRAvaaOJ+DhoOqZQ2AXMtXkr3BKz0pBZ2SaAfh/ygAlpzlDnjcJYJ1SaKL774JTv/moRQfaZPBei0h9PpH1qhMuo8Li1X7ApwvfO78+riK0P11bcMT8uX2tvrqlcg4C8kRGSiLw2IfwYG1z67nOMDkOMM5sK0GeWuSwW7ossfR97XYmwKT8Ay0IwSUBTiTYNJ/SomCb2HDamAPb99mpx4vGwDRvZnutVg0gLjjVA6H6tw5eiodm5bCKcdOPPlq4OcgbBLm+eOhhZuIIqDuVxQHfl9SFB6QmkiQyxafng0RPbNKawgXYAsKZvL0UaUGqGHw/8v6RRyLszEWBnSPmBVZWCEMsF+i/v7dpSY= X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: 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