From: Ben Hutchings <ben.hutchings@codethink.co.uk>
To: Arnd Bergmann <arnd@arndb.de>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
"# 3.4.x" <stable@vger.kernel.org>,
Hans Verkuil <hans.verkuil@cisco.com>,
Mauro Carvalho Chehab <mchehab@s-opensource.com>
Subject: Re: [PATCH 4.4 16/30] [media] pvrusb2: reduce stack usage pvr2_eeprom_analyze()
Date: Mon, 03 Jul 2017 14:37:46 +0100 [thread overview]
Message-ID: <1499089066.1935.77.camel@codethink.co.uk> (raw)
In-Reply-To: <CAK8P3a0TAfBAZ8yWxJZwxDshB1ck1yn=VOXtM6D=cko=9GVAnA@mail.gmail.com>
On Mon, 2017-07-03 at 09:47 +0200, Arnd Bergmann wrote:
> On Mon, Jul 3, 2017 at 9:31 AM, Greg Kroah-Hartman
> <gregkh@linuxfoundation.org> wrote:
> > On Thu, Jun 29, 2017 at 05:15:17PM +0100, Ben Hutchings wrote:
> >> On Mon, 2017-06-19 at 23:20 +0800, Greg Kroah-Hartman wrote:
> >> > 4.4-stable review patch. If anyone has any objections, please let me know.
> >> >
> >> > From: Arnd Bergmann <arnd@arndb.de>
> >> >
> >> > commit 6830733d53a4517588e56227b9c8538633f0c496 upstream.
[...]
> >> > Further analysis shows that putting an 'i2c_client' structure on
> >> > the stack is not really supported, as the embedded 'struct device'
> >> > is not initialized here, and we are only saved by the fact that
> >> > the function that is called here does not use the pointer at all.
> >> [...]
> >>
> >> That is not true in 4.4-stable. This commit depends on:
> >>
> >> commit 6037b3ca28f4258d913dbe77248fd77827702ae3
> >> Author: Mauro Carvalho Chehab <mchehab@s-opensource.com>
> >> Date: Wed Nov 16 14:21:48 2016 -0200
> >>
> >> [media] tveeprom: print log messages using pr_foo()
> >
> > It does? I don't understand how the two are connected. Removing
> > i2c_client off of the stack is a good thing. Ah, I see how the pointer
> > is used in tveeprom_hauppauge_analog(), but this shouldn't matter here,
> > right?
>
> My reading of the two patches is that we actually need at least one
> of them to avoid interpreting uninitialized dev->class/bus: With just my
> 6830733d53a patch, we replace the uninitialized data with a NULL
> pointer, which is handled gracefully in __dev_printk(), while the
> 6037b3ca28 patch by itself will avoid using the 'dev' pointer completely,
> and give a saner output (no "(NULL device)" string or worse).
>
> I think we probably want both of them backported to 4.4, but I don't see a
> dependency between them.
Sorry, I mixed up two commits. The one actually needed to avoid a null
dereference is:
commit 7cda4c5bae46ffca3abeadc4c1882d9325ee3102
Author: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Date: Thu Oct 13 10:51:20 2016 -0300
[media] tveeprom: use dev_foo() for printk messages
Then "[media] tveeprom: print log messages using pr_foo()" is cleanup on
top of that.
Ben.
--
Ben Hutchings
Software Developer, Codethink Ltd.
next prev parent reply other threads:[~2017-07-03 15:07 UTC|newest]
Thread overview: 40+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-06-19 15:20 [PATCH 4.4 00/30] 4.4.74-stable review Greg Kroah-Hartman
2017-06-19 15:20 ` [PATCH 4.4 01/30] configfs: Fix race between create_link and configfs_rmdir Greg Kroah-Hartman
2017-06-19 15:20 ` [PATCH 4.4 02/30] can: gs_usb: fix memory leak in gs_cmd_reset() Greg Kroah-Hartman
2017-06-19 15:20 ` [PATCH 4.4 04/30] [media] vb2: Fix an off by one error in vb2_plane_vaddr Greg Kroah-Hartman
2017-06-19 15:20 ` [PATCH 4.4 05/30] mac80211: dont look at the PM bit of BAR frames Greg Kroah-Hartman
2017-06-19 15:20 ` [PATCH 4.4 06/30] mac80211/wpa: use constant time memory comparison for MACs Greg Kroah-Hartman
2017-06-19 15:20 ` [PATCH 4.4 08/30] mac80211: fix IBSS presp allocation size Greg Kroah-Hartman
2017-06-19 15:20 ` [PATCH 4.4 10/30] x86/mm/32: Set the __vmalloc_start_set flag in initmem_init() Greg Kroah-Hartman
2017-06-19 15:20 ` [PATCH 4.4 11/30] mfd: omap-usb-tll: Fix inverted bit use for USB TLL mode Greg Kroah-Hartman
2017-06-19 15:20 ` [PATCH 4.4 12/30] staging: rtl8188eu: prevent an underflow in rtw_check_beacon_data() Greg Kroah-Hartman
2017-06-19 15:20 ` [PATCH 4.4 13/30] iio: proximity: as3935: recalibrate RCO after resume Greg Kroah-Hartman
2017-06-19 15:20 ` [PATCH 4.4 14/30] USB: hub: fix SS max number of ports Greg Kroah-Hartman
2017-06-19 15:20 ` [PATCH 4.4 15/30] usb: core: fix potential memory leak in error path during hcd creation Greg Kroah-Hartman
2017-06-19 15:20 ` [PATCH 4.4 16/30] [media] pvrusb2: reduce stack usage pvr2_eeprom_analyze() Greg Kroah-Hartman
2017-06-29 16:15 ` Ben Hutchings
2017-07-03 7:31 ` Greg Kroah-Hartman
2017-07-03 7:47 ` Arnd Bergmann
2017-07-03 13:37 ` Ben Hutchings [this message]
2017-07-03 14:39 ` Arnd Bergmann
2017-06-19 15:20 ` [PATCH 4.4 17/30] USB: gadget: dummy_hcd: fix hub-descriptor removable fields Greg Kroah-Hartman
2017-06-19 15:20 ` [PATCH 4.4 18/30] usb: r8a66597-hcd: select a different endpoint on timeout Greg Kroah-Hartman
2017-06-19 15:20 ` [PATCH 4.4 19/30] usb: r8a66597-hcd: decrease timeout Greg Kroah-Hartman
2017-06-19 15:20 ` [PATCH 4.4 20/30] drivers/misc/c2port/c2port-duramar2150.c: checking for NULL instead of IS_ERR() Greg Kroah-Hartman
2017-06-19 15:20 ` [PATCH 4.4 21/30] usb: xhci: ASMedia ASM1042A chipset need shorts TX quirk Greg Kroah-Hartman
2017-06-19 15:20 ` [PATCH 4.4 22/30] USB: gadgetfs, dummy-hcd, net2280: fix locking for callbacks Greg Kroah-Hartman
2017-06-29 16:57 ` Ben Hutchings
2017-06-29 18:10 ` Alan Stern
2017-06-19 15:20 ` [PATCH 4.4 23/30] mm/memory-failure.c: use compound_head() flags for huge pages Greg Kroah-Hartman
2017-06-19 15:20 ` [PATCH 4.4 24/30] swap: cond_resched in swap_cgroup_prepare() Greg Kroah-Hartman
2017-06-29 17:23 ` Ben Hutchings
2017-07-03 7:29 ` Greg Kroah-Hartman
2017-06-19 15:20 ` [PATCH 4.4 25/30] genirq: Release resources in __setup_irq() error path Greg Kroah-Hartman
2017-06-19 15:21 ` [PATCH 4.4 26/30] alarmtimer: Prevent overflow of relative timers Greg Kroah-Hartman
2017-06-19 15:21 ` [PATCH 4.4 27/30] usb: dwc3: exynos fix axius clock error path to do cleanup Greg Kroah-Hartman
2017-06-19 15:21 ` [PATCH 4.4 28/30] MIPS: Fix bnezc/jialc return address calculation Greg Kroah-Hartman
2017-06-19 15:21 ` [PATCH 4.4 29/30] alarmtimer: Rate limit periodic intervals Greg Kroah-Hartman
2017-06-19 15:21 ` [PATCH 4.4 30/30] mm: larger stack guard gap, between vmas Greg Kroah-Hartman
2017-06-21 5:41 ` Hugh Dickins
2017-06-24 15:00 ` Greg Kroah-Hartman
2017-06-20 0:11 ` [PATCH 4.4 00/30] 4.4.74-stable review Guenter Roeck
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1499089066.1935.77.camel@codethink.co.uk \
--to=ben.hutchings@codethink.co.uk \
--cc=arnd@arndb.de \
--cc=gregkh@linuxfoundation.org \
--cc=hans.verkuil@cisco.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mchehab@s-opensource.com \
--cc=stable@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.