Skip to content

Commit a10ca09

Browse files
committed
Merge tag 'driver-core-6.3-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core
Pull driver core fixes from Greg KH: "Here are three small changes for 6.3-rc5 semi-related to driver core stuff: - documentation update where we move the security_bugs file to a more relevant location. - mdt/spi-nor debugfs memory leak fix that's been floating around for a long time and acked by the maintainer - cacheinfo bugfix for a regression in 6.3-rc1 All have been in linux-next with no reported problems" * tag 'driver-core-6.3-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core: cacheinfo: Fix LLC is not exported through sysfs Documentation/security-bugs: move from admin-guide/ to process/ mtd: spi-nor: fix memory leak when using debugfs_lookup()
2 parents 95d0b9d + 5c27123 commit a10ca09

File tree

23 files changed

+60
-29
lines changed

23 files changed

+60
-29
lines changed

Documentation/admin-guide/index.rst

-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@ problems and bugs in particular.
3636

3737
reporting-issues
3838
reporting-regressions
39-
security-bugs
4039
bug-hunting
4140
bug-bisect
4241
tainted-kernels

Documentation/admin-guide/reporting-issues.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -395,7 +395,7 @@ might want to be aware of; it for example explains how to add your issue to the
395395
list of tracked regressions, to ensure it won't fall through the cracks.
396396

397397
What qualifies as security issue is left to your judgment. Consider reading
398-
Documentation/admin-guide/security-bugs.rst before proceeding, as it
398+
Documentation/process/security-bugs.rst before proceeding, as it
399399
provides additional details how to best handle security issues.
400400

401401
An issue is a 'really severe problem' when something totally unacceptably bad
@@ -1269,7 +1269,7 @@ them when sending the report by mail. If you filed it in a bug tracker, forward
12691269
the report's text to these addresses; but on top of it put a small note where
12701270
you mention that you filed it with a link to the ticket.
12711271

1272-
See Documentation/admin-guide/security-bugs.rst for more information.
1272+
See Documentation/process/security-bugs.rst for more information.
12731273

12741274

12751275
Duties after the report went out

Documentation/process/howto.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ required reading:
138138
philosophy and is very important for people moving to Linux from
139139
development on other Operating Systems.
140140

141-
:ref:`Documentation/admin-guide/security-bugs.rst <securitybugs>`
141+
:ref:`Documentation/process/security-bugs.rst <securitybugs>`
142142
If you feel you have found a security problem in the Linux kernel,
143143
please follow the steps in this document to help notify the kernel
144144
developers, and help solve the issue.

Documentation/process/index.rst

+8-1
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,14 @@ Below are the essential guides that every developer should read.
3535
kernel-enforcement-statement
3636
kernel-driver-statement
3737

38+
For security issues, see:
39+
40+
.. toctree::
41+
:maxdepth: 1
42+
43+
security-bugs
44+
embargoed-hardware-issues
45+
3846
Other guides to the community that are of interest to most developers are:
3947

4048
.. toctree::
@@ -47,7 +55,6 @@ Other guides to the community that are of interest to most developers are:
4755
submit-checklist
4856
kernel-docs
4957
deprecated
50-
embargoed-hardware-issues
5158
maintainers
5259
researcher-guidelines
5360

Documentation/process/researcher-guidelines.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ Before contributing, carefully read the appropriate documentation:
6868
* Documentation/process/development-process.rst
6969
* Documentation/process/submitting-patches.rst
7070
* Documentation/admin-guide/reporting-issues.rst
71-
* Documentation/admin-guide/security-bugs.rst
71+
* Documentation/process/security-bugs.rst
7272

7373
Then send a patch (including a commit log with all the details listed
7474
below) and follow up on any feedback from other developers.

Documentation/process/stable-kernel-rules.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ Procedure for submitting patches to the -stable tree
3939

4040
Security patches should not be handled (solely) by the -stable review
4141
process but should follow the procedures in
42-
:ref:`Documentation/admin-guide/security-bugs.rst <securitybugs>`.
42+
:ref:`Documentation/process/security-bugs.rst <securitybugs>`.
4343

4444
For all other submissions, choose one of the following procedures
4545
-----------------------------------------------------------------

Documentation/process/submitting-patches.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,7 @@ If you have a patch that fixes an exploitable security bug, send that patch
254254
to [email protected]. For severe bugs, a short embargo may be considered
255255
to allow distributors to get the patch out to users; in such cases,
256256
obviously, the patch should not be sent to any public lists. See also
257-
Documentation/admin-guide/security-bugs.rst.
257+
Documentation/process/security-bugs.rst.
258258

259259
Patches that fix a severe bug in a released kernel should be directed
260260
toward the stable maintainers by putting a line like this::

Documentation/translations/it_IT/admin-guide/security-bugs.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
.. include:: ../disclaimer-ita.rst
22

3-
:Original: :ref:`Documentation/admin-guide/security-bugs.rst <securitybugs>`
3+
:Original: :ref:`Documentation/process/security-bugs.rst <securitybugs>`
44

55
.. _it_securitybugs:
66

Documentation/translations/it_IT/process/submitting-patches.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,7 @@ embargo potrebbe essere preso in considerazione per dare il tempo alle
272272
distribuzioni di prendere la patch e renderla disponibile ai loro utenti;
273273
in questo caso, ovviamente, la patch non dovrebbe essere inviata su alcuna
274274
lista di discussione pubblica. Leggete anche
275-
Documentation/admin-guide/security-bugs.rst.
275+
Documentation/process/security-bugs.rst.
276276

277277
Patch che correggono bachi importanti su un kernel già rilasciato, dovrebbero
278278
essere inviate ai manutentori dei kernel stabili aggiungendo la seguente riga::

Documentation/translations/ja_JP/howto.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ [email protected] に送ることを勧めます。
167167
このドキュメントは Linux 開発の思想を理解するのに非常に重要です。
168168
そして、他のOSでの開発者が Linux に移る時にとても重要です。
169169

170-
:ref:`Documentation/admin-guide/security-bugs.rst <securitybugs>`
170+
:ref:`Documentation/process/security-bugs.rst <securitybugs>`
171171
もし Linux カーネルでセキュリティ問題を発見したように思ったら、こ
172172
のドキュメントのステップに従ってカーネル開発者に連絡し、問題解決を
173173
支援してください。

Documentation/translations/ko_KR/howto.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ [email protected]의 메인테이너에게 보낼 것을 권장한다.
157157
리눅스로 전향하는 사람들에게는 매우 중요하다.
158158

159159

160-
:ref:`Documentation/admin-guide/security-bugs.rst <securitybugs>`
160+
:ref:`Documentation/process/security-bugs.rst <securitybugs>`
161161
여러분들이 리눅스 커널의 보안 문제를 발견했다고 생각한다면 이 문서에
162162
나온 단계에 따라서 커널 개발자들에게 알리고 그 문제를 해결할 수 있도록
163163
도와 달라.

Documentation/translations/sp_SP/howto.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ de obligada lectura:
135135
de Linux y es muy importante para las personas que se mudan a Linux
136136
tras desarrollar otros sistemas operativos.
137137

138-
:ref:`Documentation/admin-guide/security-bugs.rst <securitybugs>`
138+
:ref:`Documentation/process/security-bugs.rst <securitybugs>`
139139
Si cree que ha encontrado un problema de seguridad en el kernel de
140140
Linux, siga los pasos de este documento para ayudar a notificar a los
141141
desarrolladores del kernel y ayudar a resolver el problema.

Documentation/translations/sp_SP/process/submitting-patches.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -276,7 +276,7 @@ parche a [email protected]. Para errores graves, se debe mantener un
276276
poco de discreción y permitir que los distribuidores entreguen el parche a
277277
los usuarios; en esos casos, obviamente, el parche no debe enviarse a
278278
ninguna lista pública. Revise también
279-
Documentation/admin-guide/security-bugs.rst.
279+
Documentation/process/security-bugs.rst.
280280

281281
Los parches que corrigen un error grave en un kernel en uso deben dirigirse
282282
hacia los maintainers estables poniendo una línea como esta::

Documentation/translations/zh_CN/admin-guide/security-bugs.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
.. include:: ../disclaimer-zh_CN.rst
22

3-
:Original: :doc:`../../../admin-guide/security-bugs`
3+
:Original: :doc:`../../../process/security-bugs`
44

55
:译者:
66

Documentation/translations/zh_CN/process/howto.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ Linux内核代码中包含有大量的文档。这些文档对于学习如何与
125125
这篇文档对于理解Linux的开发哲学至关重要。对于将开发平台从其他操作系
126126
统转移到Linux的人来说也很重要。
127127

128-
:ref:`Documentation/admin-guide/security-bugs.rst <securitybugs>`
128+
:ref:`Documentation/process/security-bugs.rst <securitybugs>`
129129
如果你认为自己发现了Linux内核的安全性问题,请根据这篇文档中的步骤来
130130
提醒其他内核开发者并帮助解决这个问题。
131131

Documentation/translations/zh_TW/admin-guide/security-bugs.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
33
.. include:: ../disclaimer-zh_TW.rst
44

5-
:Original: :doc:`../../../admin-guide/security-bugs`
5+
:Original: :doc:`../../../process/security-bugs`
66

77
:譯者:
88

Documentation/translations/zh_TW/process/howto.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ Linux內核代碼中包含有大量的文檔。這些文檔對於學習如何與
128128
這篇文檔對於理解Linux的開發哲學至關重要。對於將開發平台從其他操作系
129129
統轉移到Linux的人來說也很重要。
130130

131-
:ref:`Documentation/admin-guide/security-bugs.rst <securitybugs>`
131+
:ref:`Documentation/process/security-bugs.rst <securitybugs>`
132132
如果你認爲自己發現了Linux內核的安全性問題,請根據這篇文檔中的步驟來
133133
提醒其他內核開發者並幫助解決這個問題。
134134

MAINTAINERS

+2-2
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ Tips for patch submitters
7373
and ideally, should come with a patch proposal. Please do not send
7474
automated reports to this list either. Such bugs will be handled
7575
better and faster in the usual public places. See
76-
Documentation/admin-guide/security-bugs.rst for details.
76+
Documentation/process/security-bugs.rst for details.
7777

7878
8. Happy hacking.
7979

@@ -18799,7 +18799,7 @@ F: include/uapi/linux/sed*
1879918799
SECURITY CONTACT
1880018800
M: Security Officers <[email protected]>
1880118801
S: Supported
18802-
F: Documentation/admin-guide/security-bugs.rst
18802+
F: Documentation/process/security-bugs.rst
1880318803

1880418804
SECURITY SUBSYSTEM
1880518805
M: Paul Moore <[email protected]>

drivers/base/cacheinfo.c

+11-5
Original file line numberDiff line numberDiff line change
@@ -474,12 +474,18 @@ int detect_cache_attributes(unsigned int cpu)
474474

475475
populate_leaves:
476476
/*
477-
* populate_cache_leaves() may completely setup the cache leaves and
478-
* shared_cpu_map or it may leave it partially setup.
477+
* If LLC is valid the cache leaves were already populated so just go to
478+
* update the cpu map.
479479
*/
480-
ret = populate_cache_leaves(cpu);
481-
if (ret)
482-
goto free_ci;
480+
if (!last_level_cache_is_valid(cpu)) {
481+
/*
482+
* populate_cache_leaves() may completely setup the cache leaves and
483+
* shared_cpu_map or it may leave it partially setup.
484+
*/
485+
ret = populate_cache_leaves(cpu);
486+
if (ret)
487+
goto free_ci;
488+
}
483489

484490
/*
485491
* For systems using DT for cache hierarchy, fw_token

drivers/mtd/spi-nor/core.c

+13-1
Original file line numberDiff line numberDiff line change
@@ -3343,7 +3343,19 @@ static struct spi_mem_driver spi_nor_driver = {
33433343
.remove = spi_nor_remove,
33443344
.shutdown = spi_nor_shutdown,
33453345
};
3346-
module_spi_mem_driver(spi_nor_driver);
3346+
3347+
static int __init spi_nor_module_init(void)
3348+
{
3349+
return spi_mem_driver_register(&spi_nor_driver);
3350+
}
3351+
module_init(spi_nor_module_init);
3352+
3353+
static void __exit spi_nor_module_exit(void)
3354+
{
3355+
spi_mem_driver_unregister(&spi_nor_driver);
3356+
spi_nor_debugfs_shutdown();
3357+
}
3358+
module_exit(spi_nor_module_exit);
33473359

33483360
MODULE_LICENSE("GPL v2");
33493361
MODULE_AUTHOR("Huang Shijie <[email protected]>");

drivers/mtd/spi-nor/core.h

+2
Original file line numberDiff line numberDiff line change
@@ -711,8 +711,10 @@ static inline struct spi_nor *mtd_to_spi_nor(struct mtd_info *mtd)
711711

712712
#ifdef CONFIG_DEBUG_FS
713713
void spi_nor_debugfs_register(struct spi_nor *nor);
714+
void spi_nor_debugfs_shutdown(void);
714715
#else
715716
static inline void spi_nor_debugfs_register(struct spi_nor *nor) {}
717+
static inline void spi_nor_debugfs_shutdown(void) {}
716718
#endif
717719

718720
#endif /* __LINUX_MTD_SPI_NOR_INTERNAL_H */

drivers/mtd/spi-nor/debugfs.c

+8-3
Original file line numberDiff line numberDiff line change
@@ -226,13 +226,13 @@ static void spi_nor_debugfs_unregister(void *data)
226226
nor->debugfs_root = NULL;
227227
}
228228

229+
static struct dentry *rootdir;
230+
229231
void spi_nor_debugfs_register(struct spi_nor *nor)
230232
{
231-
struct dentry *rootdir, *d;
233+
struct dentry *d;
232234
int ret;
233235

234-
/* Create rootdir once. Will never be deleted again. */
235-
rootdir = debugfs_lookup(SPI_NOR_DEBUGFS_ROOT, NULL);
236236
if (!rootdir)
237237
rootdir = debugfs_create_dir(SPI_NOR_DEBUGFS_ROOT, NULL);
238238

@@ -247,3 +247,8 @@ void spi_nor_debugfs_register(struct spi_nor *nor)
247247
debugfs_create_file("capabilities", 0444, d, nor,
248248
&spi_nor_capabilities_fops);
249249
}
250+
251+
void spi_nor_debugfs_shutdown(void)
252+
{
253+
debugfs_remove(rootdir);
254+
}

0 commit comments

Comments
 (0)