Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp836084pxk; Wed, 23 Sep 2020 18:26:18 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzkw2gArZ1CItvwmiL+3sq5mjIeUgI/0OTWA0aynwx34lQujoCdfvI6aRIadySjyIOKuE1Q X-Received: by 2002:a17:906:118d:: with SMTP id n13mr2262150eja.162.1600910778201; Wed, 23 Sep 2020 18:26:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600910778; cv=none; d=google.com; s=arc-20160816; b=jqgdOIG25Eip3j57L5QY6Ae8uvRImv0j1YGLM5z81Qq9ptz2YHulkcsIAVCQHPmVXH cKj3tMdcs+MQKEDZQgAAe69xEdRJTFuwLYDNdKPuP388/IjnTT19s7G4ElI8bnBhnI9+ eFsfVhizovP7lWrcoePQmapHWtxY6qS31JjCTdBayPuCey8ta58YByWtEgh6aT5O5ooK 5MdDHlcId723axzjaTbNnOB8M6WcwklANniTsLgpO2+uLUZLkaqJfBc426R2t+cXPeap gzQq+Ume/J6C8920g0hjZbiE2rRhgd0ByXNfRaCe6+HkJzVV1vSXal202/VoFj50U3SV EqQA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=igPpRkqz2XyzMzkU8JuUgO7QxgO9fdrNQoEexwdzcUg=; b=cP2cFHoUbc9D2ySgcS8jpbmnfgz0v94zm36LP8W3hXSxLo4oe8RMYPP9OP3avBVkHU jB9aFFlMd5R2xYEazfw4gX4EXeG5+0KP4oLu1RTv039x7TmFi0K/L91KrPGnHh2j/vuk 9Oo34S3H1lbO3K1eoy+Jbip8uavImfKcdDgAaw0XsNr7N8RVlNd1+kKZPG0NtyZq8Bij 73jvgFfc+8h4eQWRDm8tQi8B/hCDy7apOIGn3betu5tiLkvpww5ONH5zxrIYUlrL8Drn KSK+MEAjEDRKY4wJkv7woWYPe9Zi8PxmvPWEM3s+B0SaTj0NCFa0geKaTS5G/vLpmDZa XZ1Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=EBjVIhB6; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id j13si1092317edp.94.2020.09.23.18.25.47; Wed, 23 Sep 2020 18:26:18 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=EBjVIhB6; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726650AbgIXBVg (ORCPT + 99 others); Wed, 23 Sep 2020 21:21:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49384 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725208AbgIXBVg (ORCPT ); Wed, 23 Sep 2020 21:21:36 -0400 Received: from mail-pl1-x644.google.com (mail-pl1-x644.google.com [IPv6:2607:f8b0:4864:20::644]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 01F55C0613D4 for ; Wed, 23 Sep 2020 18:21:36 -0700 (PDT) Received: by mail-pl1-x644.google.com with SMTP id j7so714665plk.11 for ; Wed, 23 Sep 2020 18:21:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=igPpRkqz2XyzMzkU8JuUgO7QxgO9fdrNQoEexwdzcUg=; b=EBjVIhB6OfDRJIAiUCR71d+gb2psevpXoene0AJ0nRFcULfdopK8KrdPe/F9FJmCgb 8zi0VOXHlCWVdfWSjra+UEk282IjLmLZUPtV0WVzViQP05tIwRO1xcKCT/iUWraLYj2r 71lzww5GhZmX+iC5NnNOmqvdXdr28L7lIeccP9wUD0gIIo1stLkoYrQ58mStb0diOMw+ Yj5RcV1OgCYmmA3nesfaxrtuJtbjqDGmq+LzrODoJIPD2cGWkBDuGgRBL1TiMXJldP/o /OnQtbhuC8Ys6XxcrwPwPeH/KvHLnDAemjCcR6n/3ddOjGkdG5U4iGcskMsZmXNqEFK0 QN6Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=igPpRkqz2XyzMzkU8JuUgO7QxgO9fdrNQoEexwdzcUg=; b=n2mogvEdD3DKc98uRgV2vDpFdz69oa8Ob/7s2HhVjuaFZSVXnJ/Cnp9WOK2QYaPM2b RN8Oh/3v/GvOaUJvMmp7w47vdh9ugf0o9PY9r/QjXXQ2J0ujnP07EIS58sc6iM1RFsyx gpUTwXowN6PlaODZas7jqveMqDPH6lxtxP6N+DxymkSPqyza3gjaSoYdWBqk1DWa3xG5 btPAHCxwhxC3o783NIZTUEbMd9M+W+40dsS0G3oAH6C+2k5cpJCWEfia0gXHA7hdTZIE 5SDErlmZs1OD3ZgCxNuLqYPy/iqH8GPXj62a/TqgKypQ2eUPkbVSTntwGyTgAvyoeiEr csPQ== X-Gm-Message-State: AOAM531d0TNxYQS4xVbbLqYZJYsxibKnw/SBlU2q5CbH96mbeMQg8P9E QEDqrx2RYBOVpCY8mXv4y5g= X-Received: by 2002:a17:902:6941:b029:d0:cbe1:e705 with SMTP id k1-20020a1709026941b02900d0cbe1e705mr2313216plt.19.1600910495483; Wed, 23 Sep 2020 18:21:35 -0700 (PDT) Received: from localhost ([2409:10:2e40:5100:6e29:95ff:fe2d:8f34]) by smtp.gmail.com with ESMTPSA id 9sm906898pgx.76.2020.09.23.18.21.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Sep 2020 18:21:34 -0700 (PDT) Date: Thu, 24 Sep 2020 10:21:32 +0900 From: Sergey Senozhatsky To: John Ogness Cc: Petr Mladek , Sergey Senozhatsky , Sergey Senozhatsky , Steven Rostedt , Linus Torvalds , Greg Kroah-Hartman , Thomas Gleixner , linux-kernel@vger.kernel.org Subject: Re: [PATCH printk 3/5] printk: use buffer pool for sprint buffers Message-ID: <20200924012132.GA577@jagdpanzerIV.localdomain> References: <20200922153816.5883-1-john.ogness@linutronix.de> <20200922153816.5883-4-john.ogness@linutronix.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200922153816.5883-4-john.ogness@linutronix.de> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On (20/09/22 17:44), John Ogness wrote: [..] > int vprintk_store(int facility, int level, > const struct dev_printk_info *dev_info, > const char *fmt, va_list args) > { > - static char textbuf[LOG_LINE_MAX]; > - char *text = textbuf; > size_t text_len; > enum log_flags lflags = 0; > + unsigned long irqflags; > + int sprint_id; > + char *text; > + int ret; > + > + text = get_sprint_buf(&sprint_id, &irqflags); > + if (WARN_ON_ONCE(!text)) > + return 0; So we failed to get the buffer. How likely that this recursive WARN_ON_ONCE()->printk()->get_sprint_buf() will be able to get one? I would rather expect that we will entirely lose WARN_ON_ONCE(). -ss