public inbox for linux-rdma@vger.kernel.org
 help / color / mirror / Atom feed
* variable length array in qib
@ 2010-06-02 21:37 Roland Dreier
       [not found] ` <adar5kpqfpb.fsf-BjVyx320WGW9gfZ95n9DRSW4+XlvGpQz@public.gmane.org>
  0 siblings, 1 reply; 2+ messages in thread
From: Roland Dreier @ 2010-06-02 21:37 UTC (permalink / raw)
  To: Ralph Campbell, linux-rdma-u79uwXL29TY76Z2rM5mHXA

qib has the code

	void qib_disarm_piobufs_set(struct qib_devdata *dd, unsigned long *mask,
				    unsigned cnt)
	{
		struct qib_pportdata *ppd, *pppd[dd->num_pports];

it would probably be safer to avoid the variable length array pppd[] on
the kernel stack here... could this code be easily refactored to avoid
doing that?
-- 
Roland Dreier <rolandd-FYB4Gu1CFyUAvxtiuMwx3w@public.gmane.org> || For corporate legal information go to:
http://www.cisco.com/web/about/doing_business/legal/cri/index.html
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: variable length array in qib
       [not found] ` <adar5kpqfpb.fsf-BjVyx320WGW9gfZ95n9DRSW4+XlvGpQz@public.gmane.org>
@ 2010-06-02 23:01   ` Ralph Campbell
  0 siblings, 0 replies; 2+ messages in thread
From: Ralph Campbell @ 2010-06-02 23:01 UTC (permalink / raw)
  To: Roland Dreier; +Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org

Sure. I will work on a patch.

On Wed, 2010-06-02 at 14:37 -0700, Roland Dreier wrote:
> qib has the code
> 
> 	void qib_disarm_piobufs_set(struct qib_devdata *dd, unsigned long *mask,
> 				    unsigned cnt)
> 	{
> 		struct qib_pportdata *ppd, *pppd[dd->num_pports];
> 
> it would probably be safer to avoid the variable length array pppd[] on
> the kernel stack here... could this code be easily refactored to avoid
> doing that?


--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-06-02 23:01 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-06-02 21:37 variable length array in qib Roland Dreier
     [not found] ` <adar5kpqfpb.fsf-BjVyx320WGW9gfZ95n9DRSW4+XlvGpQz@public.gmane.org>
2010-06-02 23:01   ` Ralph Campbell

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox