From: Peter Hurley <peter@hurleysoftware.com>
To: Gianluca Anzolin <gianluca@sottospazio.it>
Cc: gustavo@padovan.org, marcel@holtmann.org,
linux-bluetooth@vger.kernel.org
Subject: Re: [PATCH v3 1/6] rfcomm: Take proper tty_struct references
Date: Fri, 26 Jul 2013 09:19:43 -0400 [thread overview]
Message-ID: <51F2776F.7010108@hurleysoftware.com> (raw)
In-Reply-To: <20130726125040.GA17477@sottospazio.it>
On 07/26/2013 08:50 AM, Gianluca Anzolin wrote:
> On Fri, Jul 26, 2013 at 08:07:30AM -0400, Peter Hurley wrote:
>> On 07/25/2013 02:32 PM, Gianluca Anzolin wrote:
>>>
>>> rfcomm_dlc_lock(dlc);
>>> tty->driver_data = dev;
>>> - dev->port.tty = tty;
>>> + tty_port_tty_set(&dev->port, tty);
>>
>> Although strictly speaking, this is correct, I would drop this change
>> because its functionality is replaced in 4/6 with the call to tty_port_open().
>> If you want, you could note in the commit message that the
>> raw assignments in rfcomm_tty_open/close are addressed in commit
>> 'rfcomm: Implement .activate, .shutdown and .carrier_raised methods'.
>
> Ok I will do that.
>
>>
>> [ BTW, you remove this line in 3/6 but it's needed until 4/6]
>
> Oh, I overlooked that "detail" when I changed the order of the patches...
Same thing just happened to me with a series of mine.
>>
>>> rfcomm_dlc_unlock(dlc);
>>> set_bit(RFCOMM_TTY_ATTACHED, &dev->flags);
>>>
>>> @@ -742,7 +747,7 @@ static void rfcomm_tty_close(struct tty_struct *tty, struct file *filp)
>>>
>>> rfcomm_dlc_lock(dev->dlc);
>>> tty->driver_data = NULL;
>>> - dev->port.tty = NULL;
>>> + tty_port_tty_set(&dev->port, NULL);
>>
>> Similarly, the call to tty_port_close() in 4/6 replaces this functionality.
>>
>> Regards,
>> Peter Hurley
>>
>
> Ok there is a need for a v4 after all.
>
> Btw did you look at the RFC patch about the dev_add nested locks?
> Do you think it's acceptable? I tried to add the device to the list at the end
> of the function but the fact is that the dlc callbacks need dev->id so I had to
> allocate it or set it to something not valid, like -1.
>
> I didn't also get any reply about the skb_queue_purge patch, I hope it's ok
I'm testing the whole patch series now. Assuming nothing breaks and v4 changes
are minimal, I'll give the whole series Reviewed-by: and Tested-by: tags.
When I'm done with that, I'll review the RFC patch.
For v4, you should direct To: Gustavo Padovan, cc: me instead, and add
cc's for Greg Kroah-Hartman <gregkh@linuxfoundation.org> and Jiri Slaby
<jslaby@suse.cz>
Regards,
Peter Hurley
For future reference, for a series like this you might want to consider
adding a cover letter 0/6 (with git format-patch --cover-letter) with an
overview of the whole series.
Cover letters give you an opportunity to explain the motivation
(rfcomm crashes on device disconnect because port reference counting
was broken), explain your solution (implement rfcomm as a proper tty_port),
and allows reviewers to comment on the series as whole (Good work :).
prev parent reply other threads:[~2013-07-26 13:19 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-07-25 18:32 [PATCH v3 1/6] rfcomm: Take proper tty_struct references Gianluca Anzolin
2013-07-25 18:32 ` [PATCH v3 2/6] rfcomm: Remove the device from the list in the destructor Gianluca Anzolin
2013-07-25 18:32 ` [PATCH v3 3/6] rfcomm: Move the tty initialization and cleanup out of open/close Gianluca Anzolin
2013-07-26 12:18 ` Peter Hurley
2013-07-25 18:32 ` [PATCH v3 4/6] rfcomm: Implement .activate, .shutdown and .carrier_raised methods Gianluca Anzolin
2013-07-25 18:32 ` [PATCH v3 5/6] rfcomm: Fix the reference counting of tty_port Gianluca Anzolin
2013-07-25 18:32 ` [PATCH v3 6/6] rfcomm: Purge the dlc->tx_queue to avoid circular dependency Gianluca Anzolin
2013-07-26 12:07 ` [PATCH v3 1/6] rfcomm: Take proper tty_struct references Peter Hurley
2013-07-26 12:50 ` Gianluca Anzolin
2013-07-26 13:19 ` Peter Hurley [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=51F2776F.7010108@hurleysoftware.com \
--to=peter@hurleysoftware.com \
--cc=gianluca@sottospazio.it \
--cc=gustavo@padovan.org \
--cc=linux-bluetooth@vger.kernel.org \
--cc=marcel@holtmann.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;
as well as URLs for NNTP newsgroup(s).