From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Dmitry Vyukov <dvyukov@google.com>
Cc: xinhui <xinhui@linux.vnet.ibm.com>, Jiri Slaby <jslaby@suse.cz>,
LKML <linux-kernel@vger.kernel.org>,
Alan Cox <alan@linux.intel.com>, stable <stable@vger.kernel.org>
Subject: Re: [PATCH] TTY: n_gsm, fix false positive WARN_ON
Date: Tue, 01 Mar 2016 05:01:25 +0000 [thread overview]
Message-ID: <20160301050124.GA19068@kroah.com> (raw)
In-Reply-To: <CACT4Y+bdzX213CJfGH0WYamOYmaNjrUtOaF6HLwtZ=vHHq=QQA@mail.gmail.com>
On Sun, Feb 28, 2016 at 05:16:15PM +0100, Dmitry Vyukov wrote:
> On Wed, Nov 25, 2015 at 11:32 AM, xinhui <xinhui@linux.vnet.ibm.com> wrote:
> > hi, Jiri
> >
> > On 2015/11/25 17:56, Jiri Slaby wrote:
> >>
> >> Hi,
> >>
> >> On 11/25/2015, 07:32 AM, xinhui wrote:
> >>>
> >>> This warning should blame on commit 5a640967 ("tty/n_gsm.c: fix a
> >>> memory leak in gsmld_open()").
> >>
> >>
> >> Oh, yes, I messed up the "Fixes" line then. It should write:
> >> Fixes: 5a640967 ("tty/n_gsm.c: fix a memory leak in gsmld_open()")
> >>
> > that's Okay. :)
> >
> >>> I have one confusion. As there is field gsm->num to store the index of
> >>> gsm_mux[]. so in gsm_cleanup_mux(), why we still use for-loop to find
> >>> this mux?
> >>>
> >>> In error handle path, for example, the call trace in this patch, as we
> >>> failed to activate it and the
> >>> gsm->num is invalid(and the value is 0). we can just modify the codes
> >>> like below:
> >>>
> >>> if(gsm_mux[gsm->num] == gsm)
> >>> ....other work
> >>> else
> >>> return;
> >>>
> >>> I think it would work, and the logic is correct. Or I just miss
> >>> something important?
> >>
> >>
> >> Yup, it looks like a cleanup. Could you prepare a separate patch for that?
> >>
> > yes, I will do that :)
> >
> >> Something like this:
> >> /* open failed before registering => nothing to do */
> >> if (gsm_mux[gsm->num] != gsm)
> >> return;
> >> spin_lock(&gsm_mux_lock);
> >> gsm_mux[gsm->num] = NULL;
> >> spin_unlock(&gsm_mux_lock);
> >>
> > looks pretty good, thanks.
>
>
> This is still not merged and fires regularly for me. Can we please merge it?
merge what? I don't see any patch here or in my queue for this :(
next prev parent reply other threads:[~2016-03-01 5:01 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CACT4Y+bHQbAB68VFi7Romcs-Z9ZW3kQRvcq+BvHH1oa5NcAdLA@mail.gmail.com>
2015-11-24 16:54 ` [PATCH] TTY: n_gsm, fix false positive WARN_ON Jiri Slaby
2015-11-25 6:32 ` xinhui
2015-11-25 9:56 ` Jiri Slaby
2015-11-25 10:32 ` xinhui
2016-02-28 16:16 ` Dmitry Vyukov
2016-03-01 5:01 ` Greg Kroah-Hartman [this message]
2016-03-01 9:03 ` Dmitry Vyukov
2016-03-01 17:15 ` Greg Kroah-Hartman
2016-03-22 17:09 ` Jiri Slaby
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=20160301050124.GA19068@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=alan@linux.intel.com \
--cc=dvyukov@google.com \
--cc=jslaby@suse.cz \
--cc=linux-kernel@vger.kernel.org \
--cc=stable@vger.kernel.org \
--cc=xinhui@linux.vnet.ibm.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;
as well as URLs for NNTP newsgroup(s).