Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp206793imm; Tue, 18 Sep 2018 20:06:36 -0700 (PDT) X-Google-Smtp-Source: ANB0VdZXofuk+nZ5ivxVklIQ0aqE1r2pVwKL8Uu/24FnaUoMImzifDtwtoRfBWfbGdEgFA1sMNkH X-Received: by 2002:a17:902:204:: with SMTP id 4-v6mr28624574plc.281.1537326395996; Tue, 18 Sep 2018 20:06:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537326395; cv=none; d=google.com; s=arc-20160816; b=gXMYSzOHP49zS+gPO0HRpBdp4UxhmtqQ2OaDmXY2Z0I8vh/Mn6jnRt6mkjSU5NgvxP dKXAtYyYM/KIx9G4cziS8BqCUTn+G5IGMgOw1g4XcWxGp/ybtscpiEyZzApkCtdCYLAG oB1z4OAycMFR6Xw1l6Fmhcj8325xLzUf9hD1CBHuKWUtkOcpmJcFl34c/8k9YyDxY8rB MdV50tRnwTkW5q9gIy80IvlqsZDk955eRiqoK2+HtSJYwS7GMu27LXp3/KJCjnEcHW2A S7zbWa464Q28qNE/NuwGBuPXpQWY7fJOCbywZ3/9LAzBKQp7rHdSDWguaHPjo4sfZ1uX 1Zvg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date; bh=kxIbCMD23Kh8yKES3fX1eFQ47310m8mMFuER4c3msVA=; b=oUn8oXJkyuNqUhE8rh9AxhGfLN6ZB8wzUfVENzBmGpJCPEQKOCY+ev2M+TdYpqIrpY nqF0rJWZLEK7bW5SOxJ5CBiwvygOGyPI0gDJ2i0szqU4T8i3YxYgJ0V9EE9qnd7h+nJu Cwc1kAIQzXF+C3JNl8cK0YU4jhEfyM5NwJh+i6NGeuLxuAfQUnHZtN95cMlb/1IDOO+F aSXJ3/YV0Q0BbW+BJkwvg5pwyvaGaB63S7P8NpBNWRVdWW/zWenQ/3RjnJVZUMrqEyQf J+eshLm2+Hph/60dlF0X4PQ05AVTtOlFaU3hgvjNPmgzca8hgKfeRbAAjBpBJ3gz3a/K s65g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d11-v6si21204653pla.245.2018.09.18.20.06.20; Tue, 18 Sep 2018 20:06:35 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726971AbeISIl0 (ORCPT + 99 others); Wed, 19 Sep 2018 04:41:26 -0400 Received: from mail.kernel.org ([198.145.29.99]:33846 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725817AbeISIl0 (ORCPT ); Wed, 19 Sep 2018 04:41:26 -0400 Received: from vmware.local.home (cpe-66-24-56-78.stny.res.rr.com [66.24.56.78]) (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 2E55C2083A; Wed, 19 Sep 2018 03:05:40 +0000 (UTC) Date: Tue, 18 Sep 2018 23:05:37 -0400 From: Steven Rostedt To: Sergey Senozhatsky Cc: He Zhe , pmladek@suse.com, sergey.senozhatsky@gmail.com, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 1/2] printk: Fix panic caused by passing log_buf_len to command line Message-ID: <20180918230537.30448bd7@vmware.local.home> In-Reply-To: <20180919024754.GA15128@jagdpanzerIV> References: <1537291068-443145-1-git-send-email-zhe.he@windriver.com> <20180919015030.GA423@jagdpanzerIV> <6c354803-5341-7237-9ee3-7882252c7483@windriver.com> <20180919023932.GA14090@jagdpanzerIV> <20180918224312.6e9aef50@vmware.local.home> <20180919024754.GA15128@jagdpanzerIV> X-Mailer: Claws Mail 3.15.1 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 19 Sep 2018 11:47:54 +0900 Sergey Senozhatsky wrote: > On (09/18/18 22:43), Steven Rostedt wrote: > > > First - switch to u64 size. > > > Second - check for NULL str. > > > > > I think I would switch it around. Check for NULL first, and then switch > > to u64. It was always an int, do we need to backport converting it to > > u64 to stable? The NULL check is a definite, the overflow of int > > shouldn't crash anything. > > Agreed. This order makes much more sense. Do you mind, tho, to have > "unsigned int size" in the first patch along with NULL str check? > Just to silent the checkpatch. > I guess that doesn't hurt. I'd personally would keep it separate (just fix what's broken), but it's such a slight change, I don't have any strong feelings about it. Thanks, -- Steve