Linux kernel -stable discussions
 help / color / mirror / Atom feed
From: Greg KH <gregkh@linuxfoundation.org>
To: Steve French <smfrench@gmail.com>
Cc: Pavel Shilovsky <piastryyy@gmail.com>, Stable <stable@vger.kernel.org>
Subject: Re: [PATCH] cifs: Always resolve hostname before reconnecting
Date: Mon, 4 Feb 2019 09:54:40 +0100	[thread overview]
Message-ID: <20190204085440.GB2015@kroah.com> (raw)
In-Reply-To: <CAH2r5mv7NzTBY_Yh-3YzPzP5WGUf9rsUQtoR11NEJNQntE0_mA@mail.gmail.com>

On Sat, Feb 02, 2019 at 02:30:41PM -0600, Steve French wrote:
> On Sat, Feb 2, 2019 at 12:17 PM Pavel Shilovsky <piastryyy@gmail.com> wrote:
> >
> > сб, 2 февр. 2019 г. в 10:13, Pavel Shilovsky <piastryyy@gmail.com>:
> > >
> > > сб, 2 февр. 2019 г. в 03:33, Greg KH <gregkh@linuxfoundation.org>:
> > > >
> > > > On Wed, Jan 30, 2019 at 04:07:30PM -0800, Pavel Shilovsky wrote:
> > > > > Commit 28eb24ff75c5 ("cifs: Always resolve hostname before reconnecting").
> > > > >
> > > > > In case a hostname resolves to a different IP address (e.g. long
> > > > > running mounts), make sure to resolve it every time prior to calling
> > > > > generic_ip_connect() in reconnect.
> > > > >
> > > > > This patch needs user space changes of cifs.upcall that set a timeout
> > > > > value for the "dns_resolver" key.
> > > >
> > > > Wait, you are requiring userspace to upgrade tools to support this?  And
> > > > you think that will happen to all systems running older kernels?
> > > >
> > > > This really feels like a new feature being added, what bug is this
> > > > fixing that requires it to be backported to all of the stable kernel
> > > > trees?
> > >
> > > Let's me describe what is going to happen without upgrade of the
> > > userspace tools. The 1st reconnect will cause proper resolving of DNS
> > > name and storing this name into the cache. All subsequent reconnects
> > > will use the value stored in the cache and do not attempt to resolve
> > > this DNS name. That means the fix will help partially but doesn't
> > > break anything.
> > >
> > > Once the userspace tools are upgraded, the cached DNS name will expire
> > > in 10 min, so every reconnect routine happening after that will use
> > > new IP. So, Linux distros will fully benefit from the patch once they
> > > upgrade the userspace tools but they do not need to synchronize
> > > updates of the kernel and the tools.
> > >
> > > The diff has been generated against the newest kernel but I checked
> > > that it cherry-picks to at least 4.4.y (and probably older ones).
> > >
> >
> > Adding Steve to comment on that.
> >
> > --
> > Best regards,
> > Pavel Shilovsky
> 
> Given the seriousness of the problem it fixes (hang on reconnect when
> server IP address changes) and that it could reduce possibility of
> data loss, this seems like it is reasonable to include in stable for
> kernels where it merges cleanly (which as Pavel noted may even include
> kernels older than 4.4).

Ok, thanks for the information, now queued up.

greg k-h

      reply	other threads:[~2019-02-04  8:55 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-31  0:07 [PATCH] cifs: Always resolve hostname before reconnecting Pavel Shilovsky
2019-01-31  7:16 ` Greg KH
2019-01-31 18:37   ` Pavel Shilovsky
2019-02-01 14:11     ` Sasha Levin
2019-02-01 20:17       ` Pavel Shilovsky
2019-02-02 11:31         ` Greg KH
2019-02-02 11:33 ` Greg KH
2019-02-02 18:13   ` Pavel Shilovsky
2019-02-02 18:17     ` Pavel Shilovsky
2019-02-02 20:30       ` Steve French
2019-02-04  8:54         ` 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=20190204085440.GB2015@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=piastryyy@gmail.com \
    --cc=smfrench@gmail.com \
    --cc=stable@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