<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/drivers/atm, branch v6.1.87</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v6.1.87</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v6.1.87'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2024-02-16T18:06:26+00:00</updated>
<entry>
<title>atm: idt77252: fix a memleak in open_card_ubr0</title>
<updated>2024-02-16T18:06:26+00:00</updated>
<author>
<name>Zhipeng Lu</name>
<email>alexious@zju.edu.cn</email>
</author>
<published>2024-02-01T12:41:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=cbf2e1660259bae3d5685c3068775c3385b00963'/>
<id>urn:sha1:cbf2e1660259bae3d5685c3068775c3385b00963</id>
<content type='text'>
[ Upstream commit f3616173bf9be9bf39d131b120d6eea4e6324cb5 ]

When alloc_scq fails, card-&gt;vcs[0] (i.e. vc) should be freed. Otherwise,
in the following call chain:

idt77252_init_one
  |-&gt; idt77252_dev_open
        |-&gt; open_card_ubr0
              |-&gt; alloc_scq [failed]
  |-&gt; deinit_card
        |-&gt; vfree(card-&gt;vcs);

card-&gt;vcs is freed and card-&gt;vcs[0] is leaked.

Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
Signed-off-by: Zhipeng Lu &lt;alexious@zju.edu.cn&gt;
Reviewed-by: Jiri Pirko &lt;jiri@nvidia.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>atm: solos-pci: Fix potential deadlock on &amp;tx_queue_lock</title>
<updated>2023-12-20T16:00:16+00:00</updated>
<author>
<name>Chengfeng Ye</name>
<email>dg573847474@gmail.com</email>
</author>
<published>2023-12-07T12:34:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=7cfbb8bea36ad184bc5e9bd4ef028805dcff8370'/>
<id>urn:sha1:7cfbb8bea36ad184bc5e9bd4ef028805dcff8370</id>
<content type='text'>
[ Upstream commit 15319a4e8ee4b098118591c6ccbd17237f841613 ]

As &amp;card-&gt;tx_queue_lock is acquired under softirq context along the
following call chain from solos_bh(), other acquisition of the same
lock inside process context should disable at least bh to avoid double
lock.

&lt;deadlock #2&gt;
pclose()
--&gt; spin_lock(&amp;card-&gt;tx_queue_lock)
&lt;interrupt&gt;
   --&gt; solos_bh()
   --&gt; fpga_tx()
   --&gt; spin_lock(&amp;card-&gt;tx_queue_lock)

This flaw was found by an experimental static analysis tool I am
developing for irq-related deadlock.

To prevent the potential deadlock, the patch uses spin_lock_bh()
on &amp;card-&gt;tx_queue_lock under process context code consistently to
prevent the possible deadlock scenario.

Fixes: 213e85d38912 ("solos-pci: clean up pclose() function")
Signed-off-by: Chengfeng Ye &lt;dg573847474@gmail.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>atm: solos-pci: Fix potential deadlock on &amp;cli_queue_lock</title>
<updated>2023-12-20T16:00:16+00:00</updated>
<author>
<name>Chengfeng Ye</name>
<email>dg573847474@gmail.com</email>
</author>
<published>2023-12-07T12:34:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=35c63d366fff4e930a7c44f25a8a184e0189e74a'/>
<id>urn:sha1:35c63d366fff4e930a7c44f25a8a184e0189e74a</id>
<content type='text'>
[ Upstream commit d5dba32b8f6cb39be708b726044ba30dbc088b30 ]

As &amp;card-&gt;cli_queue_lock is acquired under softirq context along the
following call chain from solos_bh(), other acquisition of the same
lock inside process context should disable at least bh to avoid double
lock.

&lt;deadlock #1&gt;
console_show()
--&gt; spin_lock(&amp;card-&gt;cli_queue_lock)
&lt;interrupt&gt;
   --&gt; solos_bh()
   --&gt; spin_lock(&amp;card-&gt;cli_queue_lock)

This flaw was found by an experimental static analysis tool I am
developing for irq-related deadlock.

To prevent the potential deadlock, the patch uses spin_lock_bh()
on the card-&gt;cli_queue_lock under process context code consistently
to prevent the possible deadlock scenario.

Fixes: 9c54004ea717 ("atm: Driver for Solos PCI ADSL2+ card.")
Signed-off-by: Chengfeng Ye &lt;dg573847474@gmail.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>atm: iphase: Do PCI error checks on own line</title>
<updated>2023-11-28T17:07:00+00:00</updated>
<author>
<name>Ilpo Järvinen</name>
<email>ilpo.jarvinen@linux.intel.com</email>
</author>
<published>2023-09-11T12:53:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=146badf18e2ccfedc25f72f5365142c09f2189ee'/>
<id>urn:sha1:146badf18e2ccfedc25f72f5365142c09f2189ee</id>
<content type='text'>
[ Upstream commit c28742447ca9879b52fbaf022ad844f0ffcd749c ]

In get_esi() PCI errors are checked inside line-split "if" conditions (in
addition to the file not following the coding style). To make the code in
get_esi() more readable, fix the coding style and use the usual error
handling pattern with a separate variable.

In addition, initialization of 'error' variable at declaration is not
needed.

No functional changes intended.

Link: https://lore.kernel.org/r/20230911125354.25501-4-ilpo.jarvinen@linux.intel.com
Signed-off-by: Ilpo Järvinen &lt;ilpo.jarvinen@linux.intel.com&gt;
Signed-off-by: Bjorn Helgaas &lt;bhelgaas@google.com&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>atm: idt77252: fix kmemleak when rmmod idt77252</title>
<updated>2023-03-30T10:49:09+00:00</updated>
<author>
<name>Li Zetao</name>
<email>lizetao1@huawei.com</email>
</author>
<published>2023-03-20T14:33:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=ff0d8cc6cde9553d8da85df6c56efbc807a52f89'/>
<id>urn:sha1:ff0d8cc6cde9553d8da85df6c56efbc807a52f89</id>
<content type='text'>
[ Upstream commit 4fe3c88552a3fbe1944426a4506a18cdeb457b5a ]

There are memory leaks reported by kmemleak:

  unreferenced object 0xffff888106500800 (size 128):
    comm "modprobe", pid 1017, jiffies 4297787785 (age 67.152s)
    hex dump (first 32 bytes):
      00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
      00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
    backtrace:
      [&lt;00000000970ce626&gt;] __kmem_cache_alloc_node+0x20c/0x380
      [&lt;00000000fb5f78d9&gt;] kmalloc_trace+0x2f/0xb0
      [&lt;000000000e947e2a&gt;] idt77252_init_one+0x2847/0x3c90 [idt77252]
      [&lt;000000006efb048e&gt;] local_pci_probe+0xeb/0x1a0
    ...

  unreferenced object 0xffff888106500b00 (size 128):
    comm "modprobe", pid 1017, jiffies 4297787785 (age 67.152s)
    hex dump (first 32 bytes):
      00 20 3d 01 80 88 ff ff 00 20 3d 01 80 88 ff ff  . =...... =.....
      f0 23 3d 01 80 88 ff ff 00 20 3d 01 00 00 00 00  .#=...... =.....
    backtrace:
      [&lt;00000000970ce626&gt;] __kmem_cache_alloc_node+0x20c/0x380
      [&lt;00000000fb5f78d9&gt;] kmalloc_trace+0x2f/0xb0
      [&lt;00000000f451c5be&gt;] alloc_scq.constprop.0+0x4a/0x400 [idt77252]
      [&lt;00000000e6313849&gt;] idt77252_init_one+0x28cf/0x3c90 [idt77252]

The root cause is traced to the vc_maps which alloced in open_card_oam()
are not freed in close_card_oam(). The vc_maps are used to record
open connections, so when close a vc_map in close_card_oam(), the memory
should be freed. Moreover, the ubr0 is not closed when close a idt77252
device, leading to the memory leak of vc_map and scq_info.

Fix them by adding kfree in close_card_oam() and implementing new
close_card_ubr0() to close ubr0.

Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
Signed-off-by: Li Zetao &lt;lizetao1@huawei.com&gt;
Reviewed-by: Francois Romieu &lt;romieu@fr.zoreil.com&gt;
Link: https://lore.kernel.org/r/20230320143318.2644630-1-lizetao1@huawei.com
Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>atm: idt77252: fix use-after-free bugs caused by tst_timer</title>
<updated>2022-08-09T03:51:59+00:00</updated>
<author>
<name>Duoming Zhou</name>
<email>duoming@zju.edu.cn</email>
</author>
<published>2022-08-05T07:00:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=3f4093e2bf4673f218c0bf17d8362337c400e77b'/>
<id>urn:sha1:3f4093e2bf4673f218c0bf17d8362337c400e77b</id>
<content type='text'>
There are use-after-free bugs caused by tst_timer. The root cause
is that there are no functions to stop tst_timer in idt77252_exit().
One of the possible race conditions is shown below:

    (thread 1)          |        (thread 2)
                        |  idt77252_init_one
                        |    init_card
                        |      fill_tst
                        |        mod_timer(&amp;card-&gt;tst_timer, ...)
idt77252_exit           |  (wait a time)
                        |  tst_timer
                        |
                        |    ...
  kfree(card) // FREE   |
                        |    card-&gt;soft_tst[e] // USE

The idt77252_dev is deallocated in idt77252_exit() and used in
timer handler.

This patch adds del_timer_sync() in idt77252_exit() in order that
the timer handler could be stopped before the idt77252_dev is
deallocated.

Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
Signed-off-by: Duoming Zhou &lt;duoming@zju.edu.cn&gt;
Link: https://lore.kernel.org/r/20220805070008.18007-1-duoming@zju.edu.cn
Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
</content>
</entry>
<entry>
<title>atm: he: Use the bitmap API to allocate bitmaps</title>
<updated>2022-07-12T02:49:53+00:00</updated>
<author>
<name>Christophe JAILLET</name>
<email>christophe.jaillet@wanadoo.fr</email>
</author>
<published>2022-07-09T15:05:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=9e433ac1a381bb1fa5e7ccbe3d226780e5b10bed'/>
<id>urn:sha1:9e433ac1a381bb1fa5e7ccbe3d226780e5b10bed</id>
<content type='text'>
Use bitmap_zalloc()/bitmap_free() instead of hand-writing them.

It is less verbose and it improves the semantic.

Signed-off-by: Christophe JAILLET &lt;christophe.jaillet@wanadoo.fr&gt;
Link: https://lore.kernel.org/r/7f795bd6d5b2a00f581175b7069b229c2e5a4192.1657379127.git.christophe.jaillet@wanadoo.fr
Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
</content>
</entry>
<entry>
<title>atm: iphase: Fix typo in comment</title>
<updated>2022-06-18T03:17:18+00:00</updated>
<author>
<name>Xiang wangx</name>
<email>wangxiang@cdjrlc.com</email>
</author>
<published>2022-06-16T16:41:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=f691b4d87edfd3fb37ad589d38cf858f47c6e050'/>
<id>urn:sha1:f691b4d87edfd3fb37ad589d38cf858f47c6e050</id>
<content type='text'>
Delete the redundant word 'the'.

Signed-off-by: Xiang wangx &lt;wangxiang@cdjrlc.com&gt;
Link: https://lore.kernel.org/r/20220616164155.11686-1-wangxiang@cdjrlc.com
Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
</content>
</entry>
<entry>
<title>net: atm: remove support for ZeitNet ZN122x ATM devices</title>
<updated>2022-04-27T11:22:56+00:00</updated>
<author>
<name>Jakub Kicinski</name>
<email>kuba@kernel.org</email>
</author>
<published>2022-04-26T17:54:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=052e1f01bfae8be6f31b61ed3a2356edfca855dc'/>
<id>urn:sha1:052e1f01bfae8be6f31b61ed3a2356edfca855dc</id>
<content type='text'>
This driver received nothing but automated fixes in the last 15 years.
Since it's using virt_to_bus it's unlikely to be used on any modern
platform.

Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net: atm: remove support for Madge Horizon ATM devices</title>
<updated>2022-04-27T11:22:56+00:00</updated>
<author>
<name>Jakub Kicinski</name>
<email>kuba@kernel.org</email>
</author>
<published>2022-04-26T17:54:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=5b74a20d35ab8ff05c2111233bb069eb7fcea4e9'/>
<id>urn:sha1:5b74a20d35ab8ff05c2111233bb069eb7fcea4e9</id>
<content type='text'>
This driver received nothing but automated fixes since git era begun.
Since it's using virt_to_bus it's unlikely to be used on any modern
platform.

Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
</feed>
