Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751873AbdIMCqO (ORCPT ); Tue, 12 Sep 2017 22:46:14 -0400 Received: from mail-oi0-f66.google.com ([209.85.218.66]:33944 "EHLO mail-oi0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751768AbdIMCqB (ORCPT ); Tue, 12 Sep 2017 22:46:01 -0400 X-Google-Smtp-Source: AOwi7QCmqy4EbmgZeg+q+ElAViyyQE15hZh3hhHgEamn8/AwqAhxblh6eRlteAFWyib0elbA6NE8mA== Subject: Re: Patch 0727d35de ("Make initramfs honor CONFIG_DEVTMPFS_MOUNT") breaks boot To: Petr Mladek Cc: Michael Ellerman , Yury Norov , Andrew Morton , "linux-kernel@vger.kernel.org" , Prarit Bhargava , Yang Shi , Rasmus Villemoes , Kees Cook , Emese Revfy , Fabian Frederick , Linus Torvalds , Sergey Senozhatsky References: <20170522120550.ekrq6ipfmkdtlxjo@yury-N73SV> <7d91fb6b-9a21-ceb6-6c08-4bc14a15ada2@landley.net> <20170523080159.2yetdh4qqt2pmha6@yury-N73SV> <66dd96ec-b170-0bf6-7746-5466270b3e15@landley.net> <87fufta2gi.fsf@concordia.ellerman.id.au> <1fb53a8c-6c17-1de2-493c-0bff403c9ff9@landley.net> <20170911114535.GL8741@pathway.suse.cz> From: Rob Landley Message-ID: Date: Tue, 12 Sep 2017 21:45:58 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 MIME-Version: 1.0 In-Reply-To: <20170911114535.GL8741@pathway.suse.cz> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1177 Lines: 31 On 09/11/2017 06:45 AM, Petr Mladek wrote: >> Except for the second printk line: If you boot with rdinit=/bin/hush >> then the first time you mount -t devtmpfs /dev /dev after boot (with >> CONFIG_DEVTMPFS_MOUNT already having mounted it), you get the 0 return >> value but the last printk() doesn't output? The second and later times >> you repeat it, both printk() lines are output. >> >> What's up with printk? >> >> (I added the second printk because the _first_ one wasn't outputting >> that first time. Something is happening to flush the printk() queue >> instead of writing it out? > > You need to add "\n" at the end of the line. Otherwise, it expects > that the message would continue and puts it into a cont buffer. > The buffer is flushed only when another non-continuous message > is added. Ah. The next one flushes the previous one, meaning when I repeat the command I get the output I expected the second time but I'm seeing the _previous_ instance of it, not the current one. > This problem is more visible since the commit 5c2992ee7fd8a29d0412 > ("printk: remove console flushing special cases for partial buffered > lines"). Gotcha. My bad. Thanks, Rob