Re: [PATCH 4/6] cifs: display the endpoint IP details in DebugData

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

 



On Mon, Jun 12, 2023 at 8:59 PM Enzo Matsumiya <ematsumiya@xxxxxxx> wrote:
>
> On 06/12, Paulo Alcantara wrote:
> >Shyam Prasad N <nspmangalore@xxxxxxxxx> writes:
> >
> >> I had to use kernel_getsockname to get socket source details, not
> >> kernel_getpeername.
> >
> >Why can't you use @server->srcaddr directly?
>
> That's only filled if explicitly passed through srcaddr= mount option
> (to bind it later in bind_socket()).
>
> Otherwise, it stays zeroed through @server's lifetime.

Yes. As Enzo mentioned, srcaddr is only useful if the user gave that
mount option.

Also, here's an updated version of the patch.
kernel_getsockname seems to be a blocking function, and we need to
drop the spinlock before calling it.

--
Regards,
Shyam

Attachment: 0001-cifs-display-the-endpoint-IP-details-in-DebugData.patch
Description: Binary data


[Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux