* [PATCH] mount: segmentation faults on UDP mounts
@ 2009-02-17 20:43 Steve Dickson
[not found] ` <499B2175.8030203-AfCzQyP5zfLQT0dZR+AlfA@public.gmane.org>
0 siblings, 1 reply; 2+ messages in thread
From: Steve Dickson @ 2009-02-17 20:43 UTC (permalink / raw)
To: linux-nfs
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;
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] mount: segmentation faults on UDP mounts
[not found] ` <499B2175.8030203-AfCzQyP5zfLQT0dZR+AlfA@public.gmane.org>
@ 2009-02-17 20:51 ` Chuck Lever
0 siblings, 0 replies; 2+ messages in thread
From: Chuck Lever @ 2009-02-17 20:51 UTC (permalink / raw)
To: Steve Dickson; +Cc: linux-nfs
Acked-by: Chuck Lever <chuck.lever@oracle.com>
On Feb 17, 2009, at Feb 17, 2009, 3:43 PM, Steve Dickson wrote:
> 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;
--
Chuck Lever
chuck[dot]lever[at]oracle[dot]com
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2009-02-17 20:52 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-02-17 20:43 [PATCH] mount: segmentation faults on UDP mounts Steve Dickson
[not found] ` <499B2175.8030203-AfCzQyP5zfLQT0dZR+AlfA@public.gmane.org>
2009-02-17 20:51 ` Chuck Lever
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.