Re: [PATCH] cifs: invalidate dns resolver keys after use

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Shyam Prasad N <nspmangalore@xxxxxxxxx> wrote:

> From 604ab4c350c2552daa8e77f861a54032b49bc706 Mon Sep 17 00:00:00 2001
> From: Shyam Prasad N <sprasad@xxxxxxxxxxxxx>
> Date: Sat, 18 Dec 2021 17:28:10 +0000
> Subject: [PATCH] cifs: invalidate dns resolver keys after use
> 
> We rely on dns resolver module to upcall to userspace
> using request_key and get us the DNS mapping.
> However, the invalidate arg for dns_query was set
> to false, which meant that the key created during the
> first call for a hostname would continue to be cached
> till it expires. This expiration period depends on
> how the dns_resolver is configured.
> 
> Fixing this by setting invalidate=true during dns_query.
> This means that the key will be cleaned up by dns_resolver
> soon after it returns the data. This also means that
> the dns_resolver subsystem will not cache the key for
> an interval indicated by the DNS records TTL. But this is
> okay since we use the TTL value returned to schedule the
> next lookup.
> 
> Signed-off-by: Shyam Prasad N <sprasad@xxxxxxxxxxxxx>

Acked-by: David Howells <dhowells@xxxxxxxxxx>




[Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux