<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/drivers/pcmcia, branch v6.1.124</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v6.1.124</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v6.1.124'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2024-09-12T09:10:20+00:00</updated>
<entry>
<title>pcmcia: Use resource_size function on resource object</title>
<updated>2024-09-12T09:10:20+00:00</updated>
<author>
<name>Jules Irenge</name>
<email>jbi.octave@gmail.com</email>
</author>
<published>2024-05-12T22:31:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=24d3e379db7d3065d13ae40ddfcdeb9c1b4751e1'/>
<id>urn:sha1:24d3e379db7d3065d13ae40ddfcdeb9c1b4751e1</id>
<content type='text'>
[ Upstream commit 24a025497e7e883bd2adef5d0ece1e9b9268009f ]

Cocinnele reports a warning

WARNING: Suspicious code. resource_size is maybe missing with root

The root cause is the function resource_size is not used when needed

Use resource_size() on variable "root" of type resource

Signed-off-by: Jules Irenge &lt;jbi.octave@gmail.com&gt;
Signed-off-by: Dominik Brodowski &lt;linux@dominikbrodowski.net&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>pcmcia: ds: fix possible name leak in error path in pcmcia_device_add()</title>
<updated>2023-11-20T10:52:13+00:00</updated>
<author>
<name>Yang Yingliang</name>
<email>yangyingliang@huawei.com</email>
</author>
<published>2022-11-12T09:29:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=f258fd94abcde5a15838bb590beb5c11a0ebd564'/>
<id>urn:sha1:f258fd94abcde5a15838bb590beb5c11a0ebd564</id>
<content type='text'>
[ Upstream commit 99e1241049a92dd3e9a90a0f91e32ce390133278 ]

Afer commit 1fa5ae857bb1 ("driver core: get rid of struct device's
bus_id string array"), the name of device is allocated dynamically.
Therefore, it needs to be freed, which is done by the driver core for
us once all references to the device are gone. Therefore, move the
dev_set_name() call immediately before the call device_register(), which
either succeeds (then the freeing will be done upon subsequent remvoal),
or puts the reference in the error call. Also, it is not unusual that the
return value of dev_set_name is not checked.

Fixes: 1fa5ae857bb1 ("driver core: get rid of struct device's bus_id string array")
Signed-off-by: Yang Yingliang &lt;yangyingliang@huawei.com&gt;
[linux@dominikbrodowski.net: simplification, commit message modified]
Signed-off-by: Dominik Brodowski &lt;linux@dominikbrodowski.net&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>pcmcia: ds: fix refcount leak in pcmcia_device_add()</title>
<updated>2023-11-20T10:52:13+00:00</updated>
<author>
<name>Yang Yingliang</name>
<email>yangyingliang@huawei.com</email>
</author>
<published>2022-11-12T09:29:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=7c9947693b5e85483bd3a33344bbdc5c24faab08'/>
<id>urn:sha1:7c9947693b5e85483bd3a33344bbdc5c24faab08</id>
<content type='text'>
[ Upstream commit 402ab979b29126068e0b596b641422ff7490214c ]

As the comment of device_register() says, it should use put_device()
to give up the reference in the error path. Then, insofar resources
will be freed in pcmcia_release_dev(), the error path is no longer
needed. In particular, this means that the (previously missing) dropping
of the reference to &amp;p_dev-&gt;function_config-&gt;ref is now handled by
pcmcia_release_dev().

Fixes: 360b65b95bae ("[PATCH] pcmcia: make config_t independent, add reference counting")
Signed-off-by: Yang Yingliang &lt;yangyingliang@huawei.com&gt;
[linux@dominikbrodowski.net: simplification, commit message rewrite]
Signed-off-by: Dominik Brodowski &lt;linux@dominikbrodowski.net&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>pcmcia: cs: fix possible hung task and memory leak pccardd()</title>
<updated>2023-11-20T10:52:13+00:00</updated>
<author>
<name>Yang Yingliang</name>
<email>yangyingliang@huawei.com</email>
</author>
<published>2022-11-12T09:25:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=fbdf451e76836bd49d4392b22706c44d6b3f539f'/>
<id>urn:sha1:fbdf451e76836bd49d4392b22706c44d6b3f539f</id>
<content type='text'>
[ Upstream commit e3ea1b4847e49234e691c0d66bf030bd65bb7f2b ]

If device_register() returns error in pccardd(), it leads two issues:

1. The socket_released has never been completed, it will block
   pcmcia_unregister_socket(), because of waiting for completion
   of socket_released.
2. The device name allocated by dev_set_name() is leaked.

Fix this two issues by calling put_device() when device_register() fails.
socket_released can be completed in pcmcia_release_socket(), the name can
be freed in kobject_cleanup().

Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
Signed-off-by: Yang Yingliang &lt;yangyingliang@huawei.com&gt;
Signed-off-by: Dominik Brodowski &lt;linux@dominikbrodowski.net&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>pcmcia: rsrc_nonstatic: Fix memory leak in nonstatic_release_resource_db()</title>
<updated>2023-08-23T15:52:24+00:00</updated>
<author>
<name>Armin Wolf</name>
<email>W_Armin@gmx.de</email>
</author>
<published>2023-05-12T18:45:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=e8a80cf06b4bb0396212289d651b384c949f09d0'/>
<id>urn:sha1:e8a80cf06b4bb0396212289d651b384c949f09d0</id>
<content type='text'>
[ Upstream commit c85fd9422fe0f5d667305efb27f56d09eab120b0 ]

When nonstatic_release_resource_db() frees all resources associated
with an PCMCIA socket, it forgets to free socket_data too, causing
a memory leak observable with kmemleak:

unreferenced object 0xc28d1000 (size 64):
  comm "systemd-udevd", pid 297, jiffies 4294898478 (age 194.484s)
  hex dump (first 32 bytes):
    00 00 00 00 00 00 00 00 f0 85 0e c3 00 00 00 00  ................
    00 00 00 00 0c 10 8d c2 00 00 00 00 00 00 00 00  ................
  backtrace:
    [&lt;ffda4245&gt;] __kmem_cache_alloc_node+0x2d7/0x4a0
    [&lt;7e51f0c8&gt;] kmalloc_trace+0x31/0xa4
    [&lt;d52b4ca0&gt;] nonstatic_init+0x24/0x1a4 [pcmcia_rsrc]
    [&lt;a2f13e08&gt;] pcmcia_register_socket+0x200/0x35c [pcmcia_core]
    [&lt;a728be1b&gt;] yenta_probe+0x4d8/0xa70 [yenta_socket]
    [&lt;c48fac39&gt;] pci_device_probe+0x99/0x194
    [&lt;84b7c690&gt;] really_probe+0x181/0x45c
    [&lt;8060fe6e&gt;] __driver_probe_device+0x75/0x1f4
    [&lt;b9b76f43&gt;] driver_probe_device+0x28/0xac
    [&lt;648b766f&gt;] __driver_attach+0xeb/0x1e4
    [&lt;6e9659eb&gt;] bus_for_each_dev+0x61/0xb4
    [&lt;25a669f3&gt;] driver_attach+0x1e/0x28
    [&lt;d8671d6b&gt;] bus_add_driver+0x102/0x20c
    [&lt;df0d323c&gt;] driver_register+0x5b/0x120
    [&lt;942cd8a4&gt;] __pci_register_driver+0x44/0x4c
    [&lt;e536027e&gt;] __UNIQUE_ID___addressable_cleanup_module188+0x1c/0xfffff000 [iTCO_vendor_support]

Fix this by freeing socket_data too.

Tested on a Acer Travelmate 4002WLMi by manually binding/unbinding
the yenta_cardbus driver (yenta_socket).

Signed-off-by: Armin Wolf &lt;W_Armin@gmx.de&gt;
Message-ID: &lt;20230512184529.5094-1-W_Armin@gmx.de&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>pcmcia: remove AT91RM9200 Compact Flash driver</title>
<updated>2022-09-27T06:12:16+00:00</updated>
<author>
<name>Dominik Brodowski</name>
<email>linux@dominikbrodowski.net</email>
</author>
<published>2022-09-24T14:10:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=15e74c6c1ce2d388e967f32cdaa83ca034fa6452'/>
<id>urn:sha1:15e74c6c1ce2d388e967f32cdaa83ca034fa6452</id>
<content type='text'>
As noted by Arnd Bergmann, "we used to have three drivers for the same
hardware (pcmcia, pata and ide), and only the pcmcia driver remained
in the tree after drivers/ide/ was removed and pata_at91 did not get
converted to DT". "There is no dts file in tree that actually declares
either of them, so chances are that nobody is actually using the CF
slot on at91 any more."[1]

On this rationale, remove the AT91RM9200 Compact Flash driver, which
also assists in reaching "the goal of stopping exporting OF-specific
APIs of gpiolib".[2]

[1] https://lore.kernel.org/lkml/68c63077-848b-45f5-8aca-ed995391f2b6@www.fastmail.com/
[2] https://lore.kernel.org/lkml/Yy6d7TjqzUwGQnQa@penguin/

Acked-by: Dmitry Torokhov &lt;dmitry.torokhov@gmail.com&gt;
Acked-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
Acked-by: Alexandre Belloni &lt;alexandre.belloni@bootlin.com&gt;
Acked-by: Arnd Bergmann &lt;arnd@arndb.de&gt;
Acked-by: Nicolas Ferre &lt;nicolas.ferre@microchip.com&gt;
Signed-off-by: Dominik Brodowski &lt;linux@dominikbrodowski.net&gt;
</content>
</entry>
<entry>
<title>pcmcia: Removed unused variable control.</title>
<updated>2022-09-24T14:05:54+00:00</updated>
<author>
<name>Souptick Joarder (HPE)</name>
<email>jrdr.linux@gmail.com</email>
</author>
<published>2022-07-25T01:29:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=50f9926da3ce6c82f2a4ab1e8b18f032349837a4'/>
<id>urn:sha1:50f9926da3ce6c82f2a4ab1e8b18f032349837a4</id>
<content type='text'>
Kernel test robot throws below warning -&gt;
drivers/pcmcia/omap_cf.c:127:7: warning: variable 'control'
set but not used [-Wunused-but-set-variable]

Removed unused variable control.

Reported-by: kernel test robot &lt;lkp@intel.com&gt;
Signed-off-by: Souptick Joarder (HPE) &lt;jrdr.linux@gmail.com&gt;
[linux@dominikbrodowski.net: retain omap_readw() call, as it might be required]
Signed-off-by: Dominik Brodowski &lt;linux@dominikbrodowski.net&gt;
</content>
</entry>
<entry>
<title>pcmcia: Add __init/__exit annotations to module init/exit funcs</title>
<updated>2022-09-22T14:45:25+00:00</updated>
<author>
<name>Xiu Jianfeng</name>
<email>xiujianfeng@huawei.com</email>
</author>
<published>2022-09-22T11:23:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=ea9d7c790a2a279810fd2a7db6908a136c97d466'/>
<id>urn:sha1:ea9d7c790a2a279810fd2a7db6908a136c97d466</id>
<content type='text'>
Add missing __init/__exit annotations to module init/exit funcs.

Signed-off-by: Xiu Jianfeng &lt;xiujianfeng@huawei.com&gt;
Signed-off-by: Dominik Brodowski &lt;linux@dominikbrodowski.net&gt;
</content>
</entry>
<entry>
<title>pcmcia: at91_cf: make mc static</title>
<updated>2022-09-22T14:23:52+00:00</updated>
<author>
<name>ruanjinjie</name>
<email>ruanjinjie@huawei.com</email>
</author>
<published>2022-09-14T03:00:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=105e2fdb250a00e9b9ea1e6283d973397e927bce'/>
<id>urn:sha1:105e2fdb250a00e9b9ea1e6283d973397e927bce</id>
<content type='text'>
The symbol is not used outside of the file, so mark it static.

Fixes the following warning:

./drivers/pcmcia/at91_cf.c:49:15: warning: symbol 'mc' was not declared. Should it be static?

Signed-off-by: ruanjinjie &lt;ruanjinjie@huawei.com&gt;
Signed-off-by: Dominik Brodowski &lt;linux@dominikbrodowski.net&gt;
</content>
</entry>
<entry>
<title>pcmcia: remove VR41XX PCMCIA driver</title>
<updated>2022-09-22T14:23:52+00:00</updated>
<author>
<name>Thomas Bogendoerfer</name>
<email>tsbogend@alpha.franken.de</email>
</author>
<published>2022-07-15T13:54:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=ae19e152849514fe15dfdcd1d3a37bdd5e4bdbb4'/>
<id>urn:sha1:ae19e152849514fe15dfdcd1d3a37bdd5e4bdbb4</id>
<content type='text'>
Commit d3164e2f3b0a ("MIPS: Remove VR41xx support") removed support
for MIPS VR41xx platform, so remove exclusive drivers for this
platform, too.

Signed-off-by: Thomas Bogendoerfer &lt;tsbogend@alpha.franken.de&gt;
Signed-off-by: Dominik Brodowski &lt;linux@dominikbrodowski.net&gt;
</content>
</entry>
</feed>
