Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp2827636pxb; Mon, 1 Nov 2021 02:39:38 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwruoxep52JCz2NhAQ5JT6rEyzHhrU2QlgAuWEPNZB3SH4EoYHes7U3HUVFTqBUcymQ/uoW X-Received: by 2002:a05:6e02:178b:: with SMTP id y11mr19223367ilu.92.1635759578503; Mon, 01 Nov 2021 02:39:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1635759578; cv=none; d=google.com; s=arc-20160816; b=as/unDC0Nvfaa8emRxXhIGz1C21EnD17Wm2QgC+f6JNFAKrxXlKj1ZvNshFszIAZeW 9CyQU3R0mucRD9FAAP9k0FvJq07u6FZw54exZjIYa1QGOEpT9KpIyAAngh2o4uJKGeN8 1aYzgdTeTrSoABPDVxIrO9FQrGBHr+QMNA0nLIwZSEfey5LSWZd9GzcQ9cq6yKryylKF 5qEHvtGI6LlZKiZ3UJu3YL6KSXqY07d2ScclRecL8vq9e8YrRPXmdCupITA7Qf9ncify 7SMctyQBXXZ6OTKxM846983aWKoIq1hTqBE2j750TK+M5VGjdVwlPUeTfUfQS0n0+MeA LyTQ== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=7fIBeSnNJFZb7XNj+UvHcNXO/UAD9vTZ6txEgGx7oSU=; b=PCbVkX7jN8ZYY8jmHTZC9LLs+e4jXkApfdbTJ111AJ2ko4lscpSPreUeY6xmc5edW/ ri3yG9zgur4/Jq5WAleKAWm1MdiuJgMpNer1weMAKsEn8jYKstgprVyMTa8dLdwGc6yZ mMzbo3MdNLKRUCByi136zCU/D0EpeuaDguDimi18YawvROFNPZcR10nHb0VmKogWNKw8 mjy4bebIckUYSevgpOJ8BTgQZHWS0UAuuAhHJNiPvtK48qgDVJCYTYr/yEt5QSwIUOYj EHQ9S0THOYbKPc75B7FjnKaHIBDyDz5BFIBdEh0ObwiCDKfodAFyEYX0wNUu6alDhdCv 5RoQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=WHtgPPp9; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id m22si14602821jac.35.2021.11.01.02.39.26; Mon, 01 Nov 2021 02:39:38 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-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=@linuxfoundation.org header.s=korg header.b=WHtgPPp9; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233979AbhKAJlD (ORCPT + 99 others); Mon, 1 Nov 2021 05:41:03 -0400 Received: from mail.kernel.org ([198.145.29.99]:43532 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233630AbhKAJho (ORCPT ); Mon, 1 Nov 2021 05:37:44 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 9AD7961350; Mon, 1 Nov 2021 09:26:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1635758791; bh=iSymP04eayXhdaeGBYoXyAWFkq35uLJ1B/yaG+QOIgE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=WHtgPPp9ayEdVUc0WfnMDGHg/MW4pYPZC0vZHeqD84iCiL0XZ2RxZYQFZlx7NRu6a PO9bGK5/XKEKe3CngCF6qZgHFUMoSz4uZM9tCHbUICv54rV+ilKsRkgYC2xoDx+kpQ nd7sODQui2QFV3Qn/fneqtgmCkFUANYec8bTDM3M= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Jakub Kicinski , Daniel Jordan , "David S. Miller" Subject: [PATCH 5.10 60/77] net/tls: Fix flipped sign in async_wait.err assignment Date: Mon, 1 Nov 2021 10:17:48 +0100 Message-Id: <20211101082524.264945476@linuxfoundation.org> X-Mailer: git-send-email 2.33.1 In-Reply-To: <20211101082511.254155853@linuxfoundation.org> References: <20211101082511.254155853@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Daniel Jordan commit 1d9d6fd21ad4a28b16ed9ee5432ae738b9dc58aa upstream. sk->sk_err contains a positive number, yet async_wait.err wants the opposite. Fix the missed sign flip, which Jakub caught by inspection. Fixes: a42055e8d2c3 ("net/tls: Add support for async encryption of records for performance") Suggested-by: Jakub Kicinski Signed-off-by: Daniel Jordan Signed-off-by: David S. Miller Signed-off-by: Greg Kroah-Hartman --- net/tls/tls_sw.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/net/tls/tls_sw.c +++ b/net/tls/tls_sw.c @@ -459,7 +459,7 @@ static void tls_encrypt_done(struct cryp /* If err is already set on socket, return the same code */ if (sk->sk_err) { - ctx->async_wait.err = sk->sk_err; + ctx->async_wait.err = -sk->sk_err; } else { ctx->async_wait.err = err; tls_err_abort(sk, err);