From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756135AbcJTHSK (ORCPT ); Thu, 20 Oct 2016 03:18:10 -0400 Received: from mail-pf0-f176.google.com ([209.85.192.176]:32997 "EHLO mail-pf0-f176.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753341AbcJTHSI (ORCPT ); Thu, 20 Oct 2016 03:18:08 -0400 From: Joel Fernandes To: linux-kernel@vger.kernel.org Cc: Kees Cook , Joel Fernandes , Anton Vorontsov , Colin Cross , Tony Luck Subject: [PATCH 3/7] pstore: Warn for the case of PSTORE_TYPE_PMSG write using deprecated function Date: Thu, 20 Oct 2016 00:17:48 -0700 Message-Id: <1476947872-14485-4-git-send-email-joelaf@google.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1476947872-14485-1-git-send-email-joelaf@google.com> References: <1476947872-14485-1-git-send-email-joelaf@google.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org PMSG now uses ramoops_pstore_write_buf_user instead of ramoops_pstore_write_buf Print a ratelimited warning if the ramoops_pstore_write_buf is called. Signed-off-by: Joel Fernandes --- fs/pstore/ram.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/fs/pstore/ram.c b/fs/pstore/ram.c index cb07ef6..9104ae9 100644 --- a/fs/pstore/ram.c +++ b/fs/pstore/ram.c @@ -288,10 +288,8 @@ static int notrace ramoops_pstore_write_buf(enum pstore_type_id type, persistent_ram_write(cxt->fprz, buf, size, RAM_LOCK); return 0; } else if (type == PSTORE_TYPE_PMSG) { - if (!cxt->mprz) - return -ENOMEM; - persistent_ram_write(cxt->mprz, buf, size, RAM_LOCK); - return 0; + pr_warn_ratelimited("ramoops: warning: PMSG shouldn't call %s\n", + __func__); } if (type != PSTORE_TYPE_DMESG) -- 2.7.4