Annotation of /trunk/kernel-alx-legacy/patches-4.9/0394-4.9.295-all-fixes.patch
Parent Directory | Revision Log
Revision 3696 -
(hide annotations)
(download)
Mon Oct 24 14:08:10 2022 UTC (19 months, 1 week ago) by niro
File size: 16364 byte(s)
Mon Oct 24 14:08:10 2022 UTC (19 months, 1 week ago) by niro
File size: 16364 byte(s)
-linux-4.9.295
1 | niro | 3696 | diff --git a/Documentation/networking/bonding.txt b/Documentation/networking/bonding.txt |
2 | index 57f52cdce32e4..07b53b2b13df8 100644 | ||
3 | --- a/Documentation/networking/bonding.txt | ||
4 | +++ b/Documentation/networking/bonding.txt | ||
5 | @@ -191,11 +191,12 @@ ad_actor_sys_prio | ||
6 | ad_actor_system | ||
7 | |||
8 | In an AD system, this specifies the mac-address for the actor in | ||
9 | - protocol packet exchanges (LACPDUs). The value cannot be NULL or | ||
10 | - multicast. It is preferred to have the local-admin bit set for this | ||
11 | - mac but driver does not enforce it. If the value is not given then | ||
12 | - system defaults to using the masters' mac address as actors' system | ||
13 | - address. | ||
14 | + protocol packet exchanges (LACPDUs). The value cannot be a multicast | ||
15 | + address. If the all-zeroes MAC is specified, bonding will internally | ||
16 | + use the MAC of the bond itself. It is preferred to have the | ||
17 | + local-admin bit set for this mac but driver does not enforce it. If | ||
18 | + the value is not given then system defaults to using the masters' | ||
19 | + mac address as actors' system address. | ||
20 | |||
21 | This parameter has effect only in 802.3ad mode and is available through | ||
22 | SysFs interface. | ||
23 | diff --git a/Makefile b/Makefile | ||
24 | index 6f3b4e1e9a144..b5afdb8a75219 100644 | ||
25 | --- a/Makefile | ||
26 | +++ b/Makefile | ||
27 | @@ -1,6 +1,6 @@ | ||
28 | VERSION = 4 | ||
29 | PATCHLEVEL = 9 | ||
30 | -SUBLEVEL = 294 | ||
31 | +SUBLEVEL = 295 | ||
32 | EXTRAVERSION = | ||
33 | NAME = Roaring Lionus | ||
34 | |||
35 | diff --git a/arch/arm/kernel/entry-armv.S b/arch/arm/kernel/entry-armv.S | ||
36 | index 9f157e7c51e75..2cac25a69a85d 100644 | ||
37 | --- a/arch/arm/kernel/entry-armv.S | ||
38 | +++ b/arch/arm/kernel/entry-armv.S | ||
39 | @@ -631,11 +631,9 @@ call_fpe: | ||
40 | tstne r0, #0x04000000 @ bit 26 set on both ARM and Thumb-2 | ||
41 | reteq lr | ||
42 | and r8, r0, #0x00000f00 @ mask out CP number | ||
43 | - THUMB( lsr r8, r8, #8 ) | ||
44 | mov r7, #1 | ||
45 | - add r6, r10, #TI_USED_CP | ||
46 | - ARM( strb r7, [r6, r8, lsr #8] ) @ set appropriate used_cp[] | ||
47 | - THUMB( strb r7, [r6, r8] ) @ set appropriate used_cp[] | ||
48 | + add r6, r10, r8, lsr #8 @ add used_cp[] array offset first | ||
49 | + strb r7, [r6, #TI_USED_CP] @ set appropriate used_cp[] | ||
50 | #ifdef CONFIG_IWMMXT | ||
51 | @ Test if we need to give access to iWMMXt coprocessors | ||
52 | ldr r5, [r10, #TI_FLAGS] | ||
53 | @@ -644,7 +642,7 @@ call_fpe: | ||
54 | bcs iwmmxt_task_enable | ||
55 | #endif | ||
56 | ARM( add pc, pc, r8, lsr #6 ) | ||
57 | - THUMB( lsl r8, r8, #2 ) | ||
58 | + THUMB( lsr r8, r8, #6 ) | ||
59 | THUMB( add pc, r8 ) | ||
60 | nop | ||
61 | |||
62 | diff --git a/arch/x86/include/asm/pgtable.h b/arch/x86/include/asm/pgtable.h | ||
63 | index e638e3bc3cb8a..6c40afcfe5b16 100644 | ||
64 | --- a/arch/x86/include/asm/pgtable.h | ||
65 | +++ b/arch/x86/include/asm/pgtable.h | ||
66 | @@ -1028,8 +1028,8 @@ static inline pte_t pte_swp_clear_soft_dirty(pte_t pte) | ||
67 | } | ||
68 | #endif | ||
69 | |||
70 | -#define PKRU_AD_BIT 0x1 | ||
71 | -#define PKRU_WD_BIT 0x2 | ||
72 | +#define PKRU_AD_BIT 0x1u | ||
73 | +#define PKRU_WD_BIT 0x2u | ||
74 | #define PKRU_BITS_PER_PKEY 2 | ||
75 | |||
76 | static inline bool __pkru_allows_read(u32 pkru, u16 pkey) | ||
77 | diff --git a/drivers/hid/hid-holtek-mouse.c b/drivers/hid/hid-holtek-mouse.c | ||
78 | index 27c08ddab0e1a..96db7e96fcea9 100644 | ||
79 | --- a/drivers/hid/hid-holtek-mouse.c | ||
80 | +++ b/drivers/hid/hid-holtek-mouse.c | ||
81 | @@ -68,8 +68,23 @@ static __u8 *holtek_mouse_report_fixup(struct hid_device *hdev, __u8 *rdesc, | ||
82 | static int holtek_mouse_probe(struct hid_device *hdev, | ||
83 | const struct hid_device_id *id) | ||
84 | { | ||
85 | + int ret; | ||
86 | + | ||
87 | if (!hid_is_usb(hdev)) | ||
88 | return -EINVAL; | ||
89 | + | ||
90 | + ret = hid_parse(hdev); | ||
91 | + if (ret) { | ||
92 | + hid_err(hdev, "hid parse failed: %d\n", ret); | ||
93 | + return ret; | ||
94 | + } | ||
95 | + | ||
96 | + ret = hid_hw_start(hdev, HID_CONNECT_DEFAULT); | ||
97 | + if (ret) { | ||
98 | + hid_err(hdev, "hw start failed: %d\n", ret); | ||
99 | + return ret; | ||
100 | + } | ||
101 | + | ||
102 | return 0; | ||
103 | } | ||
104 | |||
105 | diff --git a/drivers/hwmon/lm90.c b/drivers/hwmon/lm90.c | ||
106 | index 293d1184976b3..1e9f029a328a6 100644 | ||
107 | --- a/drivers/hwmon/lm90.c | ||
108 | +++ b/drivers/hwmon/lm90.c | ||
109 | @@ -196,6 +196,7 @@ enum chips { lm90, adm1032, lm99, lm86, max6657, max6659, adt7461, max6680, | ||
110 | #define LM90_STATUS_RHIGH (1 << 4) /* remote high temp limit tripped */ | ||
111 | #define LM90_STATUS_LLOW (1 << 5) /* local low temp limit tripped */ | ||
112 | #define LM90_STATUS_LHIGH (1 << 6) /* local high temp limit tripped */ | ||
113 | +#define LM90_STATUS_BUSY (1 << 7) /* conversion is ongoing */ | ||
114 | |||
115 | #define MAX6696_STATUS2_R2THRM (1 << 1) /* remote2 THERM limit tripped */ | ||
116 | #define MAX6696_STATUS2_R2OPEN (1 << 2) /* remote2 is an open circuit */ | ||
117 | @@ -692,7 +693,7 @@ static int lm90_update_device(struct device *dev) | ||
118 | val = lm90_read_reg(client, LM90_REG_R_STATUS); | ||
119 | if (val < 0) | ||
120 | return val; | ||
121 | - data->alarms = val; /* lower 8 bit of alarms */ | ||
122 | + data->alarms = val & ~LM90_STATUS_BUSY; | ||
123 | |||
124 | if (data->kind == max6696) { | ||
125 | val = lm90_select_remote_channel(client, data, 1); | ||
126 | @@ -1345,12 +1346,11 @@ static int lm90_detect(struct i2c_client *client, | ||
127 | if (man_id < 0 || chip_id < 0 || config1 < 0 || convrate < 0) | ||
128 | return -ENODEV; | ||
129 | |||
130 | - if (man_id == 0x01 || man_id == 0x5C || man_id == 0x41) { | ||
131 | + if (man_id == 0x01 || man_id == 0x5C || man_id == 0xA1) { | ||
132 | config2 = i2c_smbus_read_byte_data(client, LM90_REG_R_CONFIG2); | ||
133 | if (config2 < 0) | ||
134 | return -ENODEV; | ||
135 | - } else | ||
136 | - config2 = 0; /* Make compiler happy */ | ||
137 | + } | ||
138 | |||
139 | if ((address == 0x4C || address == 0x4D) | ||
140 | && man_id == 0x01) { /* National Semiconductor */ | ||
141 | diff --git a/drivers/infiniband/hw/qib/qib_user_sdma.c b/drivers/infiniband/hw/qib/qib_user_sdma.c | ||
142 | index 0dc15f95e7626..2d0b992579d6f 100644 | ||
143 | --- a/drivers/infiniband/hw/qib/qib_user_sdma.c | ||
144 | +++ b/drivers/infiniband/hw/qib/qib_user_sdma.c | ||
145 | @@ -946,7 +946,7 @@ static int qib_user_sdma_queue_pkts(const struct qib_devdata *dd, | ||
146 | &addrlimit) || | ||
147 | addrlimit > type_max(typeof(pkt->addrlimit))) { | ||
148 | ret = -EINVAL; | ||
149 | - goto free_pbc; | ||
150 | + goto free_pkt; | ||
151 | } | ||
152 | pkt->addrlimit = addrlimit; | ||
153 | |||
154 | diff --git a/drivers/net/bonding/bond_options.c b/drivers/net/bonding/bond_options.c | ||
155 | index 258cb3999b0e3..5c6a962363096 100644 | ||
156 | --- a/drivers/net/bonding/bond_options.c | ||
157 | +++ b/drivers/net/bonding/bond_options.c | ||
158 | @@ -1408,7 +1408,7 @@ static int bond_option_ad_actor_system_set(struct bonding *bond, | ||
159 | mac = (u8 *)&newval->value; | ||
160 | } | ||
161 | |||
162 | - if (!is_valid_ether_addr(mac)) | ||
163 | + if (is_multicast_ether_addr(mac)) | ||
164 | goto err; | ||
165 | |||
166 | netdev_info(bond->dev, "Setting ad_actor_system to %pM\n", mac); | ||
167 | diff --git a/drivers/net/can/usb/kvaser_usb.c b/drivers/net/can/usb/kvaser_usb.c | ||
168 | index 792a1afabf5d1..5ab088d02fbad 100644 | ||
169 | --- a/drivers/net/can/usb/kvaser_usb.c | ||
170 | +++ b/drivers/net/can/usb/kvaser_usb.c | ||
171 | @@ -31,7 +31,10 @@ | ||
172 | #define USB_SEND_TIMEOUT 1000 /* msecs */ | ||
173 | #define USB_RECV_TIMEOUT 1000 /* msecs */ | ||
174 | #define RX_BUFFER_SIZE 3072 | ||
175 | -#define CAN_USB_CLOCK 8000000 | ||
176 | +#define KVASER_USB_CAN_CLOCK_8MHZ 8000000 | ||
177 | +#define KVASER_USB_CAN_CLOCK_16MHZ 16000000 | ||
178 | +#define KVASER_USB_CAN_CLOCK_24MHZ 24000000 | ||
179 | +#define KVASER_USB_CAN_CLOCK_32MHZ 32000000 | ||
180 | #define MAX_NET_DEVICES 3 | ||
181 | #define MAX_USBCAN_NET_DEVICES 2 | ||
182 | |||
183 | @@ -142,6 +145,12 @@ static inline bool kvaser_is_usbcan(const struct usb_device_id *id) | ||
184 | #define CMD_LEAF_USB_THROTTLE 77 | ||
185 | #define CMD_LEAF_LOG_MESSAGE 106 | ||
186 | |||
187 | +/* Leaf frequency options */ | ||
188 | +#define KVASER_USB_LEAF_SWOPTION_FREQ_MASK 0x60 | ||
189 | +#define KVASER_USB_LEAF_SWOPTION_FREQ_16_MHZ_CLK 0 | ||
190 | +#define KVASER_USB_LEAF_SWOPTION_FREQ_32_MHZ_CLK BIT(5) | ||
191 | +#define KVASER_USB_LEAF_SWOPTION_FREQ_24_MHZ_CLK BIT(6) | ||
192 | + | ||
193 | /* error factors */ | ||
194 | #define M16C_EF_ACKE BIT(0) | ||
195 | #define M16C_EF_CRCE BIT(1) | ||
196 | @@ -472,6 +481,8 @@ struct kvaser_usb { | ||
197 | bool rxinitdone; | ||
198 | void *rxbuf[MAX_RX_URBS]; | ||
199 | dma_addr_t rxbuf_dma[MAX_RX_URBS]; | ||
200 | + | ||
201 | + struct can_clock clock; | ||
202 | }; | ||
203 | |||
204 | struct kvaser_usb_net_priv { | ||
205 | @@ -652,6 +663,27 @@ static int kvaser_usb_send_simple_msg(const struct kvaser_usb *dev, | ||
206 | return rc; | ||
207 | } | ||
208 | |||
209 | +static void kvaser_usb_get_software_info_leaf(struct kvaser_usb *dev, | ||
210 | + const struct leaf_msg_softinfo *softinfo) | ||
211 | +{ | ||
212 | + u32 sw_options = le32_to_cpu(softinfo->sw_options); | ||
213 | + | ||
214 | + dev->fw_version = le32_to_cpu(softinfo->fw_version); | ||
215 | + dev->max_tx_urbs = le16_to_cpu(softinfo->max_outstanding_tx); | ||
216 | + | ||
217 | + switch (sw_options & KVASER_USB_LEAF_SWOPTION_FREQ_MASK) { | ||
218 | + case KVASER_USB_LEAF_SWOPTION_FREQ_16_MHZ_CLK: | ||
219 | + dev->clock.freq = KVASER_USB_CAN_CLOCK_16MHZ; | ||
220 | + break; | ||
221 | + case KVASER_USB_LEAF_SWOPTION_FREQ_24_MHZ_CLK: | ||
222 | + dev->clock.freq = KVASER_USB_CAN_CLOCK_24MHZ; | ||
223 | + break; | ||
224 | + case KVASER_USB_LEAF_SWOPTION_FREQ_32_MHZ_CLK: | ||
225 | + dev->clock.freq = KVASER_USB_CAN_CLOCK_32MHZ; | ||
226 | + break; | ||
227 | + } | ||
228 | +} | ||
229 | + | ||
230 | static int kvaser_usb_get_software_info(struct kvaser_usb *dev) | ||
231 | { | ||
232 | struct kvaser_msg msg; | ||
233 | @@ -667,14 +699,13 @@ static int kvaser_usb_get_software_info(struct kvaser_usb *dev) | ||
234 | |||
235 | switch (dev->family) { | ||
236 | case KVASER_LEAF: | ||
237 | - dev->fw_version = le32_to_cpu(msg.u.leaf.softinfo.fw_version); | ||
238 | - dev->max_tx_urbs = | ||
239 | - le16_to_cpu(msg.u.leaf.softinfo.max_outstanding_tx); | ||
240 | + kvaser_usb_get_software_info_leaf(dev, &msg.u.leaf.softinfo); | ||
241 | break; | ||
242 | case KVASER_USBCAN: | ||
243 | dev->fw_version = le32_to_cpu(msg.u.usbcan.softinfo.fw_version); | ||
244 | dev->max_tx_urbs = | ||
245 | le16_to_cpu(msg.u.usbcan.softinfo.max_outstanding_tx); | ||
246 | + dev->clock.freq = KVASER_USB_CAN_CLOCK_8MHZ; | ||
247 | break; | ||
248 | } | ||
249 | |||
250 | @@ -1926,7 +1957,7 @@ static int kvaser_usb_init_one(struct usb_interface *intf, | ||
251 | kvaser_usb_reset_tx_urb_contexts(priv); | ||
252 | |||
253 | priv->can.state = CAN_STATE_STOPPED; | ||
254 | - priv->can.clock.freq = CAN_USB_CLOCK; | ||
255 | + priv->can.clock.freq = dev->clock.freq; | ||
256 | priv->can.bittiming_const = &kvaser_usb_bittiming_const; | ||
257 | priv->can.do_set_bittiming = kvaser_usb_set_bittiming; | ||
258 | priv->can.do_set_mode = kvaser_usb_set_mode; | ||
259 | diff --git a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_sriov.h b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_sriov.h | ||
260 | index 5f327659efa7a..85b688f60b876 100644 | ||
261 | --- a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_sriov.h | ||
262 | +++ b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_sriov.h | ||
263 | @@ -202,7 +202,7 @@ int qlcnic_sriov_get_vf_vport_info(struct qlcnic_adapter *, | ||
264 | struct qlcnic_info *, u16); | ||
265 | int qlcnic_sriov_cfg_vf_guest_vlan(struct qlcnic_adapter *, u16, u8); | ||
266 | void qlcnic_sriov_free_vlans(struct qlcnic_adapter *); | ||
267 | -void qlcnic_sriov_alloc_vlans(struct qlcnic_adapter *); | ||
268 | +int qlcnic_sriov_alloc_vlans(struct qlcnic_adapter *); | ||
269 | bool qlcnic_sriov_check_any_vlan(struct qlcnic_vf_info *); | ||
270 | void qlcnic_sriov_del_vlan_id(struct qlcnic_sriov *, | ||
271 | struct qlcnic_vf_info *, u16); | ||
272 | diff --git a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_sriov_common.c b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_sriov_common.c | ||
273 | index c58180f408448..44caa7c2077ec 100644 | ||
274 | --- a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_sriov_common.c | ||
275 | +++ b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_sriov_common.c | ||
276 | @@ -433,7 +433,7 @@ static int qlcnic_sriov_set_guest_vlan_mode(struct qlcnic_adapter *adapter, | ||
277 | struct qlcnic_cmd_args *cmd) | ||
278 | { | ||
279 | struct qlcnic_sriov *sriov = adapter->ahw->sriov; | ||
280 | - int i, num_vlans; | ||
281 | + int i, num_vlans, ret; | ||
282 | u16 *vlans; | ||
283 | |||
284 | if (sriov->allowed_vlans) | ||
285 | @@ -444,7 +444,9 @@ static int qlcnic_sriov_set_guest_vlan_mode(struct qlcnic_adapter *adapter, | ||
286 | dev_info(&adapter->pdev->dev, "Number of allowed Guest VLANs = %d\n", | ||
287 | sriov->num_allowed_vlans); | ||
288 | |||
289 | - qlcnic_sriov_alloc_vlans(adapter); | ||
290 | + ret = qlcnic_sriov_alloc_vlans(adapter); | ||
291 | + if (ret) | ||
292 | + return ret; | ||
293 | |||
294 | if (!sriov->any_vlan) | ||
295 | return 0; | ||
296 | @@ -2164,7 +2166,7 @@ static int qlcnic_sriov_vf_resume(struct qlcnic_adapter *adapter) | ||
297 | return err; | ||
298 | } | ||
299 | |||
300 | -void qlcnic_sriov_alloc_vlans(struct qlcnic_adapter *adapter) | ||
301 | +int qlcnic_sriov_alloc_vlans(struct qlcnic_adapter *adapter) | ||
302 | { | ||
303 | struct qlcnic_sriov *sriov = adapter->ahw->sriov; | ||
304 | struct qlcnic_vf_info *vf; | ||
305 | @@ -2174,7 +2176,11 @@ void qlcnic_sriov_alloc_vlans(struct qlcnic_adapter *adapter) | ||
306 | vf = &sriov->vf_info[i]; | ||
307 | vf->sriov_vlans = kcalloc(sriov->num_allowed_vlans, | ||
308 | sizeof(*vf->sriov_vlans), GFP_KERNEL); | ||
309 | + if (!vf->sriov_vlans) | ||
310 | + return -ENOMEM; | ||
311 | } | ||
312 | + | ||
313 | + return 0; | ||
314 | } | ||
315 | |||
316 | void qlcnic_sriov_free_vlans(struct qlcnic_adapter *adapter) | ||
317 | diff --git a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_sriov_pf.c b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_sriov_pf.c | ||
318 | index 50eaafa3eaba3..c9f2cd2462230 100644 | ||
319 | --- a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_sriov_pf.c | ||
320 | +++ b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_sriov_pf.c | ||
321 | @@ -598,7 +598,9 @@ static int __qlcnic_pci_sriov_enable(struct qlcnic_adapter *adapter, | ||
322 | if (err) | ||
323 | goto del_flr_queue; | ||
324 | |||
325 | - qlcnic_sriov_alloc_vlans(adapter); | ||
326 | + err = qlcnic_sriov_alloc_vlans(adapter); | ||
327 | + if (err) | ||
328 | + goto del_flr_queue; | ||
329 | |||
330 | return err; | ||
331 | |||
332 | diff --git a/drivers/net/ethernet/smsc/smc911x.c b/drivers/net/ethernet/smsc/smc911x.c | ||
333 | index d0cf971aa4ebe..4237bd311e0e6 100644 | ||
334 | --- a/drivers/net/ethernet/smsc/smc911x.c | ||
335 | +++ b/drivers/net/ethernet/smsc/smc911x.c | ||
336 | @@ -2088,6 +2088,11 @@ static int smc911x_drv_probe(struct platform_device *pdev) | ||
337 | |||
338 | ndev->dma = (unsigned char)-1; | ||
339 | ndev->irq = platform_get_irq(pdev, 0); | ||
340 | + if (ndev->irq < 0) { | ||
341 | + ret = ndev->irq; | ||
342 | + goto release_both; | ||
343 | + } | ||
344 | + | ||
345 | lp = netdev_priv(ndev); | ||
346 | lp->netdev = ndev; | ||
347 | #ifdef SMC_DYNAMIC_BUS_CONFIG | ||
348 | diff --git a/drivers/net/fjes/fjes_main.c b/drivers/net/fjes/fjes_main.c | ||
349 | index 440047a239f57..26bb43a675131 100644 | ||
350 | --- a/drivers/net/fjes/fjes_main.c | ||
351 | +++ b/drivers/net/fjes/fjes_main.c | ||
352 | @@ -1219,6 +1219,11 @@ static int fjes_probe(struct platform_device *plat_dev) | ||
353 | hw->hw_res.start = res->start; | ||
354 | hw->hw_res.size = resource_size(res); | ||
355 | hw->hw_res.irq = platform_get_irq(plat_dev, 0); | ||
356 | + if (hw->hw_res.irq < 0) { | ||
357 | + err = hw->hw_res.irq; | ||
358 | + goto err_free_control_wq; | ||
359 | + } | ||
360 | + | ||
361 | err = fjes_hw_init(&adapter->hw); | ||
362 | if (err) | ||
363 | goto err_free_control_wq; | ||
364 | diff --git a/drivers/net/hamradio/mkiss.c b/drivers/net/hamradio/mkiss.c | ||
365 | index 76340bc3cf445..8d85cedb4bf5b 100644 | ||
366 | --- a/drivers/net/hamradio/mkiss.c | ||
367 | +++ b/drivers/net/hamradio/mkiss.c | ||
368 | @@ -803,13 +803,14 @@ static void mkiss_close(struct tty_struct *tty) | ||
369 | */ | ||
370 | netif_stop_queue(ax->dev); | ||
371 | |||
372 | - /* Free all AX25 frame buffers. */ | ||
373 | + unregister_netdev(ax->dev); | ||
374 | + | ||
375 | + /* Free all AX25 frame buffers after unreg. */ | ||
376 | kfree(ax->rbuff); | ||
377 | kfree(ax->xbuff); | ||
378 | |||
379 | ax->tty = NULL; | ||
380 | |||
381 | - unregister_netdev(ax->dev); | ||
382 | free_netdev(ax->dev); | ||
383 | } | ||
384 | |||
385 | diff --git a/drivers/net/usb/lan78xx.c b/drivers/net/usb/lan78xx.c | ||
386 | index 7752cc09a1da5..580c1e7666a45 100644 | ||
387 | --- a/drivers/net/usb/lan78xx.c | ||
388 | +++ b/drivers/net/usb/lan78xx.c | ||
389 | @@ -67,6 +67,8 @@ | ||
390 | #define LAN7850_USB_PRODUCT_ID (0x7850) | ||
391 | #define LAN78XX_EEPROM_MAGIC (0x78A5) | ||
392 | #define LAN78XX_OTP_MAGIC (0x78F3) | ||
393 | +#define AT29M2AF_USB_VENDOR_ID (0x07C9) | ||
394 | +#define AT29M2AF_USB_PRODUCT_ID (0x0012) | ||
395 | |||
396 | #define MII_READ 1 | ||
397 | #define MII_WRITE 0 | ||
398 | @@ -3756,6 +3758,10 @@ static const struct usb_device_id products[] = { | ||
399 | /* LAN7850 USB Gigabit Ethernet Device */ | ||
400 | USB_DEVICE(LAN78XX_USB_VENDOR_ID, LAN7850_USB_PRODUCT_ID), | ||
401 | }, | ||
402 | + { | ||
403 | + /* ATM2-AF USB Gigabit Ethernet Device */ | ||
404 | + USB_DEVICE(AT29M2AF_USB_VENDOR_ID, AT29M2AF_USB_PRODUCT_ID), | ||
405 | + }, | ||
406 | {}, | ||
407 | }; | ||
408 | MODULE_DEVICE_TABLE(usb, products); | ||
409 | diff --git a/net/ax25/af_ax25.c b/net/ax25/af_ax25.c | ||
410 | index 64fede18aa33f..f4c8567e91b38 100644 | ||
411 | --- a/net/ax25/af_ax25.c | ||
412 | +++ b/net/ax25/af_ax25.c | ||
413 | @@ -88,8 +88,10 @@ static void ax25_kill_by_device(struct net_device *dev) | ||
414 | again: | ||
415 | ax25_for_each(s, &ax25_list) { | ||
416 | if (s->ax25_dev == ax25_dev) { | ||
417 | - s->ax25_dev = NULL; | ||
418 | spin_unlock_bh(&ax25_list_lock); | ||
419 | + lock_sock(s->sk); | ||
420 | + s->ax25_dev = NULL; | ||
421 | + release_sock(s->sk); | ||
422 | ax25_disconnect(s, ENETUNREACH); | ||
423 | spin_lock_bh(&ax25_list_lock); | ||
424 | |||
425 | diff --git a/net/phonet/pep.c b/net/phonet/pep.c | ||
426 | index f6aa532bcbf64..1e7945df39928 100644 | ||
427 | --- a/net/phonet/pep.c | ||
428 | +++ b/net/phonet/pep.c | ||
429 | @@ -956,6 +956,8 @@ static int pep_ioctl(struct sock *sk, int cmd, unsigned long arg) | ||
430 | ret = -EBUSY; | ||
431 | else if (sk->sk_state == TCP_ESTABLISHED) | ||
432 | ret = -EISCONN; | ||
433 | + else if (!pn->pn_sk.sobject) | ||
434 | + ret = -EADDRNOTAVAIL; | ||
435 | else | ||
436 | ret = pep_sock_enable(sk, NULL, 0); | ||
437 | release_sock(sk); | ||
438 | diff --git a/sound/core/jack.c b/sound/core/jack.c | ||
439 | index f652e90efd7e7..5ddf81f091fa9 100644 | ||
440 | --- a/sound/core/jack.c | ||
441 | +++ b/sound/core/jack.c | ||
442 | @@ -234,6 +234,10 @@ int snd_jack_new(struct snd_card *card, const char *id, int type, | ||
443 | return -ENOMEM; | ||
444 | |||
445 | jack->id = kstrdup(id, GFP_KERNEL); | ||
446 | + if (jack->id == NULL) { | ||
447 | + kfree(jack); | ||
448 | + return -ENOMEM; | ||
449 | + } | ||
450 | |||
451 | /* don't creat input device for phantom jack */ | ||
452 | if (!phantom_jack) { | ||
453 | diff --git a/sound/drivers/opl3/opl3_midi.c b/sound/drivers/opl3/opl3_midi.c | ||
454 | index 7821b07415a78..ff67c4b67e264 100644 | ||
455 | --- a/sound/drivers/opl3/opl3_midi.c | ||
456 | +++ b/sound/drivers/opl3/opl3_midi.c | ||
457 | @@ -415,7 +415,7 @@ void snd_opl3_note_on(void *p, int note, int vel, struct snd_midi_channel *chan) | ||
458 | } | ||
459 | if (instr_4op) { | ||
460 | vp2 = &opl3->voices[voice + 3]; | ||
461 | - if (vp->state > 0) { | ||
462 | + if (vp2->state > 0) { | ||
463 | opl3_reg = reg_side | (OPL3_REG_KEYON_BLOCK + | ||
464 | voice_offset + 3); | ||
465 | reg_val = vp->keyon_reg & ~OPL3_KEYON_BIT; |