Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp3619645rwb; Fri, 30 Sep 2022 06:12:31 -0700 (PDT) X-Google-Smtp-Source: AMsMyM52pFjv3BX1/dkN3+NplA91o8xXGuHw0b0dg3f45/Ml/lSIfB/IcVOuTQIwCTtpOeBGVd4T X-Received: by 2002:a17:902:b089:b0:178:54cf:d692 with SMTP id p9-20020a170902b08900b0017854cfd692mr8809993plr.1.1664543549365; Fri, 30 Sep 2022 06:12:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1664543549; cv=none; d=google.com; s=arc-20160816; b=nhTY/jcA/R1+taHygjP727HXKOkwvPou49IWCD8f48/bSKxXvdp9WuwO/puVIrIPaz oYqbOW1ayXusFNx6DqWLDDriEtuqPBPm5VrsT49PJ6opcw+itSZLKVdPjzY98TU9Zj6c MLPYaEWp//skLV8OVI939qv+ZKUs2ZX1H3q6gLilzjwJ3bpzlIcDzK45xiH6Cxa/aZO7 k9SMhQYka5dZQFGsdAei4aqVNRkz0VRmcX+hdM6R8Y9z2iKl43pIx80Ku95BNvH2FNfY 5kzYVPTuexSPMVfZOUR6uOjpygIvO/N6bJFHXe+ZhCqVjXLAyqVYfU8rlQkEK1Y5WFaN zDew== 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:date :message-id:subject:references:in-reply-to:cc:to:from:dkim-signature; bh=zbDs1hT5RAGGtxNya39c/PjuOdXaE9e8iPJZTrXpYpI=; b=O181LJQOfIQuh/9O1WyTQB/DgrUfO2jDA2lmih52Yh3C3DoUggDhO7mepnPQ+x8f6b xszdm6laD2Y5Q951IFHzrjoxNocdgq/5M/0hrVitaMGbw4wCDMYHss41sGhqlk7zzM/i sjTPTGsw1b1HbQPanDdtm/xgKrw+5KY3PNQ99iFhSf4PWKB9g+XbVqocheGytgY4io35 OLuBcYwB/dhOaxPmF+hUE4DaI0C14Y/xsdn5gwWoAWwlnoEoc2jOyjL+s1tL+suSCGk1 zyMwbuZbTz+jzgdZopRsl0gNU907FEvbfbP7bUItux81HWgjuhqw+Im9t/g0p/qd1ukL qb+A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=SsoCu8VL; 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=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id a6-20020a1709027d8600b001755f43b53fsi1267059plm.431.2022.09.30.06.12.14; Fri, 30 Sep 2022 06:12:29 -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=@kernel.org header.s=k20201202 header.b=SsoCu8VL; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230442AbiI3M7p (ORCPT + 99 others); Fri, 30 Sep 2022 08:59:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35224 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231376AbiI3M72 (ORCPT ); Fri, 30 Sep 2022 08:59:28 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 37CE0176ACC; Fri, 30 Sep 2022 05:59:28 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id D267CB8289D; Fri, 30 Sep 2022 12:59:26 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9FD37C433C1; Fri, 30 Sep 2022 12:59:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1664542765; bh=+uP6RNd0zA7eYt8+5SUH77eiekJsemLzVXuGter0scY=; h=From:To:Cc:In-Reply-To:References:Subject:Date:From; b=SsoCu8VL8DFop6sdDT6PpkIFJAkqtOZivsuPzO9rgyWyYUYyZeOqAQ8RZ8ar8CEI3 wXNW18JeXqjtEo0sgV0MM+yio4jTZURXH2rW5yES3V90ZMFYT1yeuvRUhpHCNHvs+I y8w6QgqDFg1R8J0zjpFy+IBYJbcm4wh+IphXkciFqoekAmmIJ6kr8QuEkqNnyp8QDy ELk0UyGe0kI/uvZhE4L723YWWsZEg/t8SR7R5t4johkC51oTdEKoYToQAG4/CZLgLY Ju/tzYJxJWZXCw/y3muYD61mUfpMZqrRFX4+/kCx74HAuWwYOIT02QLkBOG7jS+Ahv ZDqhT9G2id5kw== From: Mark Brown To: Marek Szyprowski , linux-spi@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Vincent Whitchurch In-Reply-To: <20220930113408.19720-1-m.szyprowski@samsung.com> References: <20220930113408.19720-1-m.szyprowski@samsung.com> Subject: Re: [PATCH] spi: Ensure that sg_table won't be used after being freed Message-Id: <166454276436.255916.3302149825937071589.b4-ty@kernel.org> Date: Fri, 30 Sep 2022 13:59:24 +0100 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit X-Mailer: b4 0.10.0-dev-fc921 X-Spam-Status: No, score=-7.2 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS autolearn=ham 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 On Fri, 30 Sep 2022 13:34:08 +0200, Marek Szyprowski wrote: > SPI code checks for non-zero sgt->orig_nents to determine if the buffer > has been DMA-mapped. Ensure that sg_table is really zeroed after free to > avoid potential NULL pointer dereference if the given SPI xfer object is > reused again without being DMA-mapped. > > Applied to https://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi.git for-next Thanks! [1/1] spi: Ensure that sg_table won't be used after being freed commit: 8e9204cddcc3fea9affcfa411715ba4f66e97587 All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted. You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed. If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced. Please add any relevant lists and maintainers to the CCs when replying to this mail. Thanks, Mark