From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755356AbbLDIQI (ORCPT ); Fri, 4 Dec 2015 03:16:08 -0500 Received: from mail-lb0-f177.google.com ([209.85.217.177]:36238 "EHLO mail-lb0-f177.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752542AbbLDIQG (ORCPT ); Fri, 4 Dec 2015 03:16:06 -0500 From: Rasmus Villemoes To: Andrew Morton Cc: Kees Cook , Al Viro , linux-kernel@vger.kernel.org Subject: Re: [PATCH v3 14/14] lib/test_printf.c: test dentry printing Organization: D03 References: <1449175873-1780-1-git-send-email-linux@rasmusvillemoes.dk> <1449175873-1780-15-git-send-email-linux@rasmusvillemoes.dk> <20151203161910.c33ab41d21e0d3bfc6fdb060@linux-foundation.org> X-Hashcash: 1:20:151204:akpm@linux-foundation.org::LyMubbK2t48uPqp5:00000000000000000000000000000000000001gm X-Hashcash: 1:20:151204:viro@zeniv.linux.org.uk::icKW4aNf0sfW3Js6:000000000000000000000000000000000000002Qws X-Hashcash: 1:20:151204:linux-kernel@vger.kernel.org::E51262fzPMwpUXMW:0000000000000000000000000000000002uZl X-Hashcash: 1:20:151204:keescook@chromium.org::G1cuKjnhiyqeG9/q:00000000000000000000000000000000000000007aq2 Date: Fri, 04 Dec 2015 09:16:02 +0100 In-Reply-To: <20151203161910.c33ab41d21e0d3bfc6fdb060@linux-foundation.org> (Andrew Morton's message of "Thu, 3 Dec 2015 16:19:10 -0800") Message-ID: <87y4da633x.fsf@rasmusvillemoes.dk> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Dec 04 2015, Andrew Morton wrote: > On Thu, 3 Dec 2015 21:51:13 +0100 Rasmus Villemoes wrote: > >> +static struct dentry test_dentry[4] __initdata = { >> + { .d_parent = &test_dentry[0], >> + .d_name = { .len = 3, .name = test_dentry[0].d_iname }, >> + .d_iname = "foo" }, > > Confused. qstr has no .len. > > lib/test_printf.c:332: error: unknown field 'len' specified in initializer Huh? It goes without saying that I've compiled and run this, and never seen this problem. struct qstr does have a len member, though it's hidden inside an anonymous struct inside an anonymous union. But at least my gcc (4.9) has no problem with those initializers - and fs/dcache.c happily accesses name->len all the time (how else would one get at the member). Also note the lack of 0day complaints. What tool gave that error? Also confused. Rasmus