Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp5430477pxv; Wed, 7 Jul 2021 03:41:32 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzrtEHqj2GOzxe0l7WRlDP0DfMxXP33dOohj8YI8fbVYXQGZ2s8SPkPuJhN83FlbD//qB3/ X-Received: by 2002:a17:906:25db:: with SMTP id n27mr22787053ejb.170.1625654492301; Wed, 07 Jul 2021 03:41:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1625654492; cv=none; d=google.com; s=arc-20160816; b=0HCHnSx//5TaDwEtJYbKzDdvW4HYb3k4sm+BNkyhjE1ybtPK7ADSNUaoBKBTFL02F+ pf6DWb4jdFVHxbJ96t9IGU7eajaH0PRSzZiykk2NPxqGBeFE/C/EH1TdI5ssVPjTtqWe Gm4hfglc70pc1d4GUV6rB3vUAShvOJ4LsnBN7PfYA17FoV91kHZ2KT+W7s7L80ez1ymd 3V9rU09H6IS+6EbFw7CtepGEQTHCb4KHS9qDQm2HwwxX73yKLKchsEC/rmKZyBJA8qj/ h5DpbbJvD2foEKdxxETvqRcZSGE9mR+HdER0Bx4hnfVY9+hH0ZC41cpu4WmIwohizDPo a0Bw== 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:in-reply-to :references:mime-version:dkim-signature; bh=YRDVd3phHldoWTQmSimMtW/ZkB5i7EmON+ZcljUt8y0=; b=1AsTtHFksuimSHHIX9pDS2cuK2f751YPquQVsqaPB4NufqZUZKvsXnnM1MkeN+VzPD Qz8TzdvBExAQrA8maBkwgLsXprQb1dZ611QB87bs+loaZxpbuYgHp26MuFf77TFIAN4U DkPYp53eXaSXFlBqwXgnXtyf7ohgtkeIy4QGbpOyKdcL2/6lY0KPqpYBuK/vaEUDtuzr rFPaB7RYdoU/6Wt5QzYe0vnnYFQaddXGyoCX2NiCtIrt7bjAJbrszPxl/g9CG3A9jezY MycxSshxL1faeNhvsN8jiUgYIbv8A8hvnPthFNnbutEs/efV5gaRGlixBOWZFTW7uSkT IIgw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=Ie0NKg5A; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id js17si13312348ejc.297.2021.07.07.03.41.08; Wed, 07 Jul 2021 03:41:32 -0700 (PDT) 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=@gmail.com header.s=20161025 header.b=Ie0NKg5A; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231288AbhGGKkx (ORCPT + 99 others); Wed, 7 Jul 2021 06:40:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45232 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231279AbhGGKkw (ORCPT ); Wed, 7 Jul 2021 06:40:52 -0400 Received: from mail-oi1-x231.google.com (mail-oi1-x231.google.com [IPv6:2607:f8b0:4864:20::231]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0A3A4C061574; Wed, 7 Jul 2021 03:38:11 -0700 (PDT) Received: by mail-oi1-x231.google.com with SMTP id w127so2808154oig.12; Wed, 07 Jul 2021 03:38:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=YRDVd3phHldoWTQmSimMtW/ZkB5i7EmON+ZcljUt8y0=; b=Ie0NKg5A3KosypF4mGzEcZQd6tmBl2xXmoJP96pGlZB0Dh45eJmnZj1KJLPvlzZYVI ZDW7ibU3WKCVGqXxw8AGEGNYki0iMNPqb17LrmGeHCnuCVZAEWZ4Vg+KJAoGZgO5bpDV ugbXG2L6A8UZh8Nj5meSb9lBwzWo1Vcpdj1TaB9DRD1kZ15YF9CrmdI+pCutdcXFgJUE WLysgahZ3bh5jPV4dfCUSbzpsUrUum6o7TvmrdcxCqTHRzu2oYX3Th0kHqlHWqZEqZ+0 siRrDSmdhxszLcGKe3w22tu4AWp+8Sk8qLacy/WXbEtPimjxw3Iop8ujb44l1bYo5/Od 7veg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=YRDVd3phHldoWTQmSimMtW/ZkB5i7EmON+ZcljUt8y0=; b=AeZBDiIr8/GQSn4XqTN+RyZhX7unUOji+jtbmv9IdIfSGfhf//G2f+GfIsqJKgHkkr 8g1UA3nbYMPgXoif7H/CuWYD/mF92hQ9hYANAZr6QbmNjKQ9RFVNFf+oUlJuX2JetbYJ w+g4Fi0l4xAYzQvtQBKs7ItE5BRAT0GfnB+xXHpsgjRUv0ZU/zSeayPfaKCrg1OiRKpY +U15xi6W1vKp7l2Fsak08a5hEDuN2E5xJR3kqt70Bxlnf7pSYO8KcB0msDkp4Tp/o0zA D+2h/uCM3Q2uEB/4+WjEO+RtKI6mznZ+hgFeKDEfiU8wpHIRNO3IQASCsqGBvgF+1fsC Coxw== X-Gm-Message-State: AOAM531G0c9BJ/RfTxzC0k+KhMzarCjTPy6vzRWQCbZeYzSwX2hD0HhZ 3eQtRwxNdRTULiyaMmrPiDSWTGJ7dyJt7FaXXw== X-Received: by 2002:a05:6808:2105:: with SMTP id r5mr4321672oiw.57.1625654290533; Wed, 07 Jul 2021 03:38:10 -0700 (PDT) MIME-Version: 1.0 References: <1625489588-26079-1-git-send-email-zheyuma97@gmail.com> In-Reply-To: From: Zheyu Ma Date: Wed, 7 Jul 2021 18:37:52 +0800 Message-ID: Subject: Re: [PATCH v4] tty: serial: jsm: allocate queue buffer at probe time To: Andy Shevchenko Cc: "gregkh@linuxfoundation.org" , "jirislaby@kernel.org" , "linux-serial@vger.kernel.org" , "linux-kernel@vger.kernel.org" Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jul 7, 2021 at 4:14 PM Andy Shevchenko wrote: > > > > On Monday, July 5, 2021, Zheyu Ma wrote: >> >> In function 'neo_intr', the driver uses 'ch->ch_equeue' and >> 'ch->ch_reuque'. These two pointers are initialized in 'jsm_tty_open', >> but the interrupt handler 'neo_intr' has been registered in the probe >> progress. If 'jsm_tty_open' has not been called at this time, it will >> cause null pointer dereference. >> >> Once the driver registers the interrupt handler, the driver should be >> ready to handle it. >> >> Fix this by allocating the memory at probe time and not at open time. >> >> This log reveals it: > > > > When doing commit messages try to avoid tons of noise in them, I.e. here is _a lot of useless lines_ from the log, has to be addressed. Thanks for your advice, I will learn from other commits. Regards, Zheyu Ma