staging: bcm2835-camera: Initialise dev in v4l2_dev#6754
Merged
6by9 merged 1 commit intoraspberrypi:rpi-6.12.yfrom Apr 2, 2025
Merged
staging: bcm2835-camera: Initialise dev in v4l2_dev#67546by9 merged 1 commit intoraspberrypi:rpi-6.12.yfrom
6by9 merged 1 commit intoraspberrypi:rpi-6.12.yfrom
Conversation
Commit 42a2f66 ("staging: vc04_services: Move global g_state to vchiq_state") changed mmal_init to pass dev->v4l2_dev.dev to vchiq_mmal_init, however nothing iniitialised dev->v4l2_dev, so we got a NULL pointer dereference. Set dev->v4l2_dev.dev during bcm2835_mmal_probe. The device pointer could be passed into v4l2_device_register to set it, however that also has other effects that would need additional changes. Fixes: 42a2f66 ("staging: vc04_services: Move global g_state to vchiq_state") Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
pelwell
approved these changes
Apr 1, 2025
Contributor
pelwell
left a comment
There was a problem hiding this comment.
Approving on the basis that it's small and effective.
popcornmix
added a commit
to raspberrypi/firmware
that referenced
this pull request
Apr 2, 2025
…se HATs See: raspberrypi/linux#6758 kernel: ads7846 touch overlay fixups See: raspberrypi/linux#6760 kernel: staging: bcm2835-camera: Initialise dev in v4l2_dev See: raspberrypi/linux#6754 kernel: media: i2c: imx415: Correct hmax_min values for 891Mbps/lane See: raspberrypi/linux#6750 kernel: PCI: pcie-brcmstb: fake MSIx support on internal MSI target See: raspberrypi/linux#6761 kernel: DRM fixes for cropping P030/SAND128 on Pi5 See: raspberrypi/linux#6741 kernel: Show process name in set_mempolicy() ignored message See: raspberrypi/linux#6762
popcornmix
added a commit
to raspberrypi/rpi-firmware
that referenced
this pull request
Apr 2, 2025
…se HATs See: raspberrypi/linux#6758 kernel: ads7846 touch overlay fixups See: raspberrypi/linux#6760 kernel: staging: bcm2835-camera: Initialise dev in v4l2_dev See: raspberrypi/linux#6754 kernel: media: i2c: imx415: Correct hmax_min values for 891Mbps/lane See: raspberrypi/linux#6750 kernel: PCI: pcie-brcmstb: fake MSIx support on internal MSI target See: raspberrypi/linux#6761 kernel: DRM fixes for cropping P030/SAND128 on Pi5 See: raspberrypi/linux#6741 kernel: Show process name in set_mempolicy() ignored message See: raspberrypi/linux#6762
Contributor
|
@6by9 Thanks for fixing. Could you please send the patch upstream? |
Contributor
Author
Will do. |
Contributor
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Commit 42a2f66 ("staging: vc04_services: Move global g_state to vchiq_state") changed mmal_init to pass dev->v4l2_dev.dev to vchiq_mmal_init, however nothing iniitialised dev->v4l2_dev, so we got a NULL pointer dereference.
Set dev->v4l2_dev.dev during bcm2835_mmal_probe. The device pointer could be passed into v4l2_device_register to set it, however that also has other effects that would need additional changes.
Fixes: 42a2f66 ("staging: vc04_services: Move global g_state to vchiq_state")
#6753