kmemleak from bcm2835_v4l2 kernel module

Open
#3,759 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
30/100
Issue type
Bug
Clarity
Needs clarification
Activity status
Stale
Tech stack
c

Research direction

Reproduce the report on the v5.4 or v5.8 branch with kmemleak, then trace the bcm2835_v4l2 probe path through vchiq_initialise, vchi_initialise, and vchiq_mmal_init as shown in the backtrace. Determine which allocation remains reported and verify that the kmemleak trace no longer appears when the issue is fixed.

Written by the indexing model from the issue text.

Description

I test v5.4 and v5.8 branch, when kernel module bcm2835_v4l2 is loaded, there is below kmemleak trace as below:

backtrace:
[<000000001c7fc46e>] kmem_cache_alloc_trace+0x178/0x3a4
[<00000000726f02dd>] vchiq_initialise+0x84/0x1b0 [vchiq]
[<000000005149603c>] vchi_initialise+0x30/0x5c [vchiq]
[<00000000a39a76ee>] vchiq_mmal_init+0x64/0x1cc [bcm2835_mmal_vchiq]
[<000000002d4a9a0a>] bcm2835_mmal_probe+0x34/0x470 [bcm2835_v4l2]
[<000000004ccd0b13>] platform_drv_probe+0x58/0xac
[<000000006b15ad99>] really_probe+0xe8/0x404
[<00000000e643e6da>] driver_probe_device+0x5c/0xf0
[<0000000001e8d9cc>] device_driver_attach+0xbc/0xc4
[<000000004ac3f57a>] __driver_attach+0x90/0x12c
[<00000000880346db>] bus_for_each_dev+0x80/0xd0
[<0000000042dbfbf7>] driver_attach+0x30/0x3c
[<00000000f7c00732>] bus_add_driver+0x108/0x1ec
[<0000000019ccb753>] driver_register+0x78/0x120
[<000000008ef5b751>] __platform_driver_register+0x54/0x60
[<00000000aa1de3f3>] 0xffffffc008d13028

thanks,
Limeng

Dominant language
C
Stars
13.2k
Forks
5.5k
Avg merge
2d 21h
Merged PRs (30d)
21

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from raspberrypi/linux

All issues in raspberrypi/linux

Similar issues

More C issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.