Re: [PATCH v2] hv_sock: Initializing vsk->trans to NULL to prevent a dangling pointer

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

 



On Thu, 7 Nov 2024 16:41:02 -0500 Michael S. Tsirkin wrote:
> On Thu, Nov 07, 2024 at 11:29:42AM -0800, Jakub Kicinski wrote:
> > On Wed, 6 Nov 2024 04:36:04 -0500 Hyunwoo Kim wrote:  
> > > When hvs is released, there is a possibility that vsk->trans may not
> > > be initialized to NULL, which could lead to a dangling pointer.
> > > This issue is resolved by initializing vsk->trans to NULL.
> > > 
> > > Fixes: ae0078fcf0a5 ("hv_sock: implements Hyper-V transport for Virtual Sockets (AF_VSOCK)")
> > > Cc: stable@xxxxxxxxxxxxxxx  
> > 
> > I don't see the v1 on netdev@, nor a link to it in the change log
> > so I may be missing the context, but the commit message is a bit
> > sparse.
> > 
> > The stable and Fixes tags indicate this is a fix. But the commit
> > message reads like currently no such crash is observed, quote:
> > 
> >                           which could lead to a dangling pointer.
> >                                 ^^^^^
> >                                      ?
> > 
> > Could someone clarify?  
> 
> I think it's just an accent, in certain languages/cultures expressing
> uncertainty is considered polite. Should be "can".

You're probably right, the issue perhaps isn't the phrasing as much 
as the lack of pointing out the code path in which the dangling pointer
would be deferenced.  Hyunwoo Kim, can you provide one?




[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux