Suggested by Paolo. Ths patchset fixes several of the warnings generated by "-Wstack-usage=100000". There are about 20-30 unbound stack cases during my build, and this patch is only fixing several of them, those which are obvious and easy. For the rest, most of them need some knowledge on specific area (e.g., USB, net, block) to have a better assessment on the limitiation values, and are not covered in this patchset.
One thing to mention about patch 4: I still cannot figure out why the function xhci_dma_write_u32s() cannot be inlined in short time... However, the current fix can at least keep the code behavior not changed while making it stack bounded. Please let me know if anyone knows. Thanks. Peter CC: Markus Armbruster <arm...@redhat.com> CC: Kevin Wolf <kw...@redhat.com> CC: "Michael S. Tsirkin" <m...@redhat.com> CC: Paolo Bonzini <pbonz...@redhat.com> CC: Richard Henderson <r...@twiddle.net> CC: Eduardo Habkost <ehabk...@redhat.com> CC: Gerd Hoffmann <kra...@redhat.com> CC: Juan Quintela <quint...@redhat.com> CC: Amit Shah <amit.s...@redhat.com> CC: Luiz Capitulino <lcapitul...@redhat.com> CC: qemu-bl...@nongnu.org Peter Xu (8): qdict: fix unbounded stack for qdict_array_entries block: fix unbounded stack for dump_qdict usb: fix unbounded stack for ohci_td_pkt usb: fix unbounded stack for xhci_dma_write_u32s usb: fix unbounded stack for inotify_watchfn usb: fix unbounded stack for usb_mtp_add_str migration: fix unbounded stack for source_return_path_thread hw/i386: fix unbounded stack for load_multiboot block/qapi.c | 5 ++++- hw/i386/multiboot.c | 10 +++++++++- hw/usb/dev-mtp.c | 13 +++++++++---- hw/usb/hcd-ohci.c | 7 ++++--- hw/usb/hcd-xhci.c | 12 ++++++++---- migration/migration.c | 7 ++++--- qobject/qdict.c | 15 +++++++++------ 7 files changed, 47 insertions(+), 22 deletions(-) -- 2.4.3