CC: [email protected]
CC: Linux Memory Management List <[email protected]>
TO: Rob Clark <[email protected]>

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git 
pending-fixes
head:   076a1cb758f782b71838d6d464f19be80dd14231
commit: 68002469e571ae3db095e4ade1cfef64903f8fa1 [55/257] drm/msm: One sched 
entity per process per priority
:::::: branch date: 2 days ago
:::::: commit date: 13 days ago
config: arm-allyesconfig (attached as .config)
compiler: arm-linux-gnueabi-gcc (GCC) 11.2.0

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <[email protected]>
Reported-by: Julia Lawall <[email protected]>


cocci warnings: (new ones prefixed by >>)
>> drivers/gpu/drm/msm/msm_submitqueue.c:105:3-9: preceding lock on line 93

vim +105 drivers/gpu/drm/msm/msm_submitqueue.c

f7de15450e906e Jordan Crouse 2017-10-20   79  
68002469e571ae Rob Clark     2021-10-01   80  static struct drm_sched_entity *
68002469e571ae Rob Clark     2021-10-01   81  get_sched_entity(struct 
msm_file_private *ctx, struct msm_ringbuffer *ring,
68002469e571ae Rob Clark     2021-10-01   82             unsigned ring_nr, enum 
drm_sched_priority sched_prio)
68002469e571ae Rob Clark     2021-10-01   83  {
68002469e571ae Rob Clark     2021-10-01   84    static 
DEFINE_MUTEX(entity_lock);
68002469e571ae Rob Clark     2021-10-01   85    unsigned idx = (ring_nr * 
NR_SCHED_PRIORITIES) + sched_prio;
68002469e571ae Rob Clark     2021-10-01   86  
68002469e571ae Rob Clark     2021-10-01   87    /* We should have already 
validated that the requested priority is
68002469e571ae Rob Clark     2021-10-01   88     * valid by the time we get 
here.
68002469e571ae Rob Clark     2021-10-01   89     */
68002469e571ae Rob Clark     2021-10-01   90    if (WARN_ON(idx >= 
ARRAY_SIZE(ctx->entities)))
68002469e571ae Rob Clark     2021-10-01   91            return ERR_PTR(-EINVAL);
68002469e571ae Rob Clark     2021-10-01   92  
68002469e571ae Rob Clark     2021-10-01  @93    mutex_lock(&entity_lock);
68002469e571ae Rob Clark     2021-10-01   94  
68002469e571ae Rob Clark     2021-10-01   95    if (!ctx->entities[idx]) {
68002469e571ae Rob Clark     2021-10-01   96            struct drm_sched_entity 
*entity;
68002469e571ae Rob Clark     2021-10-01   97            struct 
drm_gpu_scheduler *sched = &ring->sched;
68002469e571ae Rob Clark     2021-10-01   98            int ret;
68002469e571ae Rob Clark     2021-10-01   99  
68002469e571ae Rob Clark     2021-10-01  100            entity = 
kzalloc(sizeof(*ctx->entities[idx]), GFP_KERNEL);
68002469e571ae Rob Clark     2021-10-01  101  
68002469e571ae Rob Clark     2021-10-01  102            ret = 
drm_sched_entity_init(entity, sched_prio, &sched, 1, NULL);
68002469e571ae Rob Clark     2021-10-01  103            if (ret) {
68002469e571ae Rob Clark     2021-10-01  104                    kfree(entity);
68002469e571ae Rob Clark     2021-10-01 @105                    return 
ERR_PTR(ret);
68002469e571ae Rob Clark     2021-10-01  106            }
68002469e571ae Rob Clark     2021-10-01  107  
68002469e571ae Rob Clark     2021-10-01  108            ctx->entities[idx] = 
entity;
68002469e571ae Rob Clark     2021-10-01  109    }
68002469e571ae Rob Clark     2021-10-01  110  
68002469e571ae Rob Clark     2021-10-01  111    mutex_unlock(&entity_lock);
68002469e571ae Rob Clark     2021-10-01  112  
68002469e571ae Rob Clark     2021-10-01  113    return ctx->entities[idx];
68002469e571ae Rob Clark     2021-10-01  114  }
68002469e571ae Rob Clark     2021-10-01  115  

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/[email protected]

Attachment: .config.gz
Description: application/gzip

_______________________________________________
kbuild mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to