From: Jim Cromie <jim.cromie@gmail.com>
To: jbaron@redhat.com, linux-kernel@vger.kernel.org
Cc: gregkh@linuxfoundation.org, Jim Cromie <jim.cromie@gmail.com>
Subject: [PATCH 2/2] dyndbg: add more info to -E2BIG log warning
Date: Thu, 16 Aug 2012 20:37:23 -0600 [thread overview]
Message-ID: <1345171043-14859-3-git-send-email-jim.cromie@gmail.com> (raw)
In-Reply-To: <1345171043-14859-1-git-send-email-jim.cromie@gmail.com>
ddebug_proc_write() warns if the written buffer is >4096 bytes.
Might as well tell user how much was attempted, in case its not obvious.
Signed-off-by: Jim Cromie <jim.cromie@gmail.com>
---
lib/dynamic_debug.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/lib/dynamic_debug.c b/lib/dynamic_debug.c
index 86d4065..0983f60 100644
--- a/lib/dynamic_debug.c
+++ b/lib/dynamic_debug.c
@@ -643,7 +643,8 @@ static ssize_t ddebug_proc_write(struct file *file, const char __user *ubuf,
if (len == 0)
return 0;
if (len > USER_BUF_PAGE - 1) {
- pr_warn("expected <%d bytes into control\n", USER_BUF_PAGE);
+ pr_warn("expected <%d bytes into control, you wrote %d\n",
+ USER_BUF_PAGE, len);
return -E2BIG;
}
tmpbuf = kmalloc(len + 1, GFP_KERNEL);
--
1.7.10.1.487.ga3935e6
next prev parent reply other threads:[~2012-08-17 2:38 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-08-17 2:37 [PATCH 0/2] dyndbg: trivial fixes Jim Cromie
2012-08-17 2:37 ` [PATCH 1/2] dyndbg: spelling fix in comment Jim Cromie
2012-08-17 2:37 ` Jim Cromie [this message]
2012-08-17 3:09 ` [PATCH 0/2] dyndbg: trivial fixes Greg KH
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1345171043-14859-3-git-send-email-jim.cromie@gmail.com \
--to=jim.cromie@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=jbaron@redhat.com \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®