Re: [PATCH] [RFC] wireless: move obsolete drivers to staging

From: Dan Carpenter
Date: Thu Oct 12 2023 - 02:23:24 EST


On Wed, Oct 11, 2023 at 10:22:32PM +0200, Arnd Bergmann wrote:
> On Wed, Oct 11, 2023, at 20:13, Philipp Hortmann wrote:
> > On 10/10/23 17:27, Arnd Bergmann wrote:
> >> From: Arnd Bergmann <arnd@xxxxxxxx> While looking at the old drivers
> >> using the obsolete .ndo_do_ioctl() callback, I found a number of network
> >> drivers that are especially obsolete, in particular for 802.11b
> >> (11Mbit/s) or even older wireless networks, using non-busmaster
> >> ISA/PCMCIA style bus interfaces, and using the legacy wireless extension
> >> ioctls rather than the netlink interfaces that were meant to replace
> >> them in 2007. All of these drivers are obsolete or orphaned. We had
> >> previously discussed this topic, but nobody ever moved the files, so I
> >> now went through the list to my best knowledge. These are the drivers
> >> that I would classify as "probably unused" by now:
> >
> > I found a USB WLAN Stick with a rtl8192u. I got it last Saturday and
> > found out that the firmware is missing in my ubuntu 20.04. I found it on
> > the web and fixed it. When I started the driver my computer crashed. The
> > missing part was: priv->priv_wq = alloc_workqueue("priv_wq", 0, 0);
> > Fixing this the next error was a network = kzalloc(sizeof(*network),
> > GFP_KERNEL); in wrong context with leads to a crash of my computer.
> > Fixing this leads to another issue which lets my computer crash.
> >
> > For me the firmware of rtl8192u was intentionally missing because of the
> > issues with the driver.
> >
> > What this has to do with your question?
> > Can we check for missing firmware in main distributions to know which
> > drivers are considered to be old and unused?
>
> Nice, thanks so much for testing.
>
> I see the two bugs were introduced in 2016 by commit 1761a85c3bed3
> ("staging: rtl8192u: Remove create_workqueue()")

This one never made it to lore... I think we wouldn't have merged it
without a lore review these days. (There was a lot of moaning and
complaining at the time).

> and in 2021 by
> commit 061e390b7c87f ("staging: rtl8192u: ieee80211_softmac: Move a
> large data struct onto the heap"), so it's been broken for a while.

:/ No way would I have seen this in review. Smatch is supposed to find
some of these "sleeping in invalid context" warnings but the sleeping in
IRQ stuff doesn't work and hasn't been released.

regards,
dan carpenter