Re: [linux-next:master 331/3266] drivers/gpu/drm/vc4/vc4_hdmi.c:1459:2-8: preceding lock on line 1456 (fwd)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Julia

On Sat, Aug 27, 2022 at 04:33:11PM +0200, Julia Lawall wrote:
> Please check whether anunlock is needed before line 1459.
> 
> julia
> 
> ---------- Forwarded message ----------
> Date: Fri, 26 Aug 2022 07:43:10 +0800
> From: kernel test robot <lkp@xxxxxxxxx>
> To: kbuild@xxxxxxxxxxxx
> Cc: lkp@xxxxxxxxx, Julia Lawall <julia.lawall@xxxxxxx>
> Subject: [linux-next:master 331/3266] drivers/gpu/drm/vc4/vc4_hdmi.c:1459:2-8:
>     preceding lock on line 1456
> 
> BCC: lkp@xxxxxxxxx
> CC: kbuild-all@xxxxxxxxxxxx
> CC: Linux Memory Management List <linux-mm@xxxxxxxxx>
> TO: Maxime Ripard <maxime@xxxxxxxxxx>
> 
> tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
> head:   b5d939c951865f6fc229094e84b77c9a9e0ed0c7
> commit: cd00ed5187bff03d4c2ba143a5993383dd6ed66c [331/3266] drm/vc4: hdmi: Protect device resources after removal
> :::::: branch date: 18 hours ago
> :::::: commit date: 6 weeks ago
> config: arm64-randconfig-c44-20220824 (https://download.01.org/0day-ci/archive/20220826/202208260727.0o3WQ2wp-lkp@xxxxxxxxx/config)
> compiler: aarch64-linux-gcc (GCC) 12.1.0
> 
> If you fix the issue, kindly add following tag where applicable
> Reported-by: kernel test robot <lkp@xxxxxxxxx>
> Reported-by: Julia Lawall <julia.lawall@xxxxxxx>
> 
> cocci warnings: (new ones prefixed by >>)
> >> drivers/gpu/drm/vc4/vc4_hdmi.c:1459:2-8: preceding lock on line 1456
>    drivers/gpu/drm/vc4/vc4_hdmi.c:1429:2-8: preceding lock on line 1426
> 
> vim +1459 drivers/gpu/drm/vc4/vc4_hdmi.c
> 
> c8b75bca92cbf0 Eric Anholt   2015-03-02  1442
> 8d9147466776c4 Maxime Ripard 2020-12-15  1443  static void vc4_hdmi_encoder_post_crtc_enable(struct drm_encoder *encoder,
> 8d9147466776c4 Maxime Ripard 2020-12-15  1444  					      struct drm_atomic_state *state)
> 09c438139b8f5b Maxime Ripard 2020-09-03  1445  {
> 09c438139b8f5b Maxime Ripard 2020-09-03  1446  	struct vc4_hdmi *vc4_hdmi = encoder_to_vc4_hdmi(encoder);
> cd00ed5187bff0 Maxime Ripard 2022-07-11  1447  	struct drm_device *drm = vc4_hdmi->connector.dev;
> 633be8c3c0c5e0 Maxime Ripard 2021-10-25  1448  	struct drm_display_mode *mode = &vc4_hdmi->saved_adjusted_mode;
> c3c2f38ce532c6 José Expósito 2022-04-20  1449  	struct drm_display_info *display = &vc4_hdmi->connector.display_info;
> 8b3f90e98e1764 Maxime Ripard 2020-09-03  1450  	bool hsync_pos = mode->flags & DRM_MODE_FLAG_PHSYNC;
> 8b3f90e98e1764 Maxime Ripard 2020-09-03  1451  	bool vsync_pos = mode->flags & DRM_MODE_FLAG_PVSYNC;
> 81fb55e500a82a Maxime Ripard 2021-10-25  1452  	unsigned long flags;
> 09c438139b8f5b Maxime Ripard 2020-09-03  1453  	int ret;
> cd00ed5187bff0 Maxime Ripard 2022-07-11  1454  	int idx;
> c8b75bca92cbf0 Eric Anholt   2015-03-02  1455
> 82cb88af12d29e Maxime Ripard 2021-10-25 @1456  	mutex_lock(&vc4_hdmi->mutex);
> 82cb88af12d29e Maxime Ripard 2021-10-25  1457
> cd00ed5187bff0 Maxime Ripard 2022-07-11  1458  	if (!drm_dev_enter(drm, &idx))
> cd00ed5187bff0 Maxime Ripard 2022-07-11 @1459  		return;

Thanks for the report. You're right this was a bug, but it should have
been addressed by

https://lore.kernel.org/all/20220824161327.330627-2-dakr@xxxxxxxxxx/

Maxime





[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux