From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754148AbbLIUCn (ORCPT ); Wed, 9 Dec 2015 15:02:43 -0500 Received: from shards.monkeyblade.net ([149.20.54.216]:38782 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750977AbbLIUCl (ORCPT ); Wed, 9 Dec 2015 15:02:41 -0500 Date: Wed, 09 Dec 2015 15:02:37 -0500 (EST) Message-Id: <20151209.150237.1395563395881100002.davem@davemloft.net> To: tj@kernel.org Cc: alaa@dev.mellanox.co.il, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH net-next] cgroup: fix sock_cgroup_data initialization on earlier compilers From: David Miller In-Reply-To: <20151209173046.GO30240@mtj.duckdns.org> References: <20151209173046.GO30240@mtj.duckdns.org> X-Mailer: Mew version 6.6 on Emacs 24.5 / Mule 6.0 (HANACHIRUSATO) Mime-Version: 1.0 Content-Type: Text/Plain; charset=iso-8859-7 X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.5.12 (shards.monkeyblade.net [149.20.54.216]); Wed, 09 Dec 2015 12:02:41 -0800 (PST) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from base64 to 8bit by mail.home.local id tB9K2mBR028489 From: Tejun Heo Date: Wed, 9 Dec 2015 12:30:46 -0500 > sock_cgroup_data is a struct containing an anonymous union. > sock_cgroup_set_prioidx() and sock_cgroup_set_classid() were > initializing a field inside the anonymous union as follows. > > struct sock_ccgroup_data skcd_buf = { .val = VAL }; > > While this is fine on more recent compilers, gcc-4.4.7 triggers the > following errors. > > include/linux/cgroup-defs.h: In function ¡sock_cgroup_set_prioidx¢: > include/linux/cgroup-defs.h:619: error: unknown field ¡val¢ specified in initializer > include/linux/cgroup-defs.h:619: warning: missing braces around initializer > include/linux/cgroup-defs.h:619: warning: (near initialization for ¡skcd_buf.¢) > > This is because .val belongs to the anonymous union nested inside the > struct but the initializer is missing the nesting. Fix it by adding > an extra pair of braces. > > Signed-off-by: Tejun Heo > Reported-by: Alaa Hleihel > Fixes: bd1060a1d671 ("sock, cgroup: add sock->sk_cgroup") Applied, thanks. ÿôèº{.nÇ+‰·Ÿ®‰­†+%ŠËÿ±éݶ¥Šwÿº{.nÇ+‰·¥Š{±þG«�éÿŠ{ayºʇڙë,j­¢f£¢·hš�ï�êÿ‘êçz_è®(­éšŽŠÝ¢j"�ú¶m§ÿÿ¾«þG«�éÿ¢¸?™¨è­Ú&£ø§~�á¶iO•æ¬z·švØ^¶m§ÿÿà ÿ¶ìÿ¢¸?–I¥