Received: by 2002:ab2:6203:0:b0:1f5:f2ab:c469 with SMTP id o3csp399894lqt; Thu, 18 Apr 2024 21:20:03 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUXuNtOemiKNFmEB6OKu73l+JbN9aAnwQ9cutUimwOn5hDM7dUj6e7W3sRimKhUs4ZSJRpvETOTtgLhJA7JHM598ezCpP13Q3gQupsYVw== X-Google-Smtp-Source: AGHT+IHW2YZahe0Geli/x4txISOuDE6z0JcyuMZjOkggRw7DUnpnDmKvcSyBR6hPlBKDTzDut2+P X-Received: by 2002:a05:620a:94d:b0:78f:141c:56e4 with SMTP id w13-20020a05620a094d00b0078f141c56e4mr1079640qkw.67.1713500403129; Thu, 18 Apr 2024 21:20:03 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713500403; cv=pass; d=google.com; s=arc-20160816; b=v+fQz9BNCrnVuAEcj1StFT+nAJBcgloHKg1y15j3elTDmXvBS9ztrkvV6DQaregDhR ISPoffAl8R2NpRjlg2wzh+IYDy8r/8ClfgGLzK4Ix/UVgNb0rIj+wMDbd1w5YkKQxjT0 X07Dp7bc5yKSZrQcgJkW2ljepWltDJdu51Ng1/FOjKhyG6/ukha/4vdU5D44+DgzSEp0 WbMQ7N8dh27J6licTooOTTAGx6cNQc9TSwmaVVlVNYz1fdTNByKL5c/D2/bIGuYTJf/5 PJ0DDMY8kcwMZ2vt6UrK300Zp5Kcfa8FLQrsu+1vHay7dZ0EyhEd0iPHH3XBlEAUs4yg LGGA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :message-id:subject:cc:to:from:date:dkim-signature; bh=uzRJHPvvStv+0WlWLGWHtXPKQ0B60p9m7wWL6w2VZVg=; fh=7FqeQMBxjW6k4Ni75c3ob445YpQST4fGLTpmtkkZ/FQ=; b=nnQooLeQ7YF0Dwc5PiN0xu/tFroIsFG5/EGkVRL08w5TASAkmUbYLthEa9WEyLvVZH JNzpIUF6HJtCfASldh6ficwmypkIbHq5f9MUoFkDLZlDl7gHh9zb0/FNu5XoYcnCmysA CgrbNNJ+CSTaM2MpoVxKtOzbJTUSBVKjmaQv5pNgCjQ7Gh7AhBZEW7pfLEoERxuamx6h iP3g7uPaQuQwTln+fJPAwFUTzv9OJ5bR4I4qk1QIo7MEVr5IrH642KmtR+gPpMujyWCN ojbFijSIPgFABcfgJQ2Jwc/e13P9Vz58u/jjfP+D2fzWlaiTQKgJ8HaErizWc2hXAiF9 19Tg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@canb.auug.org.au header.s=201702 header.b=sb8Aj+XG; arc=pass (i=1 spf=pass spfdomain=canb.auug.org.au dkim=pass dkdomain=canb.auug.org.au dmarc=pass fromdomain=canb.auug.org.au); spf=pass (google.com: domain of linux-kernel+bounces-150999-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-150999-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=canb.auug.org.au Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id x13-20020ae9f80d000000b0078eed1c156csi2940874qkh.191.2024.04.18.21.20.02 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 18 Apr 2024 21:20:03 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-150999-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@canb.auug.org.au header.s=201702 header.b=sb8Aj+XG; arc=pass (i=1 spf=pass spfdomain=canb.auug.org.au dkim=pass dkdomain=canb.auug.org.au dmarc=pass fromdomain=canb.auug.org.au); spf=pass (google.com: domain of linux-kernel+bounces-150999-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-150999-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=canb.auug.org.au Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 8DF8C1C24F2A for ; Fri, 19 Apr 2024 04:20:02 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 1DEB69473; Fri, 19 Apr 2024 04:19:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=canb.auug.org.au header.i=@canb.auug.org.au header.b="sb8Aj+XG" Received: from gandalf.ozlabs.org (gandalf.ozlabs.org [150.107.74.76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id CE292137E; Fri, 19 Apr 2024 04:19:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=150.107.74.76 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713500396; cv=none; b=DPc6ZhPiVJlF86+JggF+RpBbigawZmdHG3fnKeoOHx4vZt4vqPLVtrTUN79VtaR3zZB7L6NcVB81g0qfEXwbnWuewFON28JGJ2lEQEwghNn7dPvw9gja7XyIEq20tuzN2RT3Tiw305Pz3ZxWGaBPACzY0Bh/BlqxGWJQb68aF8A= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713500396; c=relaxed/simple; bh=PBAnXLS7YBdgwAVOVCNs0FlMIlB26SpBlBzxXB19yfg=; h=Date:From:To:Cc:Subject:Message-ID:MIME-Version:Content-Type; b=DCsM6KqW6PLMACsJkXVebP5mnaFu9Sp+5bu/MNEhvyJcIAvAXawC6oUdJw+Vdq9nQWQPIkw6oACFJtAbwxy6R1dUfHLWQV19oPNiPlxLX1Q/5BE733POuQjZfrWtFJqm1x+7rBtB8GGqqRatKcWWc+SXbyMuDpjYNZ7WcYdWMYI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=canb.auug.org.au; spf=pass smtp.mailfrom=canb.auug.org.au; dkim=pass (2048-bit key) header.d=canb.auug.org.au header.i=@canb.auug.org.au header.b=sb8Aj+XG; arc=none smtp.client-ip=150.107.74.76 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=canb.auug.org.au Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=canb.auug.org.au DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canb.auug.org.au; s=201702; t=1713500390; bh=uzRJHPvvStv+0WlWLGWHtXPKQ0B60p9m7wWL6w2VZVg=; h=Date:From:To:Cc:Subject:From; b=sb8Aj+XGFYGh5tZCOKwi+kmNDQfSUb/CTglGvjKbsKDemMFIJE6R5+53YmfHSxr8h NrokrQEJEISlFF0HaqIPr1wocwO0KpG9K/CEdPErwb7RbIny/Y3I5/Ral8ywXg5S0O N0TbLPq/Fb70vq/BGoZ1+1ToMXaPwFLqxQ8S8vFqLwfF3C571Pib2YCIGjTPnoj/lC qSsKVfss2Ajf8gm6Jykt0ayFHf2zyGDh7O/RlWNZsM7Y8KNGBgpXHjHUGtaQ2w85xq fkc+vXlkwo+mp9ZFvOaZzcVeQ78+t61LObwxlaKyVjbThyAzyEaCJTlVkPg1auYOfo LCAG+8e+Uf36w== Received: from authenticated.ozlabs.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mail.ozlabs.org (Postfix) with ESMTPSA id 4VLLyZ0pggz4x0C; Fri, 19 Apr 2024 14:19:49 +1000 (AEST) Date: Fri, 19 Apr 2024 14:19:47 +1000 From: Stephen Rothwell To: Greg KH Cc: Andy Shevchenko , Greg Kroah-Hartman , "Jiri Slaby (SUSE)" , Linux Kernel Mailing List , Linux Next Mailing List Subject: linux-next: manual merge of the tty tree with the tty.current tree Message-ID: <20240419141947.4bc16fa4@canb.auug.org.au> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: multipart/signed; boundary="Sig_/uVrJRs9Aye1uiDUT3E53_rk"; protocol="application/pgp-signature"; micalg=pgp-sha256 --Sig_/uVrJRs9Aye1uiDUT3E53_rk Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Hi all, Today's linux-next merge of the tty tree got a conflict in: drivers/tty/serial/serial_core.c between commit: 9cf7ea2eeb74 ("serial: core: Clearing the circular buffer before NULLifyi= ng it") from the tty.current tree and commits: 1788cf6a91d9 ("tty: serial: switch from circ_buf to kfifo") abcd8632f26b ("serial: core: Extract uart_alloc_xmit_buf() and uart_free_= xmit_buf()") from the tty tree. I fixed it up (see below) and can carry the fix as necessary. This is now fixed as far as linux-next is concerned, but any non trivial conflicts should be mentioned to your upstream maintainer when your tree is submitted for merging. You may also want to consider cooperating with the maintainer of the conflicting tree to minimise any particularly complex conflicts. --=20 Cheers, Stephen Rothwell diff --cc drivers/tty/serial/serial_core.c index c476d884356d,b9d631037ff6..000000000000 --- a/drivers/tty/serial/serial_core.c +++ b/drivers/tty/serial/serial_core.c @@@ -285,6 -273,53 +273,54 @@@ static int uart_alloc_xmit_buf(struct t free_page(page); } =20 + return 0; + } +=20 + static void uart_free_xmit_buf(struct tty_port *port) + { + struct uart_state *state =3D container_of(port, struct uart_state, port); + struct uart_port *uport; + unsigned long flags; + char *xmit_buf; +=20 + /* + * Do not free() the transmit buffer page under the port lock since + * this can create various circular locking scenarios. For instance, + * console driver may need to allocate/free a debug object, which + * can end up in printk() recursion. + */ + uport =3D uart_port_lock(state, flags); ++ kfifo_reset(&state->port.xmit_fifo); + xmit_buf =3D port->xmit_buf; + port->xmit_buf =3D NULL; + INIT_KFIFO(port->xmit_fifo); + uart_port_unlock(uport, flags); +=20 + free_page((unsigned long)xmit_buf); + } +=20 + /* + * Startup the port. This will be called once per open. All calls + * will be serialised by the per-port mutex. + */ + static int uart_port_startup(struct tty_struct *tty, struct uart_state *s= tate, + bool init_hw) + { + struct uart_port *uport =3D uart_port_check(state); + int retval; +=20 + if (uport->type =3D=3D PORT_UNKNOWN) + return 1; +=20 + /* + * Make sure the device is in D0 state. + */ + uart_change_pm(state, UART_PM_STATE_ON); +=20 + retval =3D uart_alloc_xmit_buf(&state->port); + if (retval) + return retval; +=20 retval =3D uport->ops->startup(uport); if (retval =3D=3D 0) { if (uart_console(uport) && uport->cons->cflag) { --Sig_/uVrJRs9Aye1uiDUT3E53_rk Content-Type: application/pgp-signature Content-Description: OpenPGP digital signature -----BEGIN PGP SIGNATURE----- iQEzBAEBCAAdFiEENIC96giZ81tWdLgKAVBC80lX0GwFAmYh8OMACgkQAVBC80lX 0GyP8Qf+PerP7qklRR1sKfZGoIzmimiPT88oA0ClWwytU23oyOfCJbKHF7YssGHz HhuxaH0C0D2TrYUJG5d998PPtVo+SVtXfYNvXH84mkHRBf2Cuc+8uEKQ1tb9D0mv AhGhfGH1cvyM8oYjbnAnNGF0XzKbubwVNM7qjcZ/yYJEVJi2fBYKJTmZekc5zDvH KDTjhA2eKvc3JcKwgQagEM/+MaNBeDG+yT5IjO36zd4Jf+vqlcUw3jNkMWrC0soC DdZS2QlzOJjgZ3pnlTtaZ7+OVb+orPBszzYG6Fa7yIP4Ah5P1LVzlo0aV+BEw5CN DqNYggsj+bYuQJKXda6iUmqwMvzYOQ== =IdQQ -----END PGP SIGNATURE----- --Sig_/uVrJRs9Aye1uiDUT3E53_rk--