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 X-Spam-Level: X-Spam-Status: No, score=-10.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7A8ADC433EC for ; Mon, 20 Jul 2020 16:06:26 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 4D8682064B for ; Mon, 20 Jul 2020 16:06:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1595261186; bh=Ua6ArxZWzPGFkDBaJm8jZR2hYI3ysVtgu9NLHOig7Vs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=u3g5oFVc6VlS+3PvfMOhXigXkCu1wnDLCBRiALITngSwUs7ui09xWErh3NOA5APmi OHvsp8jeQdQLQ9LfwIOWldCcn/3Sku+KC2Rg1Sy/8bPa6DUmWdv0yq0vYXKOGsTXxt VQz7HKMcaYMZQ56grdN0/JsO1/NMvbC8WAXq2IwY= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1733050AbgGTQGZ (ORCPT ); Mon, 20 Jul 2020 12:06:25 -0400 Received: from mail.kernel.org ([198.145.29.99]:42528 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732804AbgGTQGT (ORCPT ); Mon, 20 Jul 2020 12:06:19 -0400 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 6371E20672; Mon, 20 Jul 2020 16:06:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1595261179; bh=Ua6ArxZWzPGFkDBaJm8jZR2hYI3ysVtgu9NLHOig7Vs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=xbGUszrMWapc226+//mzlcfccsOh/NRd9JoW5I1nuOMFqcUpma2Atj1fho+HeG7ky vUqtwB+xRLNBFMS0d2594J5ZrpWKegAe57StEFUwN03oqB24CpuGOUC021JWIo6jZX 8Xkf7mg1nqf+MjxLbpqNaczbqwB3fmKlD9TxkgtU= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Guenter Roeck , "David S. Miller" Subject: [PATCH 5.7 022/244] cgroup: Fix sock_cgroup_data on big-endian. Date: Mon, 20 Jul 2020 17:34:53 +0200 Message-Id: <20200720152826.923193642@linuxfoundation.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200720152825.863040590@linuxfoundation.org> References: <20200720152825.863040590@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: Cong Wang [ Upstream commit 14b032b8f8fce03a546dcf365454bec8c4a58d7d ] In order for no_refcnt and is_data to be the lowest order two bits in the 'val' we have to pad out the bitfield of the u8. Fixes: ad0f75e5f57c ("cgroup: fix cgroup_sk_alloc() for sk_clone_lock()") Reported-by: Guenter Roeck Signed-off-by: David S. Miller Signed-off-by: Greg Kroah-Hartman --- include/linux/cgroup-defs.h | 2 ++ 1 file changed, 2 insertions(+) --- a/include/linux/cgroup-defs.h +++ b/include/linux/cgroup-defs.h @@ -792,6 +792,7 @@ struct sock_cgroup_data { struct { u8 is_data : 1; u8 no_refcnt : 1; + u8 unused : 6; u8 padding; u16 prioidx; u32 classid; @@ -801,6 +802,7 @@ struct sock_cgroup_data { u32 classid; u16 prioidx; u8 padding; + u8 unused : 6; u8 no_refcnt : 1; u8 is_data : 1; } __packed;