Commit 0342273
committed
firewire: core: reallocate buffer for FCP address handlers when more than 4 are registered
The former commit has a limitation that only up to 4 FCP address
handlers could be processed per request. Although it suffices for most
use cases, it is technically a regression.
This commit lifts the restriction by reallocating the buffer from kernel
heap when more than 4 handlers are registered. The allocation is performed
within RCU read-side critical section, thus it uses GCP_ATOMIC flag. The
buffer size is rounded up to the next power of two to align with kmalloc
allocation units.
Link: https://lore.kernel.org/r/20250803122015.236493-5-o-takashi@sakamocchi.jp
Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>1 parent e884a8a commit 0342273
1 file changed
+32
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
960 | 960 | | |
961 | 961 | | |
962 | 962 | | |
963 | | - | |
| 963 | + | |
964 | 964 | | |
965 | 965 | | |
966 | 966 | | |
| |||
983 | 983 | | |
984 | 984 | | |
985 | 985 | | |
| 986 | + | |
986 | 987 | | |
987 | 988 | | |
988 | 989 | | |
| 990 | + | |
| 991 | + | |
| 992 | + | |
| 993 | + | |
| 994 | + | |
| 995 | + | |
| 996 | + | |
| 997 | + | |
| 998 | + | |
| 999 | + | |
| 1000 | + | |
| 1001 | + | |
| 1002 | + | |
| 1003 | + | |
| 1004 | + | |
| 1005 | + | |
| 1006 | + | |
| 1007 | + | |
| 1008 | + | |
| 1009 | + | |
| 1010 | + | |
| 1011 | + | |
| 1012 | + | |
| 1013 | + | |
| 1014 | + | |
| 1015 | + | |
989 | 1016 | | |
990 | | - | |
991 | | - | |
992 | | - | |
| 1017 | + | |
993 | 1018 | | |
994 | 1019 | | |
995 | 1020 | | |
| |||
1002 | 1027 | | |
1003 | 1028 | | |
1004 | 1029 | | |
| 1030 | + | |
| 1031 | + | |
| 1032 | + | |
1005 | 1033 | | |
1006 | 1034 | | |
1007 | 1035 | | |
| |||
0 commit comments