All of lore.kernel.org
 help / color / mirror / Atom feed
From: Steve Dickson <SteveD@redhat.com>
To: linux-nfs@vger.kernel.org
Subject: [PATCH] mount: segmentation faults on UDP mounts
Date: Tue, 17 Feb 2009 15:43:33 -0500	[thread overview]
Message-ID: <499B2175.8030203@RedHat.com> (raw)

This came in over the weekend... when a server only supports 
UDP mounts, mount seg faults... this patch fixes the problem...

steved.

commit 52ec1b5fceece8f63b97afc6d6b78bfabff12669
Author: Steve Dickson <steved@redhat.com>
Date:   Tue Feb 17 15:33:58 2009 -0500

    The mount sockaddr len (mnt_salen) is not be set in
    nfs_extract_server_addresses() which causes the mount.nfs
    command to segmentation fault when a NFS server only
    supports UDP mounts.
    
    Signed-off-by: Steve Dickson <steved@redhat.com>

diff --git a/utils/mount/stropts.c b/utils/mount/stropts.c
index 770b5b5..c369136 100644
--- a/utils/mount/stropts.c
+++ b/utils/mount/stropts.c
@@ -331,9 +331,10 @@ static int nfs_extract_server_addresses(struct mount_options *options,
 		return 0;
 
 	option = po_get(options, "mountaddr");
-	if (option == NULL)
+	if (option == NULL) {
 		memcpy(mnt_saddr, nfs_saddr, *nfs_salen);
-	else if (!nfs_string_to_sockaddr(option, strlen(option),
+		*mnt_salen = *nfs_salen;
+	} else if (!nfs_string_to_sockaddr(option, strlen(option),
 						mnt_saddr, mnt_salen))
 		return 0;
 

             reply	other threads:[~2009-02-17 20:46 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-02-17 20:43 Steve Dickson [this message]
     [not found] ` <499B2175.8030203-AfCzQyP5zfLQT0dZR+AlfA@public.gmane.org>
2009-02-17 20:51   ` [PATCH] mount: segmentation faults on UDP mounts Chuck Lever

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=499B2175.8030203@RedHat.com \
    --to=steved@redhat.com \
    --cc=linux-nfs@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.