Contents of /trunk/kernel-alx-legacy/patches-4.9/0428-4.9.329-all-fixes.patch
Parent Directory | Revision Log
Revision 3730 -
(show annotations)
(download)
Mon Oct 24 14:08:40 2022 UTC (18 months, 1 week ago) by niro
File size: 6718 byte(s)
Mon Oct 24 14:08:40 2022 UTC (18 months, 1 week ago) by niro
File size: 6718 byte(s)
-linux-4.9.329
1 | diff --git a/Makefile b/Makefile |
2 | index c4a9f44d5de67..31cf32eb5fc9a 100644 |
3 | --- a/Makefile |
4 | +++ b/Makefile |
5 | @@ -1,6 +1,6 @@ |
6 | VERSION = 4 |
7 | PATCHLEVEL = 9 |
8 | -SUBLEVEL = 328 |
9 | +SUBLEVEL = 329 |
10 | EXTRAVERSION = |
11 | NAME = Roaring Lionus |
12 | |
13 | diff --git a/drivers/gpu/drm/msm/msm_rd.c b/drivers/gpu/drm/msm/msm_rd.c |
14 | index 4823019eb422b..a8a04d8c5ca62 100644 |
15 | --- a/drivers/gpu/drm/msm/msm_rd.c |
16 | +++ b/drivers/gpu/drm/msm/msm_rd.c |
17 | @@ -188,6 +188,9 @@ static int rd_open(struct inode *inode, struct file *file) |
18 | file->private_data = rd; |
19 | rd->open = true; |
20 | |
21 | + /* Reset fifo to clear any previously unread data: */ |
22 | + rd->fifo.head = rd->fifo.tail = 0; |
23 | + |
24 | /* the parsing tools need to know gpu-id to know which |
25 | * register database to load. |
26 | */ |
27 | diff --git a/drivers/hid/intel-ish-hid/ishtp-hid.h b/drivers/hid/intel-ish-hid/ishtp-hid.h |
28 | index f5c7eb79b7b53..fa16983007f60 100644 |
29 | --- a/drivers/hid/intel-ish-hid/ishtp-hid.h |
30 | +++ b/drivers/hid/intel-ish-hid/ishtp-hid.h |
31 | @@ -118,7 +118,7 @@ struct report_list { |
32 | * @multi_packet_cnt: Count of fragmented packet count |
33 | * |
34 | * This structure is used to store completion flags and per client data like |
35 | - * like report description, number of HID devices etc. |
36 | + * report description, number of HID devices etc. |
37 | */ |
38 | struct ishtp_cl_data { |
39 | /* completion flags */ |
40 | diff --git a/drivers/net/ethernet/broadcom/tg3.c b/drivers/net/ethernet/broadcom/tg3.c |
41 | index 2db6102ed5848..96424b7781d29 100644 |
42 | --- a/drivers/net/ethernet/broadcom/tg3.c |
43 | +++ b/drivers/net/ethernet/broadcom/tg3.c |
44 | @@ -18152,16 +18152,20 @@ static void tg3_shutdown(struct pci_dev *pdev) |
45 | struct net_device *dev = pci_get_drvdata(pdev); |
46 | struct tg3 *tp = netdev_priv(dev); |
47 | |
48 | + tg3_reset_task_cancel(tp); |
49 | + |
50 | rtnl_lock(); |
51 | + |
52 | netif_device_detach(dev); |
53 | |
54 | if (netif_running(dev)) |
55 | dev_close(dev); |
56 | |
57 | - if (system_state == SYSTEM_POWER_OFF) |
58 | - tg3_power_down(tp); |
59 | + tg3_power_down(tp); |
60 | |
61 | rtnl_unlock(); |
62 | + |
63 | + pci_disable_device(pdev); |
64 | } |
65 | |
66 | /** |
67 | diff --git a/drivers/net/ieee802154/cc2520.c b/drivers/net/ieee802154/cc2520.c |
68 | index d50add705a79a..436cf2007138a 100644 |
69 | --- a/drivers/net/ieee802154/cc2520.c |
70 | +++ b/drivers/net/ieee802154/cc2520.c |
71 | @@ -512,6 +512,7 @@ cc2520_tx(struct ieee802154_hw *hw, struct sk_buff *skb) |
72 | goto err_tx; |
73 | |
74 | if (status & CC2520_STATUS_TX_UNDERFLOW) { |
75 | + rc = -EINVAL; |
76 | dev_err(&priv->spi->dev, "cc2520 tx underflow exception\n"); |
77 | goto err_tx; |
78 | } |
79 | diff --git a/drivers/platform/x86/acer-wmi.c b/drivers/platform/x86/acer-wmi.c |
80 | index ec3cbb7844bce..c10b97c91f3cc 100644 |
81 | --- a/drivers/platform/x86/acer-wmi.c |
82 | +++ b/drivers/platform/x86/acer-wmi.c |
83 | @@ -105,6 +105,7 @@ static const struct key_entry acer_wmi_keymap[] __initconst = { |
84 | {KE_KEY, 0x22, {KEY_PROG2} }, /* Arcade */ |
85 | {KE_KEY, 0x23, {KEY_PROG3} }, /* P_Key */ |
86 | {KE_KEY, 0x24, {KEY_PROG4} }, /* Social networking_Key */ |
87 | + {KE_KEY, 0x27, {KEY_HELP} }, |
88 | {KE_KEY, 0x29, {KEY_PROG3} }, /* P_Key for TM8372 */ |
89 | {KE_IGNORE, 0x41, {KEY_MUTE} }, |
90 | {KE_IGNORE, 0x42, {KEY_PREVIOUSSONG} }, |
91 | @@ -118,7 +119,13 @@ static const struct key_entry acer_wmi_keymap[] __initconst = { |
92 | {KE_IGNORE, 0x48, {KEY_VOLUMEUP} }, |
93 | {KE_IGNORE, 0x49, {KEY_VOLUMEDOWN} }, |
94 | {KE_IGNORE, 0x4a, {KEY_VOLUMEDOWN} }, |
95 | - {KE_IGNORE, 0x61, {KEY_SWITCHVIDEOMODE} }, |
96 | + /* |
97 | + * 0x61 is KEY_SWITCHVIDEOMODE. Usually this is a duplicate input event |
98 | + * with the "Video Bus" input device events. But sometimes it is not |
99 | + * a dup. Map it to KEY_UNKNOWN instead of using KE_IGNORE so that |
100 | + * udev/hwdb can override it on systems where it is not a dup. |
101 | + */ |
102 | + {KE_KEY, 0x61, {KEY_UNKNOWN} }, |
103 | {KE_IGNORE, 0x62, {KEY_BRIGHTNESSUP} }, |
104 | {KE_IGNORE, 0x63, {KEY_BRIGHTNESSDOWN} }, |
105 | {KE_KEY, 0x64, {KEY_SWITCHVIDEOMODE} }, /* Display Switch */ |
106 | diff --git a/fs/tracefs/inode.c b/fs/tracefs/inode.c |
107 | index b56d1cfe429e9..dd1ad084d2425 100644 |
108 | --- a/fs/tracefs/inode.c |
109 | +++ b/fs/tracefs/inode.c |
110 | @@ -142,6 +142,8 @@ struct tracefs_mount_opts { |
111 | kuid_t uid; |
112 | kgid_t gid; |
113 | umode_t mode; |
114 | + /* Opt_* bitfield. */ |
115 | + unsigned int opts; |
116 | }; |
117 | |
118 | enum { |
119 | @@ -242,6 +244,7 @@ static int tracefs_parse_options(char *data, struct tracefs_mount_opts *opts) |
120 | kgid_t gid; |
121 | char *p; |
122 | |
123 | + opts->opts = 0; |
124 | opts->mode = TRACEFS_DEFAULT_MODE; |
125 | |
126 | while ((p = strsep(&data, ",")) != NULL) { |
127 | @@ -276,24 +279,36 @@ static int tracefs_parse_options(char *data, struct tracefs_mount_opts *opts) |
128 | * but traditionally tracefs has ignored all mount options |
129 | */ |
130 | } |
131 | + |
132 | + opts->opts |= BIT(token); |
133 | } |
134 | |
135 | return 0; |
136 | } |
137 | |
138 | -static int tracefs_apply_options(struct super_block *sb) |
139 | +static int tracefs_apply_options(struct super_block *sb, bool remount) |
140 | { |
141 | struct tracefs_fs_info *fsi = sb->s_fs_info; |
142 | struct inode *inode = sb->s_root->d_inode; |
143 | struct tracefs_mount_opts *opts = &fsi->mount_opts; |
144 | |
145 | - inode->i_mode &= ~S_IALLUGO; |
146 | - inode->i_mode |= opts->mode; |
147 | + /* |
148 | + * On remount, only reset mode/uid/gid if they were provided as mount |
149 | + * options. |
150 | + */ |
151 | + |
152 | + if (!remount || opts->opts & BIT(Opt_mode)) { |
153 | + inode->i_mode &= ~S_IALLUGO; |
154 | + inode->i_mode |= opts->mode; |
155 | + } |
156 | |
157 | - inode->i_uid = opts->uid; |
158 | + if (!remount || opts->opts & BIT(Opt_uid)) |
159 | + inode->i_uid = opts->uid; |
160 | |
161 | - /* Set all the group ids to the mount option */ |
162 | - set_gid(sb->s_root, opts->gid); |
163 | + if (!remount || opts->opts & BIT(Opt_gid)) { |
164 | + /* Set all the group ids to the mount option */ |
165 | + set_gid(sb->s_root, opts->gid); |
166 | + } |
167 | |
168 | return 0; |
169 | } |
170 | @@ -308,7 +323,7 @@ static int tracefs_remount(struct super_block *sb, int *flags, char *data) |
171 | if (err) |
172 | goto fail; |
173 | |
174 | - tracefs_apply_options(sb); |
175 | + tracefs_apply_options(sb, true); |
176 | |
177 | fail: |
178 | return err; |
179 | @@ -362,7 +377,7 @@ static int trace_fill_super(struct super_block *sb, void *data, int silent) |
180 | |
181 | sb->s_op = &tracefs_super_operations; |
182 | |
183 | - tracefs_apply_options(sb); |
184 | + tracefs_apply_options(sb, false); |
185 | |
186 | return 0; |
187 | |
188 | diff --git a/mm/mmap.c b/mm/mmap.c |
189 | index a696c17ba9b0d..3e1e23d5e67a6 100644 |
190 | --- a/mm/mmap.c |
191 | +++ b/mm/mmap.c |
192 | @@ -2524,6 +2524,7 @@ static void unmap_region(struct mm_struct *mm, |
193 | { |
194 | struct vm_area_struct *next = prev ? prev->vm_next : mm->mmap; |
195 | struct mmu_gather tlb; |
196 | + struct vm_area_struct *cur_vma; |
197 | |
198 | lru_add_drain(); |
199 | tlb_gather_mmu(&tlb, mm, start, end); |
200 | @@ -2538,8 +2539,12 @@ static void unmap_region(struct mm_struct *mm, |
201 | * concurrent flush in this region has to be coming through the rmap, |
202 | * and we synchronize against that using the rmap lock. |
203 | */ |
204 | - if ((vma->vm_flags & (VM_PFNMAP|VM_MIXEDMAP)) != 0) |
205 | - tlb_flush_mmu(&tlb); |
206 | + for (cur_vma = vma; cur_vma; cur_vma = cur_vma->vm_next) { |
207 | + if ((cur_vma->vm_flags & (VM_PFNMAP|VM_MIXEDMAP)) != 0) { |
208 | + tlb_flush_mmu(&tlb); |
209 | + break; |
210 | + } |
211 | + } |
212 | |
213 | free_pgtables(&tlb, vma, prev ? prev->vm_end : FIRST_USER_ADDRESS, |
214 | next ? next->vm_start : USER_PGTABLES_CEILING); |