Re: 5.1.8 s390x error: invalid path supplied for cmd(0xc018937e)

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

 



On Fri, 2022-01-21 at 14:58 +0800, Ian Kent wrote:
> On Thu, 2022-01-20 at 14:55 -0300, Andreas Hasenack wrote:
> > Hi again,
> > 
> > On Thu, Jan 20, 2022 at 10:16 AM Andreas Hasenack
> > <andreas@xxxxxxxxxxxxx> wrote:
> > > Something still feels wrong, though, and behaves differently from
> > > 5.1.7.
> > > 
> > > I applied all your patches for 5.1.8, even unrelated ones, and
> > > tried this:
> > > # this would trigger the segfault in plain 5.1.8:
> > > root@j-s390x:~# time ls -la /cifs/localhost/private
> > > total 4
> > > drwxr-xr-x 2 root root  0 Dec 27 20:15 .
> > > drwxr-xr-x 5 root root  0 Jan 20 13:03 ..
> > > -rwxr-xr-x 1 root root 64 Jan 19 13:02 hello-private.txt
> > > 
> > > real    0m0.130s
> > > user    0m0.000s
> > > sys     0m0.001s
> > > root@j-s390x:~# time ls -la /cifs/localhost/pub
> > > total 4
> > > drwxr-xr-x 2 root root  0 Dec 27 20:15 .
> > > drwxr-xr-x 5 root root  0 Jan 20 13:03 ..
> > > -rwxr-xr-x 1 root root 63 Jan 19 13:02 hello-public.txt
> > > 
> > > real    0m0.014s
> > > user    0m0.001s
> > > sys     0m0.001s
> > > 
> > > # This is expected to fail, because I only have
> > > /etc/creds/localhost,
> > > not /etc/creds/127.0.0.1
> > > root@j-s390x:~# time ls -la /cifs/127.0.0.1/private
> > > ls: cannot access '/cifs/127.0.0.1/private': No such file or
> > > directory
> > > 
> > > real    0m0.075s
> > > user    0m0.000s
> > > sys     0m0.001s
> > > 
> > > # but this hangs, and ls process goes into D state. With 5.1.7 it
> > > works.
> > > root@j-s390x:~# time ls -la /cifs/127.0.0.1/pub
> > > <hangs>
> > 
> > The above hang happens for me when patch 5 is applied: [PATCH 05/19]
> > autofs-5.1.8 - fix root offset error handling
> > 
> > In summary, for my s390x case:
> > - [PATCH 05/19] autofs-5.1.8 - fix root offset error handling:
> > introduces the hang in the above scenario
> > - [PATCH 08/19] autofs-5.1.8 - fix loop under run in
> > cache_get_offset_parent(): fixes the s390x segfault, and failure to
> > mount the private cifs share
> 
> Thanks for you efforts on this problem.
> The patch 5 introducing a hang is interesting, I'll have to have a
> look at that.

I think this patch might help with that hang.
I may merge that into the original patch but it's separate for now
to facilitate testing.

autofs-5.1.8 - fix fix root offset error handling

From: Ian Kent <raven@xxxxxxxxxx>

The change to fix root offset error handlling is missing a cache read
lock prior to the key lookup, the following unmatched unlock then
causes a hang.

Signed-off-by: Ian Kent <raven@xxxxxxxxxx>
---
 CHANGELOG       |    1 +
 daemon/direct.c |    1 +
 2 files changed, 2 insertions(+)

diff --git a/CHANGELOG b/CHANGELOG
index 6f18a0bb..f81b0259 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -3,6 +3,7 @@
 - fix set open file limit.
 - improve descriptor open error reporting.
 - fix root offset error handling.
+- fix fix root offset error handling.
 
 19/10/2021 autofs-5.1.8
 - add xdr_exports().
diff --git a/daemon/direct.c b/daemon/direct.c
index 8810900c..cf3f24d7 100644
--- a/daemon/direct.c
+++ b/daemon/direct.c
@@ -1275,6 +1275,7 @@ static void *do_mount_direct(void *arg)
 		/* If this is a multi-mount subtree mount failure
 		 * ensure the tree continues to expire.
 		 */
+		cache_readlock(mt.mc);
 		me = cache_lookup_distinct(mt.mc, mt.name);
 		if (me && IS_MM(me) && !IS_MM_ROOT(me))
 			conditional_alarm_add(ap, ap->exp_runfreq);





[Index of Archives]     [Linux Filesystem Development]     [Linux Ext4]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux