Received: by 2002:a05:6a10:c604:0:0:0:0 with SMTP id y4csp387181pxt; Thu, 5 Aug 2021 02:06:20 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxRhalp0GwADtrj0662i+u+SkkWVnoCct7uaCILTmKyC4N0wgLcMwilMS+Z0Ua5pe7+fUm+ X-Received: by 2002:a05:6402:348c:: with SMTP id v12mr5166425edc.159.1628154380520; Thu, 05 Aug 2021 02:06:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1628154380; cv=none; d=google.com; s=arc-20160816; b=S+Ef85XVJ1OOeG4S2hdy34VFHu0VRMJyGVKRqPLwOrUIyiAjPprNziz+gCPU7OggxW j14m1TY2/WjJ1USh9Qh2q72wqZFYZSwLNupVpwdt7c5fWci3AzSuadVdbT1iNAIG63/N kBZwp7cz+y8HZyeMQyE/TbA1Z0bbROHsfxRGFQZIdvdLAroleqR1neKvILD/EwTSRNSC ia/NJiZRTGnlxm6Bl3ur1Rli0H6ZCYwhRSEiIv2ugO87ohMhwaBzNQ0tsovCLKdRuzp8 ZNxkWAkuMFPwLJSMVM7VyMWycBL/btCfzfqDyGe7g/hm7Is2msaCJ4kvnpWPMnkPe1IE 5R+Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=0QJ+j8HH176Vea6Gzx75wMf20ZU1n8vD+0hdkWQPwX4=; b=nBMnZL/b3prvg0JtZLp7cVXE5yjvYSl41hC6GeS+JdetZPRR2X33WuxFIn72uV2AIZ BPcsj2GJrnYSW1ejH6hDyUYbVilA7euwGHPi4SePwpe2KyDhulVgtvi0FfEsrrvJVXMc nsXKFFW/jMXX2BBO46pAjNtIBydorS17VLhJ1QiKPrKpI+u5mb9DGeEifJLgDc10v37y 2byAEJKRUJ9COcDGPKmIi++G3bqpoQ3j8wPrUtD+WrD4PvRVnNIS75W1wqs3nncdahXR /gxH9OqfJics3cRlhAEZ3htw3IY55Kof8wEVyeaee6ksfbN4kC1FIY1759juH0lhljUf Iq4w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=1tfTAD2S; 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=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id de42si4741614ejc.471.2021.08.05.02.05.57; Thu, 05 Aug 2021 02:06:20 -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=@linuxfoundation.org header.s=korg header.b=1tfTAD2S; 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=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239367AbhHEISz (ORCPT + 99 others); Thu, 5 Aug 2021 04:18:55 -0400 Received: from mail.kernel.org ([198.145.29.99]:40628 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236074AbhHEISz (ORCPT ); Thu, 5 Aug 2021 04:18:55 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 2F0196104F; Thu, 5 Aug 2021 08:18:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1628151520; bh=3Qyqz/XehSHX/KN//v96jroYOCaR+p2m3HMTILA0UBA=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=1tfTAD2SzzVKWhuczBMWWCBkLmJujhVs6ns1DA/ZOSo0U1X148bi5U7Tw/q0OrooI fejyLXMwHkCrIrbtlW97iHgOA0bXRKN2IF340MROLRuSypoXuueXE/6sTbuuy6aRu+ umdeCMGPzCKRl1oD9ddTkCi+WD9x7kM4XxVtbiqA= Date: Thu, 5 Aug 2021 10:18:38 +0200 From: Greg KH To: Xianting Tian Cc: Jiri Slaby , amit@kernel.org, arnd@arndb.de, osandov@fb.com, linuxppc-dev@lists.ozlabs.org, virtualization@lists.linux-foundation.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v3 1/2] tty: hvc: pass DMA capable memory to put_chars() Message-ID: References: <20210804025453.93543-1-xianting.tian@linux.alibaba.com> <0f26a1c3-53e8-9282-69e8-8d81a9cafc59@kernel.org> <40f78d10-0a57-4620-e7e2-f806bd61abca@linux.alibaba.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <40f78d10-0a57-4620-e7e2-f806bd61abca@linux.alibaba.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Aug 05, 2021 at 04:08:46PM +0800, Xianting Tian wrote: > > 在 2021/8/5 下午3:58, Jiri Slaby 写道: > > Hi, > > > > On 04. 08. 21, 4:54, Xianting Tian wrote: > > > @@ -933,6 +949,16 @@ struct hvc_struct *hvc_alloc(uint32_t vtermno, > > > int data, > > >       hp->outbuf_size = outbuf_size; > > >       hp->outbuf = &((char *)hp)[ALIGN(sizeof(*hp), sizeof(long))]; > > >   +    /* > > > +     * hvc_con_outbuf is guaranteed to be aligned at least to the > > > +     * size(N_OUTBUF) by kmalloc(). > > > +     */ > > > +    hp->hvc_con_outbuf = kzalloc(N_OUTBUF, GFP_KERNEL); > > > +    if (!hp->hvc_con_outbuf) > > > +        return ERR_PTR(-ENOMEM); > > > > This leaks hp, right? > > > > BTW your 2 patches are still not threaded, that is hard to follow. > > yes, thanks, I found the bug, I am preparing to do this in v4. > > It is the first time I send series patches(number >1), I checked the method > for sending series patch on LKML.org, I should send '0/2' which is the > history info for series patches. Please use 'git send-email' to send the full series all at once, otherwise it is hard to make the emails threaded "by hand" if you do not do so. thanks, greg k-h