* drivers/staging/media/atomisp/pci/runtime/rmgr/src/rmgr_vbuf.c:275: dangling pointer ?
@ 2022-01-18 9:53 David Binderman
2022-01-19 10:29 ` gregkh
0 siblings, 1 reply; 3+ messages in thread
From: David Binderman @ 2022-01-18 9:53 UTC (permalink / raw)
To: mchehab@kernel.org, sakari.ailus@linux.intel.com,
gregkh@linuxfoundation.org, linux-media@vger.kernel.org,
linux-staging@lists.linux.dev, Linux Kernel Mailing List
Hello there,
Recent gcc development versions say:
drivers/staging/media/atomisp/pci/runtime/rmgr/src/rmgr_vbuf.c:275:33: warning: storing the address of local variable ‘h’ in ‘*handle’ [-Wdangling-pointer=]
Source code is
*handle = &h;
but h is a stack local variable, so exporting its address doesn't make any sense.
Regards
David Binderman
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: drivers/staging/media/atomisp/pci/runtime/rmgr/src/rmgr_vbuf.c:275: dangling pointer ?
2022-01-18 9:53 drivers/staging/media/atomisp/pci/runtime/rmgr/src/rmgr_vbuf.c:275: dangling pointer ? David Binderman
@ 2022-01-19 10:29 ` gregkh
2022-01-19 15:37 ` David Binderman
0 siblings, 1 reply; 3+ messages in thread
From: gregkh @ 2022-01-19 10:29 UTC (permalink / raw)
To: David Binderman
Cc: mchehab@kernel.org, sakari.ailus@linux.intel.com,
linux-media@vger.kernel.org, linux-staging@lists.linux.dev,
Linux Kernel Mailing List
On Tue, Jan 18, 2022 at 09:53:48AM +0000, David Binderman wrote:
> Hello there,
>
> Recent gcc development versions say:
>
> drivers/staging/media/atomisp/pci/runtime/rmgr/src/rmgr_vbuf.c:275:33: warning: storing the address of local variable ‘h’ in ‘*handle’ [-Wdangling-pointer=]
>
> Source code is
>
> *handle = &h;
>
> but h is a stack local variable, so exporting its address doesn't make any sense.
Great, can you send a patch to fix this up?
thanks,
greg k-h
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-01-19 15:37 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-01-18 9:53 drivers/staging/media/atomisp/pci/runtime/rmgr/src/rmgr_vbuf.c:275: dangling pointer ? David Binderman
2022-01-19 10:29 ` gregkh
2022-01-19 15:37 ` David Binderman
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).