If mountd writes more fslocs or more uuids, just ignore and warn once. Signed-off-by: Kinglong Mee <kinglongmee@xxxxxxxxx> --- fs/nfsd/export.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/fs/nfsd/export.c b/fs/nfsd/export.c index 90d37b6..1d56ae3 100644 --- a/fs/nfsd/export.c +++ b/fs/nfsd/export.c @@ -394,6 +394,12 @@ fsloc_parse(char **mesg, char *buf, struct nfsd4_fs_locations *fsloc) int len; int migrated, i, err; + /* utils writes more fslocs than one */ + if (fsloc->locations) { + WARN_ON_ONCE(1); + return 0; + } + /* listsize */ err = get_uint(mesg, &fsloc->locations_count); if (err) @@ -485,6 +491,12 @@ uuid_parse(char **mesg, char *buf, unsigned char **puuid) { int len; + /* utils writes more uuid than one */ + if (*puuid) { + WARN_ON_ONCE(1); + return 0; + } + /* expect a 16 byte uuid encoded as \xXXXX... */ len = qword_get(mesg, buf, PAGE_SIZE); if (len != EX_UUID_LEN) -- 1.9.0 -- To unsubscribe from this list: send the line "unsubscribe linux-nfs" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html