<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-dev/drivers/isdn/mISDN, branch master</title>
<subtitle>Linux kernel development work - see feature branches</subtitle>
<id>https://git.zx2c4.com/linux-dev/atom/drivers/isdn/mISDN?h=master</id>
<link rel='self' href='https://git.zx2c4.com/linux-dev/atom/drivers/isdn/mISDN?h=master'/>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/'/>
<updated>2022-11-02T12:34:48Z</updated>
<entry>
<title>mISDN: fix possible memory leak in mISDN_register_device()</title>
<updated>2022-11-02T12:34:48Z</updated>
<author>
<name>Yang Yingliang</name>
<email>yangyingliang@huawei.com</email>
</author>
<published>2022-10-31T12:13:40Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=e7d1d4d9ac0dfa40be4c2c8abd0731659869b297'/>
<id>urn:sha1:e7d1d4d9ac0dfa40be4c2c8abd0731659869b297</id>
<content type='text'>
Afer commit 1fa5ae857bb1 ("driver core: get rid of struct device's
bus_id string array"), the name of device is allocated dynamically,
add put_device() to give up the reference, so that the name can be
freed in kobject_cleanup() when the refcount is 0.

Set device class before put_device() to avoid null release() function
WARN message in device_release().

Fixes: 1fa5ae857bb1 ("driver core: get rid of struct device's bus_id string array")
Signed-off-by: Yang Yingliang &lt;yangyingliang@huawei.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>mISDN: fix use-after-free bugs in l1oip timer handlers</title>
<updated>2022-09-30T11:32:42Z</updated>
<author>
<name>Duoming Zhou</name>
<email>duoming@zju.edu.cn</email>
</author>
<published>2022-09-28T13:39:38Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=2568a7e0832ee30b0a351016d03062ab4e0e0a3f'/>
<id>urn:sha1:2568a7e0832ee30b0a351016d03062ab4e0e0a3f</id>
<content type='text'>
The l1oip_cleanup() traverses the l1oip_ilist and calls
release_card() to cleanup module and stack. However,
release_card() calls del_timer() to delete the timers
such as keep_tl and timeout_tl. If the timer handler is
running, the del_timer() will not stop it and result in
UAF bugs. One of the processes is shown below:

    (cleanup routine)          |        (timer handler)
release_card()                 | l1oip_timeout()
 ...                           |
 del_timer()                   | ...
 ...                           |
 kfree(hc) //FREE              |
                               | hc-&gt;timeout_on = 0 //USE

Fix by calling del_timer_sync() in release_card(), which
makes sure the timer handlers have finished before the
resources, such as l1oip and so on, have been deallocated.

What's more, the hc-&gt;workq and hc-&gt;socket_thread can kick
those timers right back in. We add a bool flag to show
if card is released. Then, check this flag in hc-&gt;workq
and hc-&gt;socket_thread.

Fixes: 3712b42d4b1b ("Add layer1 over IP support")
Signed-off-by: Duoming Zhou &lt;duoming@zju.edu.cn&gt;
Reviewed-by: Leon Romanovsky &lt;leonro@nvidia.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net: remove noblock parameter from skb_recv_datagram()</title>
<updated>2022-04-06T12:45:26Z</updated>
<author>
<name>Oliver Hartkopp</name>
<email>socketcan@hartkopp.net</email>
</author>
<published>2022-04-04T16:30:22Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=f4b41f062c424209e3939a81e6da022e049a45f2'/>
<id>urn:sha1:f4b41f062c424209e3939a81e6da022e049a45f2</id>
<content type='text'>
skb_recv_datagram() has two parameters 'flags' and 'noblock' that are
merged inside skb_recv_datagram() by 'flags | (noblock ? MSG_DONTWAIT : 0)'

As 'flags' may contain MSG_DONTWAIT as value most callers split the 'flags'
into 'flags' and 'noblock' with finally obsolete bit operations like this:

skb_recv_datagram(sk, flags &amp; ~MSG_DONTWAIT, flags &amp; MSG_DONTWAIT, &amp;rc);

And this is not even done consistently with the 'flags' parameter.

This patch removes the obsolete and costly splitting into two parameters
and only performs bit operations when really needed on the caller side.

One missing conversion thankfully reported by kernel test robot. I missed
to enable kunit tests to build the mctp code.

Reported-by: kernel test robot &lt;lkp@intel.com&gt;
Signed-off-by: Oliver Hartkopp &lt;socketcan@hartkopp.net&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>mISDN: Fix memory leak in dsp_pipeline_build()</title>
<updated>2022-03-05T12:04:14Z</updated>
<author>
<name>Alexey Khoroshilov</name>
<email>khoroshilov@ispras.ru</email>
</author>
<published>2022-03-04T18:25:36Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=c6a502c2299941c8326d029cfc8a3bc8a4607ad5'/>
<id>urn:sha1:c6a502c2299941c8326d029cfc8a3bc8a4607ad5</id>
<content type='text'>
dsp_pipeline_build() allocates dup pointer by kstrdup(cfg),
but then it updates dup variable by strsep(&amp;dup, "|").
As a result when it calls kfree(dup), the dup variable contains NULL.

Found by Linux Driver Verification project (linuxtesting.org) with SVACE.

Signed-off-by: Alexey Khoroshilov &lt;khoroshilov@ispras.ru&gt;
Fixes: 960366cf8dbb ("Add mISDN DSP")
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>mISDN: change function names to avoid conflicts</title>
<updated>2021-12-28T12:12:04Z</updated>
<author>
<name>wolfgang huang</name>
<email>huangjinhui@kylinos.cn</email>
</author>
<published>2021-12-28T08:01:20Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=8b5fdfc57cc2471179d1c51081424ded833c16c8'/>
<id>urn:sha1:8b5fdfc57cc2471179d1c51081424ded833c16c8</id>
<content type='text'>
As we build for mips, we meet following error. l1_init error with
multiple definition. Some architecture devices usually marked with
l1, l2, lxx as the start-up phase. so we change the mISDN function
names, align with Isdnl2_xxx.

mips-linux-gnu-ld: drivers/isdn/mISDN/layer1.o: in function `l1_init':
(.text+0x890): multiple definition of `l1_init'; \
arch/mips/kernel/bmips_5xxx_init.o:(.text+0xf0): first defined here
make[1]: *** [home/mips/kernel-build/linux/Makefile:1161: vmlinux] Error 1

Signed-off-by: wolfgang huang &lt;huangjinhui@kylinos.cn&gt;
Reported-by: k2ci &lt;kernel-bot@kylinos.cn&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>mISDN: Remove obsolete PIPELINE_DEBUG debugging information</title>
<updated>2021-05-20T20:03:05Z</updated>
<author>
<name>Zhen Lei</name>
<email>thunder.leizhen@huawei.com</email>
</author>
<published>2021-05-20T02:14:11Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=2682ea324b000709dafec7e9210caa5189377c45'/>
<id>urn:sha1:2682ea324b000709dafec7e9210caa5189377c45</id>
<content type='text'>
As Leon Romanovsky's tips:
The definition of macro PIPELINE_DEBUG is commented more than 10 years ago
and can be seen as a dead code that should be removed.

Suggested-by: Leon Romanovsky &lt;leon@kernel.org&gt;
Signed-off-by: Zhen Lei &lt;thunder.leizhen@huawei.com&gt;
Reviewed-by: Leon Romanovsky &lt;leonro@nvidia.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>mISDN: Use LIST_HEAD() for list_head</title>
<updated>2021-03-30T20:34:42Z</updated>
<author>
<name>Shixin Liu</name>
<email>liushixin2@huawei.com</email>
</author>
<published>2021-03-30T02:24:15Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=5979415d00d42fd66d4227a34a6fa528003ae88a'/>
<id>urn:sha1:5979415d00d42fd66d4227a34a6fa528003ae88a</id>
<content type='text'>
There's no need to declare a list and then init it manually,
just use the LIST_HEAD() macro.

Signed-off-by: Shixin Liu &lt;liushixin2@huawei.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>mISDN: Use DEFINE_SPINLOCK() for spinlock</title>
<updated>2021-03-30T20:34:42Z</updated>
<author>
<name>Shixin Liu</name>
<email>liushixin2@huawei.com</email>
</author>
<published>2021-03-30T02:24:14Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=77053fb7b428099bfdc2ec81a923587a2692d84b'/>
<id>urn:sha1:77053fb7b428099bfdc2ec81a923587a2692d84b</id>
<content type='text'>
spinlock can be initialized automatically with DEFINE_SPINLOCK()
rather than explicitly calling spin_lock_init().

Changelog:
From v1:
1. fix the mistake reported by kernel test robot.

Signed-off-by: Shixin Liu &lt;liushixin2@huawei.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>isdn: mISDN: remove unneeded variable 'ret'</title>
<updated>2021-03-10T20:45:15Z</updated>
<author>
<name>Yang Li</name>
<email>yang.lee@linux.alibaba.com</email>
</author>
<published>2021-03-10T08:53:04Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=762c1adb1c15655307b079393f14f098d135f051'/>
<id>urn:sha1:762c1adb1c15655307b079393f14f098d135f051</id>
<content type='text'>
Fix the following coccicheck warning:
./drivers/isdn/mISDN/dsp_core.c:956:6-9: Unneeded variable: "err".
Return "0" on line 1001

Reported-by: Abaci Robot &lt;abaci@linux.alibaba.com&gt;
Signed-off-by: Yang Li &lt;yang.lee@linux.alibaba.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>drivers: isdn: mISDN: fix spelling typo of 'wheter'</title>
<updated>2021-03-10T20:45:14Z</updated>
<author>
<name>Wang Qing</name>
<email>wangqing@vivo.com</email>
</author>
<published>2021-03-10T03:06:03Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=67a580aad1797938a1492f41f3f1447e751969e8'/>
<id>urn:sha1:67a580aad1797938a1492f41f3f1447e751969e8</id>
<content type='text'>
wheter -&gt; whether

Signed-off-by: Wang Qing &lt;wangqing@vivo.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
</feed>
