Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp463999ybl; Tue, 28 Jan 2020 06:22:37 -0800 (PST) X-Google-Smtp-Source: APXvYqzjriunY7+hUP2JYJsymAaRZXfcoqUjHykrngtOGBXzZnbWap1LODtcl7j1NRYt/RByGidR X-Received: by 2002:a9d:4f11:: with SMTP id d17mr15734019otl.228.1580221357355; Tue, 28 Jan 2020 06:22:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1580221357; cv=none; d=google.com; s=arc-20160816; b=ag0lf90PhiTe4V43fT/1WBO++wK3FW7hoMpxMTtvr4pSgdZ9XqhLWKmi/hFzM5yEhG 0U7oG1HEIgyzHBRUkIscHSb3LphIlHSM432fHQfOOYcaLPV/MnpkCdBacRKb+W4t5kLf l5wc+7H4ILhD97urCzN2AfPX5PwZzELhKqTDVZ76grvwNKUhf/WSghYZdYVfCILVH88J Cub6P/4dpII3HqHhO5gyCafZ4qejB3JPzqkCx0y0Zu+p1dgAD0zmhg30LNWsqByUHgqI ZBxMuZE9VYrhBTNctmFq/tsWV8yH86Chi5gdB2N09iu4VcXqqOOe8gcg2Mm52piCHzYx c0cw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=TR8GD6xBkLwwsyM/pblMRRIKzgaEY3ozl5lqbA44B6w=; b=c4X+RUpild1aLHS/SgghVLPIWci+DvcY/8jF+qsm3XQ49g5oliz62h6dU3pMrnqZSD IaTUf75pK0RB9mmgKpNBCiDyea2St7hWtsZRnO3AtA/XnTv1BdSC8izl9chGpfl87I3W QG9cys06eZIsP/doSqbzXXSE6vs5uporTS6kr6WcTKKaYrZ2dCP8vFWbzRjkuaQQSWIe /pzSq97v6lpUH0zTupUezixql2QoP4AVr74pOVOgE3HZFbQhh5Pu10WOBDQ1eOQl9dWQ JyD8mB4Z4GtTh2S2IHrKzuPPC682Fd3HQwNipKUKlXq/Ztu+sORDSsFoDsbNDNH/b+l/ ga+g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=Cwma8GF8; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r202si5249618oie.247.2020.01.28.06.22.25; Tue, 28 Jan 2020 06:22:37 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=Cwma8GF8; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731309AbgA1OVa (ORCPT + 99 others); Tue, 28 Jan 2020 09:21:30 -0500 Received: from mail.kernel.org ([198.145.29.99]:46830 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731301AbgA1OV3 (ORCPT ); Tue, 28 Jan 2020 09:21:29 -0500 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id EC4B824686; Tue, 28 Jan 2020 14:21:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1580221288; bh=EdvVBJhwRTeRMjm+D0sLSZ6CA6OkV4G8o+N9TY6pga8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Cwma8GF8ydeI99zI3gXs7YojGOTtPuWsy2PeyX8YOmbVyviVvuE5GKw/lE62Owbpm 3R2MM3m/LboHv9l6HV5L3U1h228rTV26vy4bs8Nr6xZrnNBsWUWEXNEiySXK7SV7QY gls7esCRWO+yA4F5Z3Xm5Xju0VPpFIGpwm7mvxyM= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Geert Uytterhoeven , David Howells , "David S. Miller" , Sasha Levin Subject: [PATCH 4.9 165/271] rxrpc: Fix uninitialized error code in rxrpc_send_data_packet() Date: Tue, 28 Jan 2020 15:05:14 +0100 Message-Id: <20200128135904.866216477@linuxfoundation.org> X-Mailer: git-send-email 2.25.0 In-Reply-To: <20200128135852.449088278@linuxfoundation.org> References: <20200128135852.449088278@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: David Howells [ Upstream commit 3427beb6375d04e9627c67343872e79341a684ea ] With gcc 4.1: net/rxrpc/output.c: In function ‘rxrpc_send_data_packet’: net/rxrpc/output.c:338: warning: ‘ret’ may be used uninitialized in this function Indeed, if the first jump to the send_fragmentable label is made, and the address family is not handled in the switch() statement, ret will be used uninitialized. Fix this by BUG()'ing as is done in other places in rxrpc where internal support for future address families will need adding. It should not be possible to reach this normally as the address families are checked up-front. Fixes: 5a924b8951f835b5 ("rxrpc: Don't store the rxrpc header in the Tx queue sk_buffs") Reported-by: Geert Uytterhoeven Signed-off-by: David Howells Signed-off-by: David S. Miller Signed-off-by: Sasha Levin --- net/rxrpc/output.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/net/rxrpc/output.c b/net/rxrpc/output.c index 59d3286033120..64389f493bb28 100644 --- a/net/rxrpc/output.c +++ b/net/rxrpc/output.c @@ -400,6 +400,9 @@ send_fragmentable: } break; #endif + + default: + BUG(); } up_write(&conn->params.local->defrag_sem); -- 2.20.1