Re: [PATCH v2] drm: avoid races with modesetting rights

From: Desmond Cheong Zhi Xi
Date: Mon Aug 16 2021 - 02:10:04 EST

On 16/8/21 2:47 am, kernel test robot wrote:
Hi Desmond,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on next-20210813]
[also build test WARNING on v5.14-rc5]
[cannot apply to linus/master v5.14-rc5 v5.14-rc4 v5.14-rc3]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in]

base: 4b358aabb93a2c654cd1dcab1a25a589f6e2b153
config: arc-randconfig-r031-20210815 (attached as .config)
compiler: arceb-elf-gcc (GCC) 11.2.0
reproduce (this is a W=1 build):
wget -O ~/bin/make.cross
chmod +x ~/bin/make.cross
git remote add linux-review
git fetch --no-tags linux-review Desmond-Cheong-Zhi-Xi/drm-avoid-races-with-modesetting-rights/20210815-234145
git checkout cf6d8354b7d7953cd866fad004cbb189adfa074f
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross ARCH=arc

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@xxxxxxxxx>

All warnings (new ones prefixed by >>):

drivers/gpu/drm/drm_auth.c:483:6: warning: no previous prototype for 'master_flush' [-Wmissing-prototypes]
483 | void master_flush(struct callback_head *cb)
| ^~~~~~~~~~~~

My bad, this should have been declared with static. I'll add it in, thanks.

vim +/master_flush +483 drivers/gpu/drm/drm_auth.c

480 /* After flushing, all readers that might have seen old master/lease
481 * permissions are guaranteed to have completed.
482 */
> 483 void master_flush(struct callback_head *cb)
484 {
485 struct drm_device *dev = container_of(cb, struct drm_device,
486 master_flush_work);
488 down_write(&dev->master_rwsem);
489 up_write(&dev->master_rwsem);
490 }

0-DAY CI Kernel Test Service, Intel Corporation