mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Dean Jenkins <Dean_Jenkins@mentor.com>
To: Andre Naujoks <nautsch2@gmail.com>, linux-kernel@vger.kernel.org
Cc: Jiri Slaby <jslaby@suse.cz>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Subject: [PATCH 4/5] SLIP: Add error message for xleft non-zero
Date: Tue,  2 Jul 2013 16:31:33 +0100	[thread overview]
Message-ID: <1372779094-11730-5-git-send-email-Dean_Jenkins@mentor.com> (raw)
In-Reply-To: <1372779094-11730-1-git-send-email-Dean_Jenkins@mentor.com>

Add a printk to show when xleft is non-zero in sl_encaps.

The idea is to see whether a previous SLIP frame failed to be
fully transmitted.

Signed-off-by: Dean Jenkins <Dean_Jenkins@mentor.com>
---
 drivers/net/slip/slip.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/net/slip/slip.c b/drivers/net/slip/slip.c
index f7303e0..e2eff84 100644
--- a/drivers/net/slip/slip.c
+++ b/drivers/net/slip/slip.c
@@ -395,6 +395,10 @@ static void sl_encaps(struct slip *sl, unsigned char *icp, int len)
 #endif
 		count = slip_esc(p, sl->xbuff, len);
 
+	if (sl->xleft)
+		printk(KERN_ERR "%s: ERROR: xleft is non-zero %d\n",
+		       __func__, sl->xleft);
+
 	/* ensure xleft set by the previous SLIP frame is zero for this frame
 	 * otherwise slip_write_wakeup() can cause a recursive loop.
 	 */
-- 
1.8.1.5


  parent reply	other threads:[~2013-07-02 15:42 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-02 15:31 [PATCH 0/5] SLIP SLIP-Improve robustness to crashing Dean Jenkins
2013-07-02 15:31 ` [PATCH 1/5] Bluetooth: Add RFCOMM TTY write return error codes Dean Jenkins
2013-07-24 23:12   ` Peter Hurley
2013-07-02 15:31 ` [PATCH 2/5] SLIP: Handle error codes from the TTY layer Dean Jenkins
2013-07-24 22:18   ` Greg Kroah-Hartman
2013-07-02 15:31 ` [PATCH 3/5] SLIP: Prevent recursion stack overflow and scheduler crash Dean Jenkins
2013-07-25  1:12   ` Peter Hurley
2013-07-02 15:31 ` Dean Jenkins [this message]
2013-07-24 22:18   ` [PATCH 4/5] SLIP: Add error message for xleft non-zero Greg Kroah-Hartman
2013-07-24 22:41     ` Paul Bolle
2013-07-02 15:31 ` [PATCH 5/5] SLIP: Fix transmission segmentation mechanism Dean Jenkins
2013-07-24 22:18   ` Greg Kroah-Hartman
2013-07-25  0:13   ` Peter Hurley

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=1372779094-11730-5-git-send-email-Dean_Jenkins@mentor.com \
    --to=dean_jenkins@mentor.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=jslaby@suse.cz \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nautsch2@gmail.com \
    /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®