All of lore.kernel.org
 help / color / mirror / Atom feed
From: Greg KH <gregkh@suse.de>
To: Havard Skinnemoen <hskinnemoen@google.com>
Cc: alan@linux.intel.com, davej@redhat.com, jslaby@suse.cz,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] cdc-acm: Kill ACM_READY() macro completely
Date: Fri, 9 Dec 2011 19:32:04 -0800	[thread overview]
Message-ID: <20111210033204.GA26402@suse.de> (raw)
In-Reply-To: <1323478314-29443-1-git-send-email-hskinnemoen@google.com>

On Fri, Dec 09, 2011 at 04:51:54PM -0800, Havard Skinnemoen wrote:
> The ACM_READY() macro doesn't seem to do anything useful, and it may
> prevent tty_wait_until_sent() from working properly when called from
> close.
> 
> Previously, acm_tty_chars_in_buffer() returned 0 whenever
> acm->port.count was 0. This means close() could return before all the
> data has actually been written.
> 
> Signed-off-by: Havard Skinnemoen <hskinnemoen@google.com>
> ---
> Hi Greg,
> 
> Thanks for picking up  my patch. Unfortunately, it's not completely bug-free.
> 
> This fixes an issue I found while testing the patch: After writing something to
> /dev/ttyACM0, the process would hang for a fairly long time (10-15 seconds)
> when closing the device. This is because port.count drops to 0 before
> tty_wait_until_sent_from_close() is called, which causes ACM_READY() to return
> false, any outstanding writes never get reaped because the workqueue doesn't
> get scheduled, tty_wait_until_sent never sees any progress and eventually times
> out.
> 
> Please feel free to fold this into "cdc-acm: Fix potential deadlock (lockdep
> warning)", or let me know if you want me to send you a v2 of that patch
> instead.

I'll just apply this one, as I can't merge it together as I already
applied it.

thanks,

greg k-h

      reply	other threads:[~2011-12-10  3:34 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <13234763473078@kroah.org>
2011-12-10  0:51 ` [PATCH] cdc-acm: Kill ACM_READY() macro completely Havard Skinnemoen
2011-12-10  3:32   ` Greg KH [this message]

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=20111210033204.GA26402@suse.de \
    --to=gregkh@suse.de \
    --cc=alan@linux.intel.com \
    --cc=davej@redhat.com \
    --cc=hskinnemoen@google.com \
    --cc=jslaby@suse.cz \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.