[<prev] [next>] [day] [month] [year] [list]
Message-ID: <202201130306.YgzUxxgI-lkp@intel.com>
Date: Thu, 13 Jan 2022 09:19:53 +0300
From: Dan Carpenter <dan.carpenter@...cle.com>
To: kbuild@...ts.01.org,
Dave Stevenson <dave.stevenson@...pberrypi.com>
Cc: lkp@...el.com, kbuild-all@...ts.01.org,
linux-kernel@...r.kernel.org,
Laurent Pinchart <laurent.pinchart@...asonboard.com>
Subject: [pinchartl-media:rpi/next/bcm2835-isp 5/49]
drivers/staging/vc04_services/vc-sm-cma/vc_sm.c:130 get_kernel_id() warn:
sleeping in atomic context
tree: git://linuxtv.org/pinchartl/media.git rpi/next/bcm2835-isp
head: 97975aa0732da0e2084ed69d140656c2162bec05
commit: 0cfa42bcc0795e569f1312e6ef5843c97bd36642 [5/49] staging: vc04_services: Add new vc-sm-cma driver
config: arm-randconfig-m031-20220112 (https://download.01.org/0day-ci/archive/20220113/202201130306.YgzUxxgI-lkp@intel.com/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 <lkp@...el.com>
Reported-by: Dan Carpenter <dan.carpenter@...cle.com>
smatch warnings:
drivers/staging/vc04_services/vc-sm-cma/vc_sm.c:130 get_kernel_id() warn: sleeping in atomic context
drivers/staging/vc04_services/vc-sm-cma/vc_sm.c:1245 vc_sm_cma_ioctl_alloc() error: we previously assumed 'buffer' could be null (see line 1133)
vim +130 drivers/staging/vc04_services/vc-sm-cma/vc_sm.c
0cfa42bcc0795e Dave Stevenson 2020-10-08 125 static int get_kernel_id(struct vc_sm_buffer *buffer)
0cfa42bcc0795e Dave Stevenson 2020-10-08 126 {
0cfa42bcc0795e Dave Stevenson 2020-10-08 127 int handle;
0cfa42bcc0795e Dave Stevenson 2020-10-08 128
0cfa42bcc0795e Dave Stevenson 2020-10-08 129 spin_lock(&sm_state->kernelid_map_lock);
Takes lock
0cfa42bcc0795e Dave Stevenson 2020-10-08 @130 handle = idr_alloc(&sm_state->kernelid_map, buffer, 0, 0, GFP_KERNEL);
Presumably GFP_KERNEL can sleep. Use GFP_ATOMIC?
0cfa42bcc0795e Dave Stevenson 2020-10-08 131 spin_unlock(&sm_state->kernelid_map_lock);
0cfa42bcc0795e Dave Stevenson 2020-10-08 132
0cfa42bcc0795e Dave Stevenson 2020-10-08 133 return handle;
0cfa42bcc0795e Dave Stevenson 2020-10-08 134 }
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
Powered by blists - more mailing lists