WSL2-Linux-Kernel/drivers/acpi
Pablo Neira Ayuso ff491a7334 netlink: change return-value logic of netlink_broadcast()
Currently, netlink_broadcast() reports errors to the caller if no
messages at all were delivered:

1) If, at least, one message has been delivered correctly, returns 0.
2) Otherwise, if no messages at all were delivered due to skb_clone()
   failure, return -ENOBUFS.
3) Otherwise, if there are no listeners, return -ESRCH.

With this patch, the caller knows if the delivery of any of the
messages to the listeners have failed:

1) If it fails to deliver any message (for whatever reason), return
   -ENOBUFS.
2) Otherwise, if all messages were delivered OK, returns 0.
3) Otherwise, if no listeners, return -ESRCH.

In the current ctnetlink code and in Netfilter in general, we can add
reliable logging and connection tracking event delivery by dropping the
packets whose events were not successfully delivered over Netlink. Of
course, this option would be settable via /proc as this approach reduces
performance (in terms of filtered connections per seconds by a stateful
firewall) but providing reliable logging and event delivery (for
conntrackd) in return.

This patch also changes some clients of netlink_broadcast() that
may report ENOBUFS errors via printk. This error handling is not
of any help. Instead, the userspace daemons that are listening to
those netlink messages should resync themselves with the kernel-side
if they hit ENOBUFS.

BTW, netlink_broadcast() clients include those that call
cn_netlink_send(), nlmsg_multicast() and genlmsg_multicast() since they
internally call netlink_broadcast() and return its error value.

Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-02-05 23:56:36 -08:00
..
acpica Merge branch 'linus' into release 2009-01-09 03:39:43 -05:00
Kconfig ACPI: move wmi, asus_acpi, toshiba_acpi to drivers/platform/x86 2008-12-19 04:42:33 -05:00
Makefile ACPI: rename main.c to sleep.c 2009-01-16 14:32:19 -05:00
ac.c Merge branch 'sysfs' into release 2008-11-11 21:14:49 -05:00
acpi_memhotplug.c trivial: Fix misspelling of "firmware" in acpi_memhotplug.c 2009-01-06 11:28:08 +01:00
battery.c Newly inserted battery might differ from one just removed, so 2008-12-22 19:32:55 -05:00
blacklist.c ACPI: delete OSI(Linux) DMI dmesg spam 2008-11-27 01:55:21 -05:00
bus.c ACPI: fix 2.6.28 acpi.debug_level regression 2008-12-19 04:38:32 -05:00
button.c Merge branch 'ec' into release 2008-11-11 21:17:26 -05:00
cm_sbs.c ACPI: remove private acpica headers from driver files 2008-12-31 01:15:22 -05:00
container.c ACPI: consolidate ACPI_*_COMPONENT definitions in acpi_drivers.h 2008-11-07 21:44:37 -05:00
debug.c ACPI: remove private acpica headers from driver files 2008-12-31 01:15:22 -05:00
dock.c Merge branch 'ull' into test 2008-10-22 23:33:29 -04:00
ec.c ACPI: EC: Don't trust ECDT tables from ASUS 2009-01-16 14:03:32 -05:00
event.c netlink: change return-value logic of netlink_broadcast() 2009-02-05 23:56:36 -08:00
fan.c ACPI: consolidate ACPI_*_COMPONENT definitions in acpi_drivers.h 2008-11-07 21:44:37 -05:00
glue.c ACPI: video: Ignore devices that aren't present in hardware 2008-11-07 23:49:23 -05:00
numa.c ACPI: remove private acpica headers from driver files 2008-12-31 01:15:22 -05:00
osl.c ACPI: osl.c: replace return_ACPI_STATUS with return 2008-12-31 01:02:05 -05:00
pci_bind.c ACPI: simplify buffer management for acpi_pci_bind() etc. 2008-12-30 22:52:26 -05:00
pci_irq.c ACPI: PCI: add HP copyright 2008-12-30 21:50:01 -05:00
pci_link.c Merge branch 'misc' into release 2009-01-09 03:37:48 -05:00
pci_root.c ACPI/PCI: PCI MSI _OSC support capabilities called when root bridge added 2009-01-07 11:12:31 -08:00
pci_slot.c Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6 2008-10-23 10:20:36 -07:00
power.c ACPI: power.c: call acpi_get_name to get node name 2008-12-31 01:11:51 -05:00
proc.c Merge branch 'alarm' into release 2009-01-09 03:36:32 -05:00
processor_core.c cpumask: convert shared_cpu_map in acpi_processor* structs to cpumask_var_t 2009-01-03 19:15:40 +01:00
processor_idle.c remove linux/hardirq.h from asm-generic/local.h 2009-01-06 15:59:13 -08:00
processor_perflib.c cpumask: convert shared_cpu_map in acpi_processor* structs to cpumask_var_t 2009-01-03 19:15:40 +01:00
processor_thermal.c ACPI: consolidate ACPI_*_COMPONENT definitions in acpi_drivers.h 2008-11-07 21:44:37 -05:00
processor_throttling.c cpumask: convert shared_cpu_map in acpi_processor* structs to cpumask_var_t 2009-01-03 19:15:40 +01:00
reboot.c ACPI: reboot.c: use new acpi_reset interface 2008-12-31 01:15:00 -05:00
sbs.c Merge branch 'linus' into test 2008-10-23 00:11:07 -04:00
sbshc.c ACPI: remove private acpica headers from driver files 2008-12-31 01:15:22 -05:00
sbshc.h ACPI: SBS: Ignore alarms coming from unknown devices 2007-12-14 15:14:06 -05:00
scan.c ACPI: remove private acpica headers from driver files 2008-12-31 01:15:22 -05:00
sleep.c ACPI: rename main.c to sleep.c 2009-01-16 14:32:19 -05:00
sleep.h ACPICA: create acpica/ directory 2009-01-09 03:30:47 -05:00
system.c ACPICA: New: acpi_get_gpe_device interface 2008-12-31 01:10:24 -05:00
tables.c acpi: add checking for NULL early param 2008-08-21 08:45:39 +02:00
thermal.c thermal fixup for broken BIOS which has invalid trip points. 2009-01-16 14:13:12 -05:00
utils.c ACPI: scheduling in atomic via acpi_evaluate_integer () 2008-11-26 17:39:06 -05:00
video.c Merge branch 'misc' into release 2009-01-09 03:37:48 -05:00
video_detect.c ACPI: ec.c, pci_link.c, video_detec.c: static 2008-12-30 23:27:04 -05:00
wakeup.c ACPICA: create acpica/ directory 2009-01-09 03:30:47 -05:00