From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.4 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7BF8EC433E7 for ; Mon, 19 Oct 2020 15:22:26 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 196232080D for ; Mon, 19 Oct 2020 15:22:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1603120946; bh=GlhwWp5gKZcuAcSQvqKf2ult2jhaeKToSOv+u9UFfpY=; h=Subject:To:Cc:References:From:Date:In-Reply-To:List-ID:From; b=nGKWRmNMbuM98HnejR8FvWOYX4Z3fTcB+uJ8XwHoCIgCxzINHJTHxJa3zuUcujC2l NvPKpo1ETcePicpQwopx7OOS6zIPZPH4FkTdkTQJ4I9HjpfY6YGHSEthLa9JQrw+zs l1FAf1NPY6MfO4jLXLCVc3qsM+VeX9sNJRUXaJI0= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730058AbgJSPWZ (ORCPT ); Mon, 19 Oct 2020 11:22:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49832 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729075AbgJSPWY (ORCPT ); Mon, 19 Oct 2020 11:22:24 -0400 Received: from mail-il1-x131.google.com (mail-il1-x131.google.com [IPv6:2607:f8b0:4864:20::131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 83B20C0613CE for ; Mon, 19 Oct 2020 08:22:24 -0700 (PDT) Received: by mail-il1-x131.google.com with SMTP id p9so531581ilr.1 for ; Mon, 19 Oct 2020 08:22:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=google; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=6itkt5xjcu8RJ55TJDt9qjiT96VHBXsR7l8iWPY1kfM=; b=T4D43KSTr/BTZjGGXxrmUHSbiu48CcOR1IihLZ++3IJorWFAh0aDEeHzPtRnxxLfvO soZc07fiT7+VOUM/7S+JFQom9wsrxs5n5uB0tXTuPWW/0qaK1ycLJpfyZ/hpsRQoHGhq uag4o/d0JTSQJdnpQ4cfcd06rks2pyqhpwoNc= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=6itkt5xjcu8RJ55TJDt9qjiT96VHBXsR7l8iWPY1kfM=; b=ORGNmmOYVA3KIPyrY4R4QjGQk0DlANUwD5IRdYBKegMx3uNQYdm/Llg1peRWrf7SdB DXUDtCw1Zxx+CPGqcQEyfw7B1ZDmT1q0v9QrJiyS+sf1ouTuxWq7TBJ8/6r+M3G96pX5 awKaXTKPJ5IPhdjwPeh8/iQnJQcyv3FVGbFBGubsVRb857r6yNKrDCuBGQlWqhQtWGp+ cJ7HgB7kG/ko7doYgyFchFcBc3PrtxNMng/8vTh1gtN03H7lutmq5skSXcCojmexFnBJ ej0/BHgbcjI4L0GOzLZ1fZL10pJUx+8jroKVqXNgDAGzFBuSu0JkjhgzD1v76c8dBJP2 4i8Q== X-Gm-Message-State: AOAM530yHcW8eiZDNxZaywJDIaHwsxTxGPaQD85aqp+hBOKjm3x/IhXL Rm0C0b743jUWw+Pn5zVeCANlDA== X-Google-Smtp-Source: ABdhPJwacLcR2tRiPH6QS15W2qKZIkZ7mASOYnynQOhrw4LWuYYvA0e8BYLaUibr1/V5EPN4JSsx2Q== X-Received: by 2002:a92:ab07:: with SMTP id v7mr434994ilh.82.1603120943821; Mon, 19 Oct 2020 08:22:23 -0700 (PDT) Received: from [192.168.1.112] (c-24-9-64-241.hsd1.co.comcast.net. [24.9.64.241]) by smtp.gmail.com with ESMTPSA id d21sm49343ioi.39.2020.10.19.08.22.22 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 19 Oct 2020 08:22:23 -0700 (PDT) Subject: Re: KASAN: null-ptr-deref Write in event_handler To: Andrey Konovalov Cc: Shuah Khan , Valentina Manea , Greg Kroah-Hartman , LKML , USB list , syzkaller-bugs , syzbot , Nazime Hande Harputluoglu , Shuah Khan References: <000000000000810a4405b0ece316@google.com> <2947473d-76cd-a663-049a-4d51a97e2a3e@linuxfoundation.org> <4b6c9d53-a4de-8749-e0b1-055dbb42703b@linuxfoundation.org> <5e0e21bd-5cc9-f1d8-d45e-ec7f10edbfba@linuxfoundation.org> <9256b41b-fe27-a453-ab30-8999379bc1e3@linuxfoundation.org> From: Shuah Khan Message-ID: <9887a296-b98e-ef2b-553f-448cd9ad72b6@linuxfoundation.org> Date: Mon, 19 Oct 2020 09:22:21 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 10/19/20 9:10 AM, Andrey Konovalov wrote: > On Fri, Oct 16, 2020 at 9:48 PM Shuah Khan wrote: >> >> Andrey, >> >> I am unable to reproduce the problem. I even tweaked the reproducer >> to launch 10 procs and 100 threads. >> >> Can you test the following patch with your setup >> >> Here it is - also attached. > > Hi Shuah, > > I get the crash below with this change. It complains about > kthread_stop_put() being called in atomic context. > Thanks for testing. I was concerned about that. I will try to reproduce the problem again. I am running into a amd_gpu issue during boot on my test system with KASAN enabled which results in disabling lock debugging. This makes it harder to debug and fix this null-ptr-deref Write in event_handler as it needs KASAN enabled. Fun stuff. I will switch to a different test system and see if I can reproduce the problem first. Thanks again for testing. thanks, -- Shuah