- 22 Aug, 2023 2 commits
-
-
Andy Shevchenko authored
It's logically correct to call the removal notifiers in the reversed order as it might be dependent to each other. Luckily, platform_notify_remove() currently is not used and the others have no dependency use, but theoretically it's still possible. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://lore.kernel.org/r/20230818133654.767986-1-andriy.shevchenko@linux.intel.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Andy Shevchenko authored
Whe device_add() tries to assign a device name with help of dev_set_name() the error path explicitly uses -EINVAL, while the function may return something different. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://lore.kernel.org/r/20230817091221.463721-1-andriy.shevchenko@linux.intel.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
- 19 Aug, 2023 2 commits
-
-
Zhen Lei authored
When adding koject or kset, we have made sure that ktype cannot be NULL. Therefore, after adding koject or kset, there is no need to worry about ktype being NULL. Clear all ktype-related redundancy checks. Signed-off-by: Zhen Lei <thunder.leizhen@huawei.com> Link: https://lore.kernel.org/r/20230805084114.1298-3-thunder.leizhen@huaweicloud.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Zhen Lei authored
When I register a kset in the following way: static struct kset my_kset; kobject_set_name(&my_kset.kobj, "my_kset"); ret = kset_register(&my_kset); A null pointer dereference exception is occurred: [ 4453.568337] Unable to handle kernel NULL pointer dereference at \ virtual address 0000000000000028 ... ... [ 4453.810361] Call trace: [ 4453.813062] kobject_get_ownership+0xc/0x34 [ 4453.817493] kobject_add_internal+0x98/0x274 [ 4453.822005] kset_register+0x5c/0xb4 [ 4453.825820] my_kobj_init+0x44/0x1000 [my_kset] ... ... Because I didn't initialize my_kset.kobj.ktype. According to the description in Documentation/core-api/kobject.rst: - A ktype is the type of object that embeds a kobject. Every structure that embeds a kobject needs a corresponding ktype. So add sanity check to make sure kset->kobj.ktype is not NULL. Signed-off-by: Zhen Lei <thunder.leizhen@huawei.com> Link: https://lore.kernel.org/r/20230805084114.1298-2-thunder.leizhen@huaweicloud.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
- 16 Aug, 2023 2 commits
-
-
Maxime Ripard authored
Commit 06188bc8 ("drivers: base: Add basic devm tests for root devices") introduced a new set of tests for root devices that could be compiled as a module, but didn't have the usual module macros. Make sure they're there. Fixes: 06188bc8 ("drivers: base: Add basic devm tests for root devices") Reported-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Maxime Ripard <mripard@kernel.org> Link: https://lore.kernel.org/r/20230816073019.1446155-2-mripard@kernel.orgSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Maxime Ripard authored
Commit b4cc4430 ("drivers: base: Add basic devm tests for platform devices") introduced a new set of tests for platform devices that could be compiled as a module, but didn't have the usual module macros. Make sure they're there. Fixes: b4cc4430 ("drivers: base: Add basic devm tests for platform devices") Reported-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Maxime Ripard <mripard@kernel.org> Link: https://lore.kernel.org/r/20230816073019.1446155-1-mripard@kernel.orgSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
- 12 Aug, 2023 10 commits
-
-
David Gow authored
In the current code, devres_release_all() only gets called if the device has a bus and has been probed. This leads to issues when using bus-less or driver-less devices where the device might never get freed if a managed resource holds a reference to the device. This is happening in the DRM framework for example. We should thus call devres_release_all() in the device_del() function to make sure that the device-managed actions are properly executed when the device is unregistered, even if it has neither a bus nor a driver. This is effectively the same change than commit 2f8d16a9 ("devres: release resources on device_del()") that got reverted by commit a525a3dd ("driver core: free devres in device_release") over memory leaks concerns. This patch effectively combines the two commits mentioned above to release the resources both on device_del() and device_release() and get the best of both worlds. Fixes: a525a3dd ("driver core: free devres in device_release") Signed-off-by: David Gow <davidgow@google.com> Signed-off-by: Maxime Ripard <mripard@kernel.org> Link: https://lore.kernel.org/r/20230720-kunit-devm-inconsistencies-test-v3-3-6aa7e074f373@kernel.orgSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Maxime Ripard authored
Platform devices show some inconsistencies with how devm resources are released when the device has been probed and when it hasn't. In particular, we can register device-managed actions no matter if the device has be bound to a driver or not, but devres_release_all() will only be called if it was bound to a driver or if there's no reference held to it anymore. If it wasn't bound to a driver and we still have a reference, devres_release_all() will never get called. This is surprising considering that if the driver isn't bound but doesn't have any reference to it anymore, that function will get called, and if it was bound to a driver but still has references, that function will get called as well. Even if that case is fairly unusual, it can easily lead to memory leaks. The plan is, with the next patch, to make it consistent and enforce that devres_release_all() is called no matter what situation we're in. For now, it just tests for the current behaviour and skips over the inconsistencies. Reviewed-by: David Gow <davidgow@google.com> Signed-off-by: Maxime Ripard <mripard@kernel.org> Link: https://lore.kernel.org/r/20230720-kunit-devm-inconsistencies-test-v3-2-6aa7e074f373@kernel.orgSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Maxime Ripard authored
The root devices show some odd behaviours compared to regular "bus" devices that have been probed through the usual mechanism, so let's create kunit tests to exercise those paths and odd cases. It's not clear whether root devices are even allowed to use device managed resources, but the fact that it works in some cases but not others like shown in that test suite shouldn't happen either way: we want to make it consistent and documented. These tests will (after the following patches) ensure that consistency and effectively document that it's allowed. If it ever turns out to be a bad idea, we can always roll back and modify the tests then. Reviewed-by: David Gow <davidgow@google.com> Signed-off-by: Maxime Ripard <mripard@kernel.org> Link: https://lore.kernel.org/r/20230720-kunit-devm-inconsistencies-test-v3-1-6aa7e074f373@kernel.orgSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Ian Kent authored
When the kernfs_iattr_rwsem was introduced a case was missed. The update of the kernfs directory node child count was also protected by the kernfs_rwsem and needs to be included in the change so that the child count (and so the inode n_link attribute) does not change while holding the rwsem for read. Fixes: 9caf6961 ("kernfs: Introduce separate rwsem to protect inode attributes.") Cc: stable <stable@kernel.org> Signed-off-by: Ian Kent <raven@themaw.net> Reviewed-By: Imran Khan <imran.f.khan@oracle.com> Acked-by: Miklos Szeredi <mszeredi@redhat.com> Cc: Anders Roxell <anders.roxell@linaro.org> Cc: Arnd Bergmann <arnd@arndb.de> Cc: Minchan Kim <minchan@kernel.org> Cc: Eric Sandeen <sandeen@sandeen.net> Link: https://lore.kernel.org/r/169128520941.68052.15749253469930138901.stgit@donald.themaw.netSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Thorsten Leemhuis authored
Document that changes intended for a specific stable series have to be in all newer series still maintained, as otherwise users would run into regressions. CC: Greg KH <gregkh@linuxfoundation.org> CC: Sasha Levin <sashal@kernel.org> CC: Jonathan Corbet <corbet@lwn.net> Signed-off-by: Thorsten Leemhuis <linux@leemhuis.info> Link: https://lore.kernel.org/r/ddb5cb0d6b7aa4ef31642cd9657a0fb53d79cddb.1691219455.git.linux@leemhuis.infoSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Thorsten Leemhuis authored
* various fine tuning to the text that cleans up rough edges the three previous preparatory patches left behind to keep the diffs simpler * s/Linus' tree/mainline/g, as that's the term more commonly used and known * create a short intro for the three submission options and streamline the explanation when to use which of them * fix a >= vs <= thinko in an example to make it more straight forward * there were two blank lines before some sub-headings and just one before others; use the former style everywhere CC: Greg KH <gregkh@linuxfoundation.org> CC: Sasha Levin <sashal@kernel.org> CC: Jonathan Corbet <corbet@lwn.net> Signed-off-by: Thorsten Leemhuis <linux@leemhuis.info> Link: https://lore.kernel.org/r/e1960a70acae2c2f18b838aee9f8bf6055fae89b.1691219455.git.linux@leemhuis.infoSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Thorsten Leemhuis authored
Separate the description for option 1 and the examples how to use it by making the latter an indented unordered list. No text changes. CC: Greg KH <gregkh@linuxfoundation.org> CC: Sasha Levin <sashal@kernel.org> CC: Jonathan Corbet <corbet@lwn.net> Signed-off-by: Thorsten Leemhuis <linux@leemhuis.info> Link: https://lore.kernel.org/r/59deaabfabf0629d7cf2a52b196cec19d1f9ec47.1691219455.git.linux@leemhuis.infoSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Thorsten Leemhuis authored
Move the short description about when to use which of the submission options to the top of the section, as it currently sits somewhat odd in the middle between option 3 and examples of option 1. Also move the examples of Option 1 into the section describing it (which in the diff looks like option 2 and 3 are moving down). No text changes, just moving it around. CC: Greg KH <gregkh@linuxfoundation.org> CC: Sasha Levin <sashal@kernel.org> CC: Jonathan Corbet <corbet@lwn.net> Signed-off-by: Thorsten Leemhuis <linux@leemhuis.info> Link: https://lore.kernel.org/r/16f2377ee40dd7dfa146727fcbe7d1ebccf5b5be.1691219455.git.linux@leemhuis.infoSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Thorsten Leemhuis authored
* replace a needless sub-heading with a short intro sentence * make "Following the submission" a proper sub-section with a headline without changing the text of the section CC: Greg KH <gregkh@linuxfoundation.org> CC: Sasha Levin <sashal@kernel.org> CC: Jonathan Corbet <corbet@lwn.net> Signed-off-by: Thorsten Leemhuis <linux@leemhuis.info> Link: https://lore.kernel.org/r/0737676f951050b2ec39e1662ffea37d77ef0bec.1691219455.git.linux@leemhuis.infoSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
GUO Zihua authored
Remove duplicated include of linux/hugetlb.h. Resolves checkincludes message. Signed-off-by: GUO Zihua <guozihua@huawei.com> Link: https://lore.kernel.org/r/20230810120008.25297-1-guozihua@huawei.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
- 05 Aug, 2023 16 commits
-
-
Ivan Babrou authored
The following two commits added the same thing for tmpfs: * commit 2b4db796 ("tmpfs: generate random sb->s_uuid") * commit 59cda49e ("shmem: allow reporting fanotify events with file handles on tmpfs") Having fsid allows using fanotify, which is especially handy for cgroups, where one might be interested in knowing when they are created or removed. Signed-off-by: Ivan Babrou <ivan@cloudflare.com> Acked-by: Jan Kara <jack@suse.cz> Acked-by: Christian Brauner <brauner@kernel.org> Link: https://lore.kernel.org/r/20230731184731.64568-1-ivan@cloudflare.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Arnd Bergmann authored
In some randconfig builds, kernfs ends up being disabled, so there is no prototype for kernfs_generic_poll() In file included from kernel/sched/build_utility.c:97: kernel/sched/psi.c:1479:3: error: implicit declaration of function 'kernfs_generic_poll' is invalid in C99 [-Werror,-Wimplicit-function-declaration] kernfs_generic_poll(t->of, wait); ^ Add a stub helper for it, as we have it for other kernfs functions. Fixes: aff03707 ("sched/psi: use kernfs polling functions for PSI trigger polling") Fixes: 147e1a97 ("fs: kernfs: add poll file operation") Signed-off-by: Arnd Bergmann <arnd@arndb.de> Reviewed-by: Chengming Zhou <zhouchengming@bytedance.com> Link: https://lore.kernel.org/r/20230724121823.1357562-1-arnd@kernel.orgSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Ivan Orlov authored
Now that the driver core allows for struct class to be in read-only memory, move the pseudo_lock_class structure to be declared at build time placing it into read-only memory, instead of having to be dynamically allocated at boot time. Cc: Fenghua Yu <fenghua.yu@intel.com> Cc: Reinette Chatre <reinette.chatre@intel.com> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Ingo Molnar <mingo@redhat.com> Cc: Borislav Petkov <bp@alien8.de> Cc: Dave Hansen <dave.hansen@linux.intel.com> Cc: x86@kernel.org Cc: "H. Peter Anvin" <hpa@zytor.com> Suggested-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Ivan Orlov <ivan.orlov0322@gmail.com> Acked-by: Reinette Chatre <reinette.chatre@intel.com> Link: https://lore.kernel.org/r/20230620144431.583290-6-gregkh@linuxfoundation.orgSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Ivan Orlov authored
Now that the driver core allows for struct class to be in read-only memory, move the msr_class structure to be declared at build time placing it into read-only memory, instead of having to be dynamically allocated at boot time. Cc: "H. Peter Anvin" <hpa@zytor.com> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Ingo Molnar <mingo@redhat.com> Cc: Borislav Petkov <bp@alien8.de> Cc: Dave Hansen <dave.hansen@linux.intel.com> Cc: x86@kernel.org Suggested-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Ivan Orlov <ivan.orlov0322@gmail.com> Link: https://lore.kernel.org/r/20230620144431.583290-5-gregkh@linuxfoundation.orgSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Ivan Orlov authored
Now that the driver core allows for struct class to be in read-only memory, move the cpuid_class structure to be declared at build time placing it into read-only memory, instead of having to be dynamically allocated at boot time. Cc: "H. Peter Anvin" <hpa@zytor.com> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Ingo Molnar <mingo@redhat.com> Cc: Borislav Petkov <bp@alien8.de> Cc: Dave Hansen <dave.hansen@linux.intel.com> Cc: x86@kernel.org Suggested-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Ivan Orlov <ivan.orlov0322@gmail.com> Link: https://lore.kernel.org/r/20230620144431.583290-4-gregkh@linuxfoundation.orgSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Greg Kroah-Hartman authored
Now that the driver core allows for struct class to be in read-only memory, making all 'class' structures to be declared at build time placing them into read-only memory, instead of having to be dynamically allocated at load time. Cc: Jiri Kosina <jikos@kernel.org> Cc: Benjamin Tissoires <benjamin.tissoires@redhat.com> Cc: linux-input@vger.kernel.org Cc: Ivan Orlov <ivan.orlov0322@gmail.com> Link: https://lore.kernel.org/r/20230620183141.681353-4-gregkh@linuxfoundation.orgSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Ivan Orlov authored
Now that the driver core allows for struct class to be in read-only memory, making all 'class' structures to be declared at build time placing them into read-only memory, instead of having to be dynamically allocated at load time. Cc: Stefan Achatz <erazor_de@users.sourceforge.net> Cc: Jiri Kosina <jikos@kernel.org> Cc: Benjamin Tissoires <benjamin.tissoires@redhat.com> Cc: linux-input@vger.kernel.org Suggested-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Ivan Orlov <ivan.orlov0322@gmail.com> Link: https://lore.kernel.org/r/20230620183141.681353-3-gregkh@linuxfoundation.orgSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Waiman Long authored
Booting the kernel with "maxcpus=1" is a common technique for CPU partitioning and isolation. It delays the CPU bringup process until when the bootup scripts are ready to bring CPUs online by writing 1 to /sys/device/system/cpu/cpu<X>/online. However, it was found that not all the CPUs were online after bootup. The collection of offline CPUs are different after every reboot. Further investigation reveals that some "online" write operations fail with an -EBUSY error. This error is returned when CPU hotplug is temporiarly disabled when cpu_hotplug_disable() is called. During bootup, the main caller of cpu_hotplug_disable() is pci_call_probe() for PCI device initialization. By measuring the times spent with cpu_hotplug_disabled set in a typical 2-socket server, most of them last less than 10ms. However, there are a few that can last hundreds of ms. Note that the cpu_hotplug_disabled period of different devices can overlap leading to longer cpu_hotplug_disabled hold time. Since the CPU hotplug disable condition is transient and it is not that easy to modify all the existing bootup scripts to handle this condition, the kernel can help by retrying the online operation when an -EBUSY error is returned. This patch retries the online operation in cpu_subsys_online() when an -EBUSY error is returned for up to 5 times after an exponentially increasing delay that can last a total of at least 620ms of waiting time by calling msleep(). With this patch in place, booting up the patched kernel with "maxcpus=1" does not leave any CPU in an offline state in 10 reboot attempts. Reported-by: Vishal Agrawal <vagrawal@redhat.com> Signed-off-by: Waiman Long <longman@redhat.com> Link: https://lore.kernel.org/r/20230724143826.3996163-1-longman@redhat.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Thorsten Leemhuis authored
Tweak some of the rule text to make things more straight forward, with the goal to stick closely to the intend of the old text: * put the "it or equivalent fix must be upstream" rule at the top, as it's one of the most important ones that at the same time often seems to be missed by developers. * "It must fix only one thing" was dropped, as that is almost always a thing that needs to be handled earlier when the change is mainlined. Furthermore, this is already indirectly covered by the "Separate your changes" section in Documentation/process/submitting-patches.rst which the rules already point to. * six other rules are in the end one rule with clarifications; structure the text accordingly to make it a lot easier to follow and understand the intend. * drop the 'In short, something critical' from one of those notes: it contradicts the "real bug that bothers people" aspect somewhat and does not really add anything CC: Greg KH <gregkh@linuxfoundation.org> CC: Sasha Levin <sashal@kernel.org> CC: Jonathan Corbet <corbet@lwn.net> Signed-off-by: Thorsten Leemhuis <linux@leemhuis.info> Link: https://lore.kernel.org/r/f83e812879caa978a51a1a7cae7c359f29fc093c.1689056247.git.linux@leemhuis.infoSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Thorsten Leemhuis authored
Document how to delay backporting or send a note to the stable team using shell-style inline comments attached to stable tags. CC: Greg KH <gregkh@linuxfoundation.org> CC: Sasha Levin <sashal@kernel.org> CC: Jonathan Corbet <corbet@lwn.net> Signed-off-by: Thorsten Leemhuis <linux@leemhuis.info> Link: https://lore.kernel.org/r/bf1489b40ff358b7cb4f7d8cc73d5c7c3c143471.1689056247.git.linux@leemhuis.infoSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Ivan Orlov authored
Now that the driver core allows for struct class to be in read-only memory, making all 'class' structures to be declared at build time placing them into read-only memory, instead of having to be dynamically allocated at load time. Cc: Peter Huewe <peterhuewe@gmx.de> Cc: Jason Gunthorpe <jgg@ziepe.ca> Cc: linux-integrity@vger.kernel.org Suggested-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Ivan Orlov <ivan.orlov0322@gmail.com> Acked-by: Jarkko Sakkinen <jarkko@kernel.org> Link: https://lore.kernel.org/r/20230620144642.584926-2-gregkh@linuxfoundation.orgSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Zhen Lei authored
There are too many "(type > KOBJ_NS_TYPE_NONE) && (type < KOBJ_NS_TYPES)" and "(type <= KOBJ_NS_TYPE_NONE) || (type >= KOBJ_NS_TYPES)", add helper kobj_ns_type_is_valid() to eliminate duplicate code and improve readability. Signed-off-by: Zhen Lei <thunder.leizhen@huawei.com> Link: https://lore.kernel.org/r/20230726062508.950-1-thunder.leizhen@huaweicloud.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Jason Gunthorpe authored
When test_remove is enabled really_probe() does not properly pair dma_configure() with dma_remove(), it will end up calling dma_configure() twice. This corrupts the owner_cnt and renders the group unusable with VFIO/etc. Add the missing cleanup before going back to re_probe. Fixes: 25f3bcfc ("driver core: Add dma_cleanup callback in bus_type") Reported-by: Zenghui Yu <yuzenghui@huawei.com> Tested-by: Zenghui Yu <yuzenghui@huawei.com> Closes: https://lore.kernel.org/all/6472f254-c3c4-8610-4a37-8d9dfdd54ce8@huawei.com/Signed-off-by: Jason Gunthorpe <jgg@nvidia.com> Reviewed-by: Kevin Tian <kevin.tian@intel.com> Link: https://lore.kernel.org/r/0-v2-4deed94e283e+40948-really_probe_dma_cleanup_jgg@nvidia.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Dan Carpenter authored
The test_platform_device_register_node() function should return error pointers instead of NULL. That is what the callers are expecting. Fixes: 57ea974f ("driver core: Rewrite test_async_driver_probe to cover serialization and NUMA affinity") Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org> Link: https://lore.kernel.org/r/1e11ed19-e1f6-43d8-b352-474134b7c008@moroto.mountainSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Andy Shevchenko authored
dev_err_probe() belongs to the printing API, hence move the definition from device.h to dev_printk.h. There is no change to the callers at all, since: 1) implementation is located in the same core.c; 2) dev_printk.h is guaranteed to be included by device.h. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Andi Shyti <andi.shyti@kernel.org> Link: https://lore.kernel.org/r/20230721131309.16821-1-andriy.shevchenko@linux.intel.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Christophe JAILLET authored
Group some variables based on their sizes to reduce hole and avoid padding. On x86_64, this shrinks the size of 'struct kobject' from 256 to 244 bytes. This structure is often included in some other structures. So these other structures will also benefit from this 8 bytes saving. This is especially nice for structure like 'cma_kobject' or 'class_dir' that are now 256 bytes long. When they are kzalloc()'ed, 256 bytes are allocated, instead of 512. Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr> Link: https://lore.kernel.org/r/6c7d1e3005dbec5483bdb9b7b60071175bf7bf70.1688811201.git.christophe.jaillet@wanadoo.frSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
- 30 Jul, 2023 8 commits
-
-
Linus Torvalds authored
-
git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spiLinus Torvalds authored
Pull spi fixes from Mark Brown: "A bunch of fixes for the Qualcomm QSPI driver, fixing multiple issues with the newly added DMA mode - it had a number of issues exposed when tested in a wider range of use cases, both race condition style issues and issues with different inputs to those that had been used in test" * tag 'spi-fix-v6.5-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi: spi: spi-qcom-qspi: Add mem_ops to avoid PIO for badly sized reads spi: spi-qcom-qspi: Fallback to PIO for xfers that aren't multiples of 4 bytes spi: spi-qcom-qspi: Add DMA_CHAIN_DONE to ALL_IRQS spi: spi-qcom-qspi: Call dma_wmb() after setting up descriptors spi: spi-qcom-qspi: Use GFP_ATOMIC flag while allocating for descriptor spi: spi-qcom-qspi: Ignore disabled interrupts' status in isr
-
Linus Torvalds authored
Merge tag 'regulator-fix-v6.5-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator Pull regulator fixes from Mark Brown: "A couple of small fixes for the the mt6358 driver, fixing error reporting and a bootstrapping issue" * tag 'regulator-fix-v6.5-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator: regulator: mt6358: Fix incorrect VCN33 sync error message regulator: mt6358: Sync VCN33_* enable status after checking ID
-
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usbLinus Torvalds authored
Pull USB fixes from Greg KH: "Here are a set of USB driver fixes for 6.5-rc4. Include in here are: - new USB serial device ids - dwc3 driver fixes for reported issues - typec driver fixes for reported problems - gadget driver fixes - reverts of some problematic USB changes that went into -rc1 All of these have been in linux-next with no reported problems" * tag 'usb-6.5-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: (24 commits) usb: misc: ehset: fix wrong if condition usb: dwc3: pci: skip BYT GPIO lookup table for hardwired phy usb: cdns3: fix incorrect calculation of ep_buf_size when more than one config usb: gadget: call usb_gadget_check_config() to verify UDC capability usb: typec: Use sysfs_emit_at when concatenating the string usb: typec: Iterate pds array when showing the pd list usb: typec: Set port->pd before adding device for typec_port usb: typec: qcom: fix return value check in qcom_pmic_typec_probe() Revert "usb: gadget: tegra-xudc: Fix error check in tegra_xudc_powerdomain_init()" Revert "usb: xhci: tegra: Fix error check" USB: gadget: Fix the memory leak in raw_gadget driver usb: gadget: core: remove unbalanced mutex_unlock in usb_gadget_activate Revert "usb: dwc3: core: Enable AutoRetry feature in the controller" Revert "xhci: add quirk for host controllers that don't update endpoint DCS" USB: quirks: add quirk for Focusrite Scarlett usb: xhci-mtk: set the dma max_seg_size MAINTAINERS: drop invalid usb/cdns3 Reviewer e-mail usb: dwc3: don't reset device side if dwc3 was configured as host-only usb: typec: ucsi: move typec_set_mode(TYPEC_STATE_SAFE) to ucsi_unregister_partner() usb: ohci-at91: Fix the unhandle interrupt when resume ...
-
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/ttyLinus Torvalds authored
Pull tty/serial fixes from Greg KH: "Here are some small TTY and serial driver fixes for 6.5-rc4 for some reported problems. Included in here is: - TIOCSTI fix for braille readers - documentation fix for minor numbers - MAINTAINERS update for new serial files in -rc1 - minor serial driver fixes for reported problems All of these have been in linux-next with no reported problems" * tag 'tty-6.5-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty: serial: 8250_dw: Preserve original value of DLF register tty: serial: sh-sci: Fix sleeping in atomic context serial: sifive: Fix sifive_serial_console_setup() section Documentation: devices.txt: reconcile serial/ucc_uart minor numers MAINTAINERS: Update TTY layer for lists and recently added files tty: n_gsm: fix UAF in gsm_cleanup_mux TIOCSTI: always enable for CAP_SYS_ADMIN
-
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/stagingLinus Torvalds authored
Pull staging driver fixes from Greg KH: "Here are three small staging driver fixes for 6.5-rc4 that resolve some reported problems. These fixes are: - fix for an old bug in the r8712 driver - fbtft driver fix for a spi device - potential overflow fix in the ks7010 driver All of these have been in linux-next with no reported problems" * tag 'staging-6.5-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging: staging: ks7010: potential buffer overflow in ks_wlan_set_encode_ext() staging: fbtft: ili9341: use macro FBTFT_REGISTER_SPI_DRIVER staging: r8712: Fix memory leak in _r8712_init_xmit_priv()
-
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-miscLinus Torvalds authored
Pull char driver and Documentation fixes from Greg KH: "Here is a char driver fix and some documentation updates for 6.5-rc4 that contain the following changes: - sram/genalloc bugfix for reported problem - security-bugs.rst update based on recent discussions - embargoed-hardware-issues minor cleanups and then partial revert for the project/company lists All of these have been in linux-next for a while with no reported problems, and the documentation updates have all been reviewed by the relevant developers" * tag 'char-misc-6.5-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc: misc/genalloc: Name subpools by of_node_full_name() Documentation: embargoed-hardware-issues.rst: add AMD to the list Documentation: embargoed-hardware-issues.rst: clean out empty and unused entries Documentation: security-bugs.rst: clarify CVE handling Documentation: security-bugs.rst: update preferences when dealing with the linux-distros group
-
Linus Torvalds authored
Merge tag 'probes-fixes-v6.5-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace Pull probe fixes from Masami Hiramatsu: - probe-events: add NULL check for some BTF API calls which can return error code and NULL. - ftrace selftests: check fprobe and kprobe event correctly. This fixes a miss condition of the test command. - kprobes: do not allow probing functions that start with "__cfi_" or "__pfx_" since those are auto generated for kernel CFI and not executed. * tag 'probes-fixes-v6.5-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace: kprobes: Prohibit probing on CFI preamble symbol selftests/ftrace: Fix to check fprobe event eneblement tracing/probes: Fix to add NULL check for BTF APIs
-