rmnet: shs: Fix uninitialized use in init
If the physical device is not in up state before a virtual device
is brought up, there is an use of uninitialized variable leading to
the following-
145.153137: <6> Unable to handle kernel NULL pointer dereference at virtual address 0000000000000018
145.153156: <6> Mem abort info:
145.153165: <6> ESR = 0x96000005
145.153176: <6> Exception class = DABT (current EL), IL = 32 bits
145.153186: <6> SET = 0, FnV = 0
145.153195: <6> EA = 0, S1PTW = 0
145.153203: <6> Data abort info:
145.153212: <6> ISV = 0, ISS = 0x00000005
145.153221: <6> CM = 0, WnR = 0
145.153237: <6> user pgtable: 4k pages, 39-bit VAs, pgdp = 000000007f1dc94f
145.153246: <6> [0000000000000018] pgd=0000000000000000, pud=0000000000000000
145.153269: <6> Internal error: Oops: 96000005 [#1] PREEMPT SMP
145.153524: <2> pc : rmnet_get_endpoint+0x4/0x48
145.153607: <2> lr : rmnet_shs_wq_gather_rmnet_ep+0x68/0x1f0 [rmnet_shs]
145.155341: <2> Call trace:
145.155359: <2> rmnet_get_endpoint+0x4/0x48
145.155395: <2> rmnet_shs_wq_init+0x168/0x328 [rmnet_shs]
145.155428: <2> rmnet_shs_dev_notify_cb+0x234/0x388 [rmnet_shs]
145.155450: <2> raw_notifier_call_chain+0x3c/0x68
145.155472: <2> __dev_notify_flags+0xa0/0x190
145.155486: <2> dev_change_flags+0x48/0x60
145.155506: <2> devinet_ioctl+0x3a8/0x658
145.155523: <2> inet_ioctl+0xb4/0x280
145.155541: <2> sock_do_ioctl+0x44/0x230
145.155554: <2> sock_ioctl+0x25c/0x3d8
145.155575: <2> do_vfs_ioctl+0x5dc/0x928
145.155589: <2> __arm64_sys_ioctl+0x70/0x98
145.155608: <2> el0_svc_common+0xa0/0x158
145.155623: <2> el0_svc_handler+0x6c/0x88
145.155640: <2> el0_svc+0x8/0xc
CRs-Fixed: 2527900
Change-Id: Iece4e21c5acc5504fb3939f489d221a1e949b31a
Signed-off-by:
Subash Abhinov Kasiviswanathan <subashab@codeaurora.org>
Loading
Please register or sign in to comment