Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp1518401pxb; Thu, 4 Feb 2021 15:28:29 -0800 (PST) X-Google-Smtp-Source: ABdhPJwWa5sIzx2/JMyuvBaO3t3v+QwqIvyM8kZGKSf0I6TH88sheTa42Dw2VdhGJqKYkv1tSBn2 X-Received: by 2002:a17:906:7e42:: with SMTP id z2mr1389535ejr.177.1612481309369; Thu, 04 Feb 2021 15:28:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612481309; cv=none; d=google.com; s=arc-20160816; b=IPPUFM4vN+tboxjCVaFrixTh1Q7qbtXuh7oQKm9NdH5Y6KFIZoiZ4I1juTrro7Ncsy J02YKdg0Wkuoi9HifBg7zzf6LWDkOO3IJn3FUGDOfflA1Gz8Qv8Ld4iDa8czxfVZgeaV BeigpfkF94Eq2u7iQv2dp0Xf9Mzl0bqL7rQk/k79JHqGShgCntwg3pEACiq1/V/B9ij+ ETqJ58T8vi/1zDKF9pSQUpwns12nwc2ayozlzeIWhEGEHPNdX2+ZrtdKExNUWkqWoLDi VZtdMiin6nFpSritLQR3F7L5RQ2lIvD+SxxsYzCr+llifARVKG9XnnFIb+YiVjDXlazo Lvkw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:mime-version :dkim-signature; bh=m4Svsks4F1WJxXzmQuHWNGVoFSZ6gcnQj15bvC/Ooz0=; b=O/2J+ixSX7/yTcWNeD2m5eoLWQ3WwWwOuGMdyjSHBpcq6Jfe1f4frD6v7T/yogPbTK IepYqzxtN4Lm5e1iGc56xMJLuotJGCYivr94J7dFlAsNFW3b9YDMEpO1iROD47t/Kq/8 lnyC8Dd054oynWu8R1IDGslGSQ0/OeDM4ck9GdbIV+Lpk0Ft3wdOT+3Gw0LGhyl01c2o fyzC7L1LaijUpKag6nghjJH+rB5dNfqVbin36r9bNRW41eMwgp3wfIo6BEpYDIxsWkjr Hn9xiL8xRS1TLekZU1LFixmJlfcjzyxQ7eINbtuPULHMhWV0CfFYVn/iq774gHcvfwmz ExFA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=gMJ2xTHU; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id q17si2399827edg.401.2021.02.04.15.28.05; Thu, 04 Feb 2021 15:28:29 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=gMJ2xTHU; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231359AbhBDHOp (ORCPT + 99 others); Thu, 4 Feb 2021 02:14:45 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45732 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230252AbhBDHOn (ORCPT ); Thu, 4 Feb 2021 02:14:43 -0500 Received: from mail-ed1-x529.google.com (mail-ed1-x529.google.com [IPv6:2a00:1450:4864:20::529]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 279E5C061573 for ; Wed, 3 Feb 2021 23:14:03 -0800 (PST) Received: by mail-ed1-x529.google.com with SMTP id s3so2823023edi.7 for ; Wed, 03 Feb 2021 23:14:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:from:date:message-id:subject:to:cc; bh=m4Svsks4F1WJxXzmQuHWNGVoFSZ6gcnQj15bvC/Ooz0=; b=gMJ2xTHUNIpcuu/J7Ya68NOeZt8o6s5Bm08ruKNPXOLhlWPlMOvYXz8LPxzMvU6L2S LvI9BCHyUYNmsUX6Rzw8OYCjGHNevqWkTFeuypfGy8utzB6L8Ojv0k3D/espzd4LnVaR /3I6K8ccbFwphf19PdJuVENBaf8TXRk5AWWehZqAkEQSC5yBtdigfVMm5wiB2C9+rd8t UCxKjEUjdi3AHCbtT3mNDhosYNFVHMTuJOaGqeui72nWtkJOk9Z2ryOkhL17y5uLypUQ AbzxoZ2u0YBHzUZqlWKIIfKL7OMlBJGCOlBa/XpyotPIdYdWe2q1uE6vSuYECNYuTMCg lVhA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to:cc; bh=m4Svsks4F1WJxXzmQuHWNGVoFSZ6gcnQj15bvC/Ooz0=; b=rpRWz0f8d2HpGXXB5PYTBwDf3zED23cgE504fwnC+jIhF0jphGM18ARmsL/ayDdhFv SGfgRQX+Hwq68BCRdjQCPxVnsYOrMAccZIHK9XyKVgaknpafIWWLLMJZ3jkgEPJYGk/Y IqWTFkP1Sga/Ux1m/N0tlmcvRoEPHJb3UdBiP5GhmOImyPVYM8nKUKggPKCXohGquc+g illVUFx7onfwf34Nz9T6+t1crlJs+Ah2dj4Xk06t5pSByAecv+iYACVSUqiZoNDkyvWv 1UIRThX6vxc8HHmPJL1vkL4iVtx1DS5AWpZW/+ZXx1Ds2xLtdZx4QB5YHuTlSMHm8Vay uaaA== X-Gm-Message-State: AOAM530M5qOAaf7B9dAJm+T4srEx5WhtI6GboDv/+UB2dExKJoy2iazy fd+oqRd27efZo2iDaEHAJGL6EmFYMfRUvjFMKAJig5pPvTPinoQ7 X-Received: by 2002:a05:6402:26c9:: with SMTP id x9mr6736383edd.365.1612422841623; Wed, 03 Feb 2021 23:14:01 -0800 (PST) MIME-Version: 1.0 From: Naresh Kamboju Date: Thu, 4 Feb 2021 12:43:50 +0530 Message-ID: Subject: [next] Unable to handle kernel NULL pointer dereference at - pc : gpiodevice_release To: linux-gpio@vger.kernel.org, open list , lkft-triage@lists.linaro.org, Linux-Next Mailing List Cc: Linus Walleij , Bartosz Golaszewski , Arnd Bergmann , Stephen Rothwell Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org While running kselftest gpio mockup test case on qualcomm dragonboard 410c the following kernel crash reported on Linux next tag 20210203. # selftests: gpio: gpio-mockup.sh # 1. Module load tests # 1.1. dynamic allocation of gpio # ./gpio-mockup.sh: line 106: ./gpio-mockup-cdev: No such file or directory # test failed: line value is 127 when 1 was expected # GPIO gpio-mockup test FAIL [ 124.539778] Unable to handle kernel NULL pointer dereference at virtual address 00000000000005a8 [ 124.539864] Mem abort info: [ 124.547998] ESR = 0x96000006 [ 124.550188] EC = 0x25: DABT (current EL), IL = 32 bits [ 124.553473] SET = 0, FnV = 0 [ 124.558926] EA = 0, S1PTW = 0 [ 124.561646] Data abort info: [ 124.564863] ISV = 0, ISS = 0x00000006 [ 124.567933] CM = 0, WnR = 0 [ 124.571507] user pgtable: 4k pages, 48-bit VAs, pgdp=000000008b721000 [ 124.574694] [00000000000005a8] pgd=0000000091cd2003, p4d=0000000091cd2003, pud=00000000917ac003, pmd=0000000000000000 [ 124.581396] Internal error: Oops: 96000006 [#1] PREEMPT SMP [ 124.591499] Modules linked in: gpio_mockup(-) snd_soc_hdmi_codec adv7511 cec rfkill snd_soc_msm8916_analog qcom_spmi_temp_alarm qcom_pon rtc_pm8xxx msm snd_soc_lpass_apq8016 snd_soc_lpass_cpu snd_soc_lpass_platform snd_soc_msm8916_digital qcom_camss videobuf2_dma_sg snd_soc_apq8016_sbc v4l2_fwnode snd_soc_qcom_common videobuf2_memops videobuf2_v4l2 mdt_loader videobuf2_common drm_kms_helper qnoc_msm8916 qcom_rng i2c_qcom_cci icc_smd_rpm crct10dif_ce socinfo rmtfs_mem display_connector drm qrtr ns fuse [ 124.619092] CPU: 0 PID: 5055 Comm: modprobe Not tainted 5.11.0-rc6-next-20210203 #1 [ 124.641324] Hardware name: Qualcomm Technologies, Inc. APQ 8016 SBC (DT) [ 124.648877] pstate: 80000005 (Nzcv daif -PAN -UAO -TCO BTYPE=--) [ 124.655819] pc : gpiodevice_release+0x38/0x80 [ 124.661806] lr : device_release+0x3c/0x98 [ 124.666058] sp : ffff800013f23b30 [ 124.670051] x29: ffff800013f23b30 x28: ffff0000157baf80 [ 124.673351] x27: 0000000000000000 x26: 0000000000000000 [ 124.678734] x25: 0000000000000045 x24: ffff00000b5d6cd0 [ 124.684029] x23: ffff800013f23c88 x22: 0000000000000000 [ 124.689324] x21: ffff00000fb5f080 x20: ffff000002334e00 [ 124.694619] x19: 0000000000000000 x18: ffff800012dd6a50 [ 124.699914] x17: 0000000000000000 x16: 0000000000000000 [ 124.705210] x15: 00000000000694e0 x14: 00000000ffffffff [ 124.710512] x13: 0000000000000001 x12: 000000000000e107 [ 124.715799] x11: 000000000000e10a x10: ffff800012d34a50 [ 124.721096] x9 : ffff80001344a000 x8 : 00000000512c1926 [ 124.726391] x7 : 000000000cb44760 x6 : ffff800013f23a40 [ 124.731685] x5 : dead000000000100 x4 : dead000000000122 [ 124.736981] x3 : ffff800012891000 x2 : 2be62a0e7519e400 [ 124.742275] x1 : ffff800010829ad0 x0 : ffff800012a694e0 [ 124.747571] Call trace: [ 124.752862] gpiodevice_release+0x38/0x80 [ 124.755035] device_release+0x3c/0x98 [ 124.759201] kobject_put+0x90/0x220 [ 124.762846] put_device+0x24/0x30 [ 124.766145] gpiochip_remove+0xf4/0x120 [ 124.769618] devm_gpio_chip_release+0x20/0x30 [ 124.773263] devm_action_release+0x20/0x30 [ 124.777777] release_nodes+0x150/0x248 [ 124.781771] devres_release_all+0x3c/0x60 [ 124.785503] device_release_driver_internal+0x128/0x1f0 [ 124.789584] driver_detach+0x5c/0xe8 [ 124.794618] bus_remove_driver+0x64/0x118 [ 124.798439] driver_unregister+0x34/0x60 [ 124.802344] platform_driver_unregister+0x20/0x30 [ 124.806339] gpio_mockup_exit+0x30/0x3d0 [gpio_mockup] [ 124.810939] __arm64_sys_delete_module+0x1c8/0x2b8 [ 124.815973] el0_svc_common+0x88/0x1b8 [ 124.820745] do_el0_svc+0x38/0x90 [ 124.824478] el0_svc+0x1c/0x28 [ 124.827864] el0_sync_handler+0x8c/0xb0 [ 124.830815] el0_sync+0x13c/0x140 [ 124.834555] Code: f2fbd5a4 90011200 91124000 91014000 (f942d663) [ 124.838029] ---[ end trace 15e9a0840604e538 ]--- Reported-by: Naresh Kamboju full test log link, https://qa-reports.linaro.org/lkft/linux-next-master/build/next-20210203/testrun/3878290/suite/linux-log-parser/test/check-kernel-oops-2224485/log metadata: git branch: master git repo: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git git describe: next-20210203 kernel-config: http://snapshots.linaro.org/openembedded/lkft/lkft/sumo/dragonboard-410c/lkft/linux-next/952/config build: http://snapshots.linaro.org/openembedded/lkft/lkft/sumo/dragonboard-410c/lkft/linux-next/952/ vmlinux: http://snapshots.linaro.org/openembedded/lkft/lkft/sumo/dragonboard-410c/lkft/linux-next/952/vmlinux -- Linaro LKFT https://lkft.linaro.org