Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp181575iob; Wed, 27 Apr 2022 23:16:48 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzuDlz0fJk0OQncgQWfK+nwPOBY4l3tXvuj9J2+dMrGQvh56/Hzfr9h6xJnJXjfanLQCF6p X-Received: by 2002:a17:90b:1c12:b0:1d9:7f58:eecf with SMTP id oc18-20020a17090b1c1200b001d97f58eecfmr20962635pjb.35.1651126608092; Wed, 27 Apr 2022 23:16:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1651126608; cv=none; d=google.com; s=arc-20160816; b=A6B25hvDuGYoWLRMNKl5YLJakPiCzeHl8it/KT9iECpLBrtiyqro5amIeqtmI/lxYt L0S0MTda0dgkQCT969X5J40mepGzv4XjOVulrYM7hgJ5Hn76HLg7Pq+8wtU0n0o4XAAY e6Te/N1+QCBLlPkzFS7pDpXmJ2XM4jN7yiyveE9CBZ7ApqHHCabRCNRyW+qdhZlP/HJQ RjyURQRDNtkjvuQelVchHoeTInewHwMkg8WjzFSwNezqpIG6CGMVU+p2dUw5255iDcBJ CEVxzpU553wTr8QOt5Ut9IrxC9Lo3RbYLg3aLpgVao1BzyuMAkQwEKL6K2Y9EuI4eReD CaGQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:to:content-language:subject:user-agent:mime-version:date :message-id:dkim-signature; bh=tkonzaZX90dzwA5vktnXuUW5em2UCjcqgQZC/ODzsbM=; b=io/hzUs/KtpnJqxc8zOl8jVdfTNdTriNqL8JRrJ/nYXS0TktOINz7XNO1AgK9vLNwT prhJfGwBHBOFr/rix9y5c95LyhzSuQ9P6fbz9LBfBZw1TBxV4Pktma/COsr2YcV9wKJB AU6a63gKAFM1cfGCdxhQfRR4xgtVjbWE+D9BGKLl9QOe3GpI8jK3sQbvEDUsY/RUVZE9 NSxS8svAG63RZLp1I1ZmRzABoHgl0/ATUk9qZlMzRvtpvC8NFR7ywTW2AhU3epJboqGW jP5DQ/1hP6k2XelbgmJHh9KGbD3GcV7hOW73aktmAqjJYYbELNH2CU2phSoIkXbH0iKb GZLg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=Z9octsva; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id w16-20020a639350000000b003aa5cf2a101si3866918pgm.62.2022.04.27.23.16.33; Wed, 27 Apr 2022 23:16:48 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=Z9octsva; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231476AbiD0XTW (ORCPT + 99 others); Wed, 27 Apr 2022 19:19:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47944 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229451AbiD0XTV (ORCPT ); Wed, 27 Apr 2022 19:19:21 -0400 Received: from mail-pl1-x629.google.com (mail-pl1-x629.google.com [IPv6:2607:f8b0:4864:20::629]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 697D564F8 for ; Wed, 27 Apr 2022 16:16:07 -0700 (PDT) Received: by mail-pl1-x629.google.com with SMTP id b12so2847457plg.4 for ; Wed, 27 Apr 2022 16:16:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=message-id:date:mime-version:user-agent:subject:content-language:to :references:from:in-reply-to:content-transfer-encoding; bh=tkonzaZX90dzwA5vktnXuUW5em2UCjcqgQZC/ODzsbM=; b=Z9octsvan+ibqadfTqwi4F/eau5upv7E3zD6XCpYF8zww8TD3iSWsF/4498LinOCQi t1zA6uY8/TuCiAFZ+yCxi91CDbxdDD22U7xfPSPMoq1hhDRUJJ6BzeQ9f4eiHqmJloXL LYF2GWN1+MVfa9MVrREt3paM9ZkcyG1/acHfy2piPo0qlWWHV+AXFcU0Lcc18LU8ntP1 ftlGQb8OOU6Qj+Lv+c7pJZJSZ7mk0CGNRXxlIjjmnk/AJeIIT51TTjx8YngHXJHz0umv kMJObyBxprSTmIHMHBbtR1tBj3ajevlzOGsqQzKyrgbPybzV62R5I5PClTw/UUfJOoZN keLQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :content-language:to:references:from:in-reply-to :content-transfer-encoding; bh=tkonzaZX90dzwA5vktnXuUW5em2UCjcqgQZC/ODzsbM=; b=t7evNLGtuJaWLRMGr+RqLeZHgB9L3bMYKxForbQeFF3o3s5BTB5LYRMKNusQhRkY3i yE5ibJ9venSwdv5E3zbjCHZ82ShZ6wg+ppiQiNtuvHIFY0ggJ56Dg+6p8xAA+oiA7nI8 aFtqu8tyAlkaoyniEq0SLgacHXxNCIk9sEv88GXcqALhzvsIj8i4qDIyfM5HC7wv1Y0e aFs23fX3o1WQ7oITq4SKXfAGtQ1SiIQJVHvhptPZfgwhCsWwELCmN5KqCfwzcEdqF4XM BWZ74tsFR1dlHvg8DiRwcqFAvyBfAlU9p8c4Q1GbLQdQG5dhyp0qRTA1Ct9L2cfuRn9Y aOaw== X-Gm-Message-State: AOAM533bm8KzKg+yshULldojETYfQtwVaoJC2vvWQp2fsbGBK21I0PpI fkYHUgPidWTv93daW2gj9zWU52XDb0I= X-Received: by 2002:a17:90b:368e:b0:1d8:fcd2:c6ca with SMTP id mj14-20020a17090b368e00b001d8fcd2c6camr30222109pjb.44.1651101366811; Wed, 27 Apr 2022 16:16:06 -0700 (PDT) Received: from [172.30.1.16] ([14.32.163.5]) by smtp.gmail.com with ESMTPSA id x126-20020a628684000000b0050d3f600ed0sm11775525pfd.40.2022.04.27.16.16.05 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 27 Apr 2022 16:16:06 -0700 (PDT) Message-ID: <67b840a9-c656-c871-afc1-84d2ec2c0fc3@gmail.com> Date: Thu, 28 Apr 2022 08:16:03 +0900 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.7.0 Subject: Re: [PATCH V1] extcon: modify extcon device to be created after driver data is set Content-Language: en-US To: bumwoo lee , MyungJoo Ham , Chanwoo Choi , linux-kernel@vger.kernel.org References: <20220427030005.706-1-bw365.lee@samsung.com> From: Chanwoo Choi In-Reply-To: <20220427030005.706-1-bw365.lee@samsung.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-3.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM,NICE_REPLY_A,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi bumwoo, On 22. 4. 27. 12:00, bumwoo lee wrote: > Currently, someone can invoke the sysfs such as state_show() > intermittently before dev_set_drvdata() is done. > And it can be a cause of kernel Oops because of edev is Null at that time. > So modified the driver registration to after setting drviver data. > > - Oops's backtrace. > > Backtrace: > [] (state_show) from [] (dev_attr_show) > [] (dev_attr_show) from [] (sysfs_kf_seq_show) > [] (sysfs_kf_seq_show) from [] (kernfs_seq_show) > [] (kernfs_seq_show) from [] (seq_read) > [] (seq_read) from [] (kernfs_fop_read) > [] (kernfs_fop_read) from [] (__vfs_read) > [] (__vfs_read) from [] (vfs_read) > [] (vfs_read) from [] (ksys_read) > [] (ksys_read) from [] (sys_read) > [] (sys_read) from [] (__sys_trace_return) > > Signed-off-by: bumwoo lee > --- > drivers/extcon/extcon.c | 29 +++++++++++++++++------------ > 1 file changed, 17 insertions(+), 12 deletions(-) (snip) Applied it on extcon-fixes. Thanks for your work. I change the first letter to capital letter as following: - extcon: Modify extcon device to be created after driver data is set And better to use the correct version on patch title on next and then add the changes according to version as following: If you describe changes under '---', it is no problem when git apply with git am command. For example. [PATCH v2] extcon: Modify extcon device to be created after driver data ... Signed-off-by: bumwoo lee --- Changes from v1: - explain what are changes -- Best Regards, Samsung Electronics Chanwoo Choi