[linux-cifs-client] Re: [PATCH] [CIFS] Prevent OOPs when mounting with remote prefixpath

Shirish Pargaonkar shirishpargaonkar at gmail.com
Fri Feb 13 17:32:16 GMT 2009


On Fri, Feb 13, 2009 at 8:36 AM, Jeff Layton <jlayton at redhat.com> wrote:
> On Thu, 12 Feb 2009 23:18:16 -0600
> Shirish Pargaonkar <shirishpargaonkar at gmail.com> wrote:
>
>> On Tue, Feb 3, 2009 at 4:22 AM, Igor Mammedov <niallain at gmail.com> wrote:
>> > Managed to single out the part of  DFS root support from a big patch
>> > with a little modification.
>> > It will report error and fail to mount if perfixpath is on remote server.
>> > As well it will not scare people off with a error
>> > 'kernel BUG at fs/cifs/cifs_dfs_ref.c:274!'.
>> >
>> >
>> > ---------
>> > Fixes OOPs with message 'kernel BUG at fs/cifs/cifs_dfs_ref.c:274!'.
>> > Check if prefixpath in accessible while we are still in cifs_mount
>> > and fail with reporting a error if we can't access prefixpath
>> > (i.e. if prefixpath is located on another server)
>> >
>> >
>> > Best regards,
>> >
>> > -------------------------
>> > Igor Mammedov,
>> > niallain "at" gmail.com
>> >
>> >
>> >
>> >
>> >
>>
>> We need to bring back NIPQUAD and NIPQUAD_FMT back in cifs_mount
>> instead of %pI4 i..e.
>> sprintf(pSesInfo->serverName, NIPQUAD_FMT,
>>                                 NIPQUAD(srvTcp->addr.sockAddr.sin_addr.s_addr));
>> If we sprintf hex address in serverName instead of dotted-decimal
>> notation, the Path parameter in Tree Connect
>> to IPC$ share on the server to get dfs referral fails,
>> \\hex_address\IPC$ is not a valid UNC path name.
>>
>> I have not tried on a IPv6 setup, but I suspect the same applies to
>> IPv6 formatting.
>>
>
> I'm afraid I don't follow this. %pI4 formats the address in
> dotted-decimal format, not as a hex address. %pI6 should format it the
> same way that NIP6_FMT did.
>
> --
> Jeff Layton <jlayton at redhat.com>
>

Jeff,

You are right, it works. I was using 2.6.29-rc3 cifs code in 2.6.27
and  I think that is why.

Regards,

Shirish


More information about the linux-cifs-client mailing list