mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Stephanie Gawroriski <xerthesquirrel@gmail.com>
To: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Subject: Re: Linux 6.18-rc6
Date: Wed, 19 Nov 2025 09:18:30 -0500	[thread overview]
Message-ID: <6115647.MhkbZ0Pkbq@arborvitaetree> (raw)
In-Reply-To: <aR2JE-wBHlTTO4YX@kuha>

On Wednesday, 19 November 2025 04:08:35 EST Heikki Krogerus wrote:
> Hi
> 
> > > > Unrelated to this, after suspending and docking my laptop to my dock,
> > > > I
> > > > get
> > > > this now:
> > > > 
> > > > [50598.774359] ------------[ cut here ]------------
> > > > [50598.774371] kernfs: can not remove 'typec', no directory
> > > > [50598.774389] WARNING: CPU: 2 PID: 48932 at fs/kernfs/dir.c:1706
> > > > kernfs_remove_by_name_ns+0xcf/0xe0
> > > 
> > > Ok, that is indeed unrelated, and should be mostly harmless apart from
> > > the scary message. Do you see any other effects than the noise in the
> > > logs?
> > 
> > Not that I know of.
> > 
> > > Somebody is trying to remove a sysfs entry that has no parent,
> > > presumably because it was never registered in the first place.
> > > 
> > > At a guess, it's some error handling cleanup that is done
> > > unconditionally, unregistering an entry even when the original
> > > registration failed. Or unregistering twice.
> > > 
> > > Looks like ucsi / typec handling:
> > > > [50598.774763] Call Trace:
> > > > [50598.774775]  typec_unregister_partner+0x6c/0x110
> > > > [50598.774787]  ucsi_unregister_partner+0x103/0x140
> > > > [50598.774794]  ucsi_handle_connector_change+0x34d/0x3e0
> > > > [50598.774803]  process_one_work+0x18b/0x340
> > > > [50598.774811]  worker_thread+0x256/0x3a0
> > > > [50598.774824]  kthread+0xfc/0x240
> > > 
> > > but that said, I don't see why this would be new behavior. I don't see
> > > anything that has changed in this area lately in the typec class
> > > handling.
> > > 
> > > In fact, looking around, I see much older reports that look a bit like
> > > this, so I don't think it's new.
> > > 
> > > Adding Greg and Heikki who might know what is going on. See
> > > 
> > >    https://lore.kernel.org/all/2203148.PYKUYFuaPT@arborvitaetree/
> > > 
> > > for original report.
> > > 
> > >                 Linus
> > 
> > I really only noticed it when I was looking in dmesg very recently to see
> > if there were any application crashes due to huge_memory issue. I do look
> > in dmesg often enough, but mostly to see if devices are being recognized
> > properly or other events such as when the embedded JVM I am working on
> > split locks.
> Thanks for the report. It looks like the code does not increment the
> reference count of the USB device that is liked to the typec partner.
> 
> Is it possible for you to test this?
> 
> diff --git a/drivers/usb/typec/class.c b/drivers/usb/typec/class.c
> index 9b2647cb199b..4ace92af9856 100644
> --- a/drivers/usb/typec/class.c
> +++ b/drivers/usb/typec/class.c
> @@ -805,6 +805,8 @@ static void typec_partner_link_device(struct
> typec_partner *partner, struct devi return;
>         }
> 
> +       get_device(dev);
> +
>         if (partner->attach)
>                 partner->attach(partner, dev);
>  }
> @@ -816,6 +818,8 @@ static void typec_partner_unlink_device(struct
> typec_partner *partner, struct de
> 
>         if (partner->deattach)
>                 partner->deattach(partner, dev);
> +
> +       put_device(dev);
>  }
> 
>  /**

I can give it a try! I do notice the trace in dmesg, however it does not 
always appear when docking/undocking so I am not sure the conditions in which 
it occurs in.




  reply	other threads:[~2025-11-19 14:18 UTC|newest]

Thread overview: 39+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-11-16 22:42 Linus Torvalds
2025-11-17  8:20 ` David Wang
2025-11-17 10:33   ` Linus Torvalds
2025-11-17 12:56     ` David Wang
2025-11-17 13:30       ` David Hildenbrand (Red Hat)
2025-11-17 13:45         ` David Wang
2025-11-17 14:08           ` David Hildenbrand (Red Hat)
2025-11-17 15:28             ` David Wang
2025-11-17 16:59             ` Xi Ruoyao
2025-11-17 21:19               ` Joan Bruguera Micó
2025-11-17 17:28             ` Linus Torvalds
2025-11-17 17:53               ` David Hildenbrand (Red Hat)
2025-11-17 17:59                 ` Linus Torvalds
2025-11-17 18:24                   ` David Hildenbrand (Red Hat)
2025-11-17 19:17                     ` David Hildenbrand (Red Hat)
2025-11-18  1:10                       ` Linus Torvalds
2025-11-18  4:13                         ` David Wang
2025-11-18 13:55                           ` David Wang
2025-11-18 14:12                             ` David Hildenbrand (Red Hat)
2025-11-18 14:33                               ` David Wang
2025-11-18 14:44                               ` Carlos Llamas
2025-11-18 14:51                                 ` David Hildenbrand (Red Hat)
2025-11-18 14:53                                   ` Carlos Llamas
2025-11-18 15:09                                   ` David Wang
2025-11-18  7:28                         ` David Hildenbrand (Red Hat)
2025-11-18 16:49                           ` Linus Torvalds
2025-11-19 15:42                             ` Catalin Marinas
2025-11-18  3:59             ` Carlos Llamas
2025-11-17 16:42       ` Linus Torvalds
2025-11-17 18:13 ` Guenter Roeck
2025-11-18 17:23 ` Stephanie Gawroriski
2025-11-18 18:01   ` Linus Torvalds
2025-11-18 20:18     ` Stephanie Gawroriski
2025-11-19  9:08       ` Heikki Krogerus
2025-11-19 14:18         ` Stephanie Gawroriski [this message]
2025-11-19 15:04         ` Stephanie Gawroriski
2025-11-24  9:50           ` Heikki Krogerus
2025-11-26 16:01             ` Stephanie Gawroriski
2025-11-27  9:53               ` Heikki Krogerus

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=6115647.MhkbZ0Pkbq@arborvitaetree \
    --to=xerthesquirrel@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=heikki.krogerus@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@linux-foundation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®