Gentoo Archives: gentoo-commits

From: Mike Pagano <mpagano@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/linux-patches:4.4 commit in: /
Date: Wed, 29 Dec 2021 13:13:47
Message-Id: 1640783611.a93d74eafd8529bdb60b1dc166800e0f6cdcdfd2.mpagano@gentoo
1 commit: a93d74eafd8529bdb60b1dc166800e0f6cdcdfd2
2 Author: Mike Pagano <mpagano <AT> gentoo <DOT> org>
3 AuthorDate: Wed Dec 29 13:13:31 2021 +0000
4 Commit: Mike Pagano <mpagano <AT> gentoo <DOT> org>
5 CommitDate: Wed Dec 29 13:13:31 2021 +0000
6 URL: https://gitweb.gentoo.org/proj/linux-patches.git/commit/?id=a93d74ea
7
8 Linux patch 4.4.297
9
10 Signed-off-by: Mike Pagano <mpagano <AT> gentoo.org>
11
12 0000_README | 4 +
13 1296_linux-4.4.297.patch | 439 +++++++++++++++++++++++++++++++++++++++++++++++
14 2 files changed, 443 insertions(+)
15
16 diff --git a/0000_README b/0000_README
17 index 2168e76a..2053f8cf 100644
18 --- a/0000_README
19 +++ b/0000_README
20 @@ -1227,6 +1227,10 @@ Patch: 1295_linux-4.4.296.patch
21 From: http://www.kernel.org
22 Desc: Linux 4.4.295
23
24 +Patch: 1296_linux-4.4.297.patch
25 +From: http://www.kernel.org
26 +Desc: Linux 4.4.297
27 +
28 Patch: 1500_XATTR_USER_PREFIX.patch
29 From: https://bugs.gentoo.org/show_bug.cgi?id=470644
30 Desc: Support for namespace user.pax.* on tmpfs.
31
32 diff --git a/1296_linux-4.4.297.patch b/1296_linux-4.4.297.patch
33 new file mode 100644
34 index 00000000..dfd1eafe
35 --- /dev/null
36 +++ b/1296_linux-4.4.297.patch
37 @@ -0,0 +1,439 @@
38 +diff --git a/Documentation/networking/bonding.txt b/Documentation/networking/bonding.txt
39 +index 334b49ef02d13..5a6e70483cedf 100644
40 +--- a/Documentation/networking/bonding.txt
41 ++++ b/Documentation/networking/bonding.txt
42 +@@ -191,11 +191,12 @@ ad_actor_sys_prio
43 + ad_actor_system
44 +
45 + In an AD system, this specifies the mac-address for the actor in
46 +- protocol packet exchanges (LACPDUs). The value cannot be NULL or
47 +- multicast. It is preferred to have the local-admin bit set for this
48 +- mac but driver does not enforce it. If the value is not given then
49 +- system defaults to using the masters' mac address as actors' system
50 +- address.
51 ++ protocol packet exchanges (LACPDUs). The value cannot be a multicast
52 ++ address. If the all-zeroes MAC is specified, bonding will internally
53 ++ use the MAC of the bond itself. It is preferred to have the
54 ++ local-admin bit set for this mac but driver does not enforce it. If
55 ++ the value is not given then system defaults to using the masters'
56 ++ mac address as actors' system address.
57 +
58 + This parameter has effect only in 802.3ad mode and is available through
59 + SysFs interface.
60 +diff --git a/Makefile b/Makefile
61 +index 37c12303478e3..6bc764fb1b971 100644
62 +--- a/Makefile
63 ++++ b/Makefile
64 +@@ -1,6 +1,6 @@
65 + VERSION = 4
66 + PATCHLEVEL = 4
67 +-SUBLEVEL = 296
68 ++SUBLEVEL = 297
69 + EXTRAVERSION =
70 + NAME = Blurry Fish Butt
71 +
72 +diff --git a/arch/arm/kernel/entry-armv.S b/arch/arm/kernel/entry-armv.S
73 +index 3ce377f7251f3..618ceb6fe674b 100644
74 +--- a/arch/arm/kernel/entry-armv.S
75 ++++ b/arch/arm/kernel/entry-armv.S
76 +@@ -625,11 +625,9 @@ call_fpe:
77 + tstne r0, #0x04000000 @ bit 26 set on both ARM and Thumb-2
78 + reteq lr
79 + and r8, r0, #0x00000f00 @ mask out CP number
80 +- THUMB( lsr r8, r8, #8 )
81 + mov r7, #1
82 +- add r6, r10, #TI_USED_CP
83 +- ARM( strb r7, [r6, r8, lsr #8] ) @ set appropriate used_cp[]
84 +- THUMB( strb r7, [r6, r8] ) @ set appropriate used_cp[]
85 ++ add r6, r10, r8, lsr #8 @ add used_cp[] array offset first
86 ++ strb r7, [r6, #TI_USED_CP] @ set appropriate used_cp[]
87 + #ifdef CONFIG_IWMMXT
88 + @ Test if we need to give access to iWMMXt coprocessors
89 + ldr r5, [r10, #TI_FLAGS]
90 +@@ -638,7 +636,7 @@ call_fpe:
91 + bcs iwmmxt_task_enable
92 + #endif
93 + ARM( add pc, pc, r8, lsr #6 )
94 +- THUMB( lsl r8, r8, #2 )
95 ++ THUMB( lsr r8, r8, #6 )
96 + THUMB( add pc, r8 )
97 + nop
98 +
99 +diff --git a/drivers/block/xen-blkfront.c b/drivers/block/xen-blkfront.c
100 +index 1e44b7880200d..ae2c47e99c888 100644
101 +--- a/drivers/block/xen-blkfront.c
102 ++++ b/drivers/block/xen-blkfront.c
103 +@@ -493,8 +493,6 @@ static int blkif_queue_discard_req(struct request *req)
104 + else
105 + ring_req->u.discard.flag = 0;
106 +
107 +- info->ring.req_prod_pvt++;
108 +-
109 + /* Copy the request to the ring page. */
110 + *final_ring_req = *ring_req;
111 + info->shadow[id].inflight = true;
112 +@@ -711,8 +709,6 @@ static int blkif_queue_rw_req(struct request *req)
113 + if (setup.segments)
114 + kunmap_atomic(setup.segments);
115 +
116 +- info->ring.req_prod_pvt++;
117 +-
118 + /* Copy request(s) to the ring page. */
119 + *final_ring_req = *ring_req;
120 + info->shadow[id].inflight = true;
121 +diff --git a/drivers/hid/hid-holtek-mouse.c b/drivers/hid/hid-holtek-mouse.c
122 +index 27c08ddab0e1a..96db7e96fcea9 100644
123 +--- a/drivers/hid/hid-holtek-mouse.c
124 ++++ b/drivers/hid/hid-holtek-mouse.c
125 +@@ -68,8 +68,23 @@ static __u8 *holtek_mouse_report_fixup(struct hid_device *hdev, __u8 *rdesc,
126 + static int holtek_mouse_probe(struct hid_device *hdev,
127 + const struct hid_device_id *id)
128 + {
129 ++ int ret;
130 ++
131 + if (!hid_is_usb(hdev))
132 + return -EINVAL;
133 ++
134 ++ ret = hid_parse(hdev);
135 ++ if (ret) {
136 ++ hid_err(hdev, "hid parse failed: %d\n", ret);
137 ++ return ret;
138 ++ }
139 ++
140 ++ ret = hid_hw_start(hdev, HID_CONNECT_DEFAULT);
141 ++ if (ret) {
142 ++ hid_err(hdev, "hw start failed: %d\n", ret);
143 ++ return ret;
144 ++ }
145 ++
146 + return 0;
147 + }
148 +
149 +diff --git a/drivers/hwmon/lm90.c b/drivers/hwmon/lm90.c
150 +index c9ff08dbe10ce..420f341272621 100644
151 +--- a/drivers/hwmon/lm90.c
152 ++++ b/drivers/hwmon/lm90.c
153 +@@ -1209,12 +1209,11 @@ static int lm90_detect(struct i2c_client *client,
154 + if (man_id < 0 || chip_id < 0 || config1 < 0 || convrate < 0)
155 + return -ENODEV;
156 +
157 +- if (man_id == 0x01 || man_id == 0x5C || man_id == 0x41) {
158 ++ if (man_id == 0x01 || man_id == 0x5C || man_id == 0xA1) {
159 + config2 = i2c_smbus_read_byte_data(client, LM90_REG_R_CONFIG2);
160 + if (config2 < 0)
161 + return -ENODEV;
162 +- } else
163 +- config2 = 0; /* Make compiler happy */
164 ++ }
165 +
166 + if ((address == 0x4C || address == 0x4D)
167 + && man_id == 0x01) { /* National Semiconductor */
168 +diff --git a/drivers/infiniband/hw/qib/qib_user_sdma.c b/drivers/infiniband/hw/qib/qib_user_sdma.c
169 +index 0dc15f95e7626..2d0b992579d6f 100644
170 +--- a/drivers/infiniband/hw/qib/qib_user_sdma.c
171 ++++ b/drivers/infiniband/hw/qib/qib_user_sdma.c
172 +@@ -946,7 +946,7 @@ static int qib_user_sdma_queue_pkts(const struct qib_devdata *dd,
173 + &addrlimit) ||
174 + addrlimit > type_max(typeof(pkt->addrlimit))) {
175 + ret = -EINVAL;
176 +- goto free_pbc;
177 ++ goto free_pkt;
178 + }
179 + pkt->addrlimit = addrlimit;
180 +
181 +diff --git a/drivers/net/bonding/bond_options.c b/drivers/net/bonding/bond_options.c
182 +index 1022e80aaf974..1d95a83d2baeb 100644
183 +--- a/drivers/net/bonding/bond_options.c
184 ++++ b/drivers/net/bonding/bond_options.c
185 +@@ -1407,7 +1407,7 @@ static int bond_option_ad_actor_system_set(struct bonding *bond,
186 + mac = (u8 *)&newval->value;
187 + }
188 +
189 +- if (!is_valid_ether_addr(mac))
190 ++ if (is_multicast_ether_addr(mac))
191 + goto err;
192 +
193 + netdev_info(bond->dev, "Setting ad_actor_system to %pM\n", mac);
194 +diff --git a/drivers/net/can/usb/kvaser_usb.c b/drivers/net/can/usb/kvaser_usb.c
195 +index 9991ee93735a5..81abb30d9ec03 100644
196 +--- a/drivers/net/can/usb/kvaser_usb.c
197 ++++ b/drivers/net/can/usb/kvaser_usb.c
198 +@@ -31,7 +31,10 @@
199 + #define USB_SEND_TIMEOUT 1000 /* msecs */
200 + #define USB_RECV_TIMEOUT 1000 /* msecs */
201 + #define RX_BUFFER_SIZE 3072
202 +-#define CAN_USB_CLOCK 8000000
203 ++#define KVASER_USB_CAN_CLOCK_8MHZ 8000000
204 ++#define KVASER_USB_CAN_CLOCK_16MHZ 16000000
205 ++#define KVASER_USB_CAN_CLOCK_24MHZ 24000000
206 ++#define KVASER_USB_CAN_CLOCK_32MHZ 32000000
207 + #define MAX_NET_DEVICES 3
208 + #define MAX_USBCAN_NET_DEVICES 2
209 +
210 +@@ -139,6 +142,12 @@ static inline bool kvaser_is_usbcan(const struct usb_device_id *id)
211 + #define CMD_LEAF_USB_THROTTLE 77
212 + #define CMD_LEAF_LOG_MESSAGE 106
213 +
214 ++/* Leaf frequency options */
215 ++#define KVASER_USB_LEAF_SWOPTION_FREQ_MASK 0x60
216 ++#define KVASER_USB_LEAF_SWOPTION_FREQ_16_MHZ_CLK 0
217 ++#define KVASER_USB_LEAF_SWOPTION_FREQ_32_MHZ_CLK BIT(5)
218 ++#define KVASER_USB_LEAF_SWOPTION_FREQ_24_MHZ_CLK BIT(6)
219 ++
220 + /* error factors */
221 + #define M16C_EF_ACKE BIT(0)
222 + #define M16C_EF_CRCE BIT(1)
223 +@@ -469,6 +478,8 @@ struct kvaser_usb {
224 + bool rxinitdone;
225 + void *rxbuf[MAX_RX_URBS];
226 + dma_addr_t rxbuf_dma[MAX_RX_URBS];
227 ++
228 ++ struct can_clock clock;
229 + };
230 +
231 + struct kvaser_usb_net_priv {
232 +@@ -646,6 +657,27 @@ static int kvaser_usb_send_simple_msg(const struct kvaser_usb *dev,
233 + return rc;
234 + }
235 +
236 ++static void kvaser_usb_get_software_info_leaf(struct kvaser_usb *dev,
237 ++ const struct leaf_msg_softinfo *softinfo)
238 ++{
239 ++ u32 sw_options = le32_to_cpu(softinfo->sw_options);
240 ++
241 ++ dev->fw_version = le32_to_cpu(softinfo->fw_version);
242 ++ dev->max_tx_urbs = le16_to_cpu(softinfo->max_outstanding_tx);
243 ++
244 ++ switch (sw_options & KVASER_USB_LEAF_SWOPTION_FREQ_MASK) {
245 ++ case KVASER_USB_LEAF_SWOPTION_FREQ_16_MHZ_CLK:
246 ++ dev->clock.freq = KVASER_USB_CAN_CLOCK_16MHZ;
247 ++ break;
248 ++ case KVASER_USB_LEAF_SWOPTION_FREQ_24_MHZ_CLK:
249 ++ dev->clock.freq = KVASER_USB_CAN_CLOCK_24MHZ;
250 ++ break;
251 ++ case KVASER_USB_LEAF_SWOPTION_FREQ_32_MHZ_CLK:
252 ++ dev->clock.freq = KVASER_USB_CAN_CLOCK_32MHZ;
253 ++ break;
254 ++ }
255 ++}
256 ++
257 + static int kvaser_usb_get_software_info(struct kvaser_usb *dev)
258 + {
259 + struct kvaser_msg msg;
260 +@@ -661,14 +693,13 @@ static int kvaser_usb_get_software_info(struct kvaser_usb *dev)
261 +
262 + switch (dev->family) {
263 + case KVASER_LEAF:
264 +- dev->fw_version = le32_to_cpu(msg.u.leaf.softinfo.fw_version);
265 +- dev->max_tx_urbs =
266 +- le16_to_cpu(msg.u.leaf.softinfo.max_outstanding_tx);
267 ++ kvaser_usb_get_software_info_leaf(dev, &msg.u.leaf.softinfo);
268 + break;
269 + case KVASER_USBCAN:
270 + dev->fw_version = le32_to_cpu(msg.u.usbcan.softinfo.fw_version);
271 + dev->max_tx_urbs =
272 + le16_to_cpu(msg.u.usbcan.softinfo.max_outstanding_tx);
273 ++ dev->clock.freq = KVASER_USB_CAN_CLOCK_8MHZ;
274 + break;
275 + }
276 +
277 +@@ -1925,7 +1956,7 @@ static int kvaser_usb_init_one(struct usb_interface *intf,
278 + kvaser_usb_reset_tx_urb_contexts(priv);
279 +
280 + priv->can.state = CAN_STATE_STOPPED;
281 +- priv->can.clock.freq = CAN_USB_CLOCK;
282 ++ priv->can.clock.freq = dev->clock.freq;
283 + priv->can.bittiming_const = &kvaser_usb_bittiming_const;
284 + priv->can.do_set_bittiming = kvaser_usb_set_bittiming;
285 + priv->can.do_set_mode = kvaser_usb_set_mode;
286 +diff --git a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_sriov.h b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_sriov.h
287 +index 017d8c2c8285a..aab2db76d9edc 100644
288 +--- a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_sriov.h
289 ++++ b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_sriov.h
290 +@@ -201,7 +201,7 @@ int qlcnic_sriov_get_vf_vport_info(struct qlcnic_adapter *,
291 + struct qlcnic_info *, u16);
292 + int qlcnic_sriov_cfg_vf_guest_vlan(struct qlcnic_adapter *, u16, u8);
293 + void qlcnic_sriov_free_vlans(struct qlcnic_adapter *);
294 +-void qlcnic_sriov_alloc_vlans(struct qlcnic_adapter *);
295 ++int qlcnic_sriov_alloc_vlans(struct qlcnic_adapter *);
296 + bool qlcnic_sriov_check_any_vlan(struct qlcnic_vf_info *);
297 + void qlcnic_sriov_del_vlan_id(struct qlcnic_sriov *,
298 + struct qlcnic_vf_info *, u16);
299 +diff --git a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_sriov_common.c b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_sriov_common.c
300 +index ffa6885acfc8f..03e24fcf87a8e 100644
301 +--- a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_sriov_common.c
302 ++++ b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_sriov_common.c
303 +@@ -427,7 +427,7 @@ static int qlcnic_sriov_set_guest_vlan_mode(struct qlcnic_adapter *adapter,
304 + struct qlcnic_cmd_args *cmd)
305 + {
306 + struct qlcnic_sriov *sriov = adapter->ahw->sriov;
307 +- int i, num_vlans;
308 ++ int i, num_vlans, ret;
309 + u16 *vlans;
310 +
311 + if (sriov->allowed_vlans)
312 +@@ -438,7 +438,9 @@ static int qlcnic_sriov_set_guest_vlan_mode(struct qlcnic_adapter *adapter,
313 + dev_info(&adapter->pdev->dev, "Number of allowed Guest VLANs = %d\n",
314 + sriov->num_allowed_vlans);
315 +
316 +- qlcnic_sriov_alloc_vlans(adapter);
317 ++ ret = qlcnic_sriov_alloc_vlans(adapter);
318 ++ if (ret)
319 ++ return ret;
320 +
321 + if (!sriov->any_vlan)
322 + return 0;
323 +@@ -2147,7 +2149,7 @@ static int qlcnic_sriov_vf_resume(struct qlcnic_adapter *adapter)
324 + return err;
325 + }
326 +
327 +-void qlcnic_sriov_alloc_vlans(struct qlcnic_adapter *adapter)
328 ++int qlcnic_sriov_alloc_vlans(struct qlcnic_adapter *adapter)
329 + {
330 + struct qlcnic_sriov *sriov = adapter->ahw->sriov;
331 + struct qlcnic_vf_info *vf;
332 +@@ -2157,7 +2159,11 @@ void qlcnic_sriov_alloc_vlans(struct qlcnic_adapter *adapter)
333 + vf = &sriov->vf_info[i];
334 + vf->sriov_vlans = kcalloc(sriov->num_allowed_vlans,
335 + sizeof(*vf->sriov_vlans), GFP_KERNEL);
336 ++ if (!vf->sriov_vlans)
337 ++ return -ENOMEM;
338 + }
339 ++
340 ++ return 0;
341 + }
342 +
343 + void qlcnic_sriov_free_vlans(struct qlcnic_adapter *adapter)
344 +diff --git a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_sriov_pf.c b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_sriov_pf.c
345 +index afd687e5e7790..238a0e58342fa 100644
346 +--- a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_sriov_pf.c
347 ++++ b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_sriov_pf.c
348 +@@ -598,7 +598,9 @@ static int __qlcnic_pci_sriov_enable(struct qlcnic_adapter *adapter,
349 + if (err)
350 + goto del_flr_queue;
351 +
352 +- qlcnic_sriov_alloc_vlans(adapter);
353 ++ err = qlcnic_sriov_alloc_vlans(adapter);
354 ++ if (err)
355 ++ goto del_flr_queue;
356 +
357 + return err;
358 +
359 +diff --git a/drivers/net/ethernet/smsc/smc911x.c b/drivers/net/ethernet/smsc/smc911x.c
360 +index 0be9c74238fd4..092267d8a86df 100644
361 +--- a/drivers/net/ethernet/smsc/smc911x.c
362 ++++ b/drivers/net/ethernet/smsc/smc911x.c
363 +@@ -2057,6 +2057,11 @@ static int smc911x_drv_probe(struct platform_device *pdev)
364 +
365 + ndev->dma = (unsigned char)-1;
366 + ndev->irq = platform_get_irq(pdev, 0);
367 ++ if (ndev->irq < 0) {
368 ++ ret = ndev->irq;
369 ++ goto release_both;
370 ++ }
371 ++
372 + lp = netdev_priv(ndev);
373 + lp->netdev = ndev;
374 + #ifdef SMC_DYNAMIC_BUS_CONFIG
375 +diff --git a/drivers/net/hamradio/mkiss.c b/drivers/net/hamradio/mkiss.c
376 +index 078eb110381c2..8249da1db53d1 100644
377 +--- a/drivers/net/hamradio/mkiss.c
378 ++++ b/drivers/net/hamradio/mkiss.c
379 +@@ -803,13 +803,14 @@ static void mkiss_close(struct tty_struct *tty)
380 + */
381 + netif_stop_queue(ax->dev);
382 +
383 +- /* Free all AX25 frame buffers. */
384 ++ unregister_netdev(ax->dev);
385 ++
386 ++ /* Free all AX25 frame buffers after unreg. */
387 + kfree(ax->rbuff);
388 + kfree(ax->xbuff);
389 +
390 + ax->tty = NULL;
391 +
392 +- unregister_netdev(ax->dev);
393 + free_netdev(ax->dev);
394 + }
395 +
396 +diff --git a/drivers/net/usb/lan78xx.c b/drivers/net/usb/lan78xx.c
397 +index ca3c7a4402a1b..08c5c68057dac 100644
398 +--- a/drivers/net/usb/lan78xx.c
399 ++++ b/drivers/net/usb/lan78xx.c
400 +@@ -66,6 +66,8 @@
401 + #define LAN7850_USB_PRODUCT_ID (0x7850)
402 + #define LAN78XX_EEPROM_MAGIC (0x78A5)
403 + #define LAN78XX_OTP_MAGIC (0x78F3)
404 ++#define AT29M2AF_USB_VENDOR_ID (0x07C9)
405 ++#define AT29M2AF_USB_PRODUCT_ID (0x0012)
406 +
407 + #define MII_READ 1
408 + #define MII_WRITE 0
409 +@@ -3334,6 +3336,10 @@ static const struct usb_device_id products[] = {
410 + /* LAN7850 USB Gigabit Ethernet Device */
411 + USB_DEVICE(LAN78XX_USB_VENDOR_ID, LAN7850_USB_PRODUCT_ID),
412 + },
413 ++ {
414 ++ /* ATM2-AF USB Gigabit Ethernet Device */
415 ++ USB_DEVICE(AT29M2AF_USB_VENDOR_ID, AT29M2AF_USB_PRODUCT_ID),
416 ++ },
417 + {},
418 + };
419 + MODULE_DEVICE_TABLE(usb, products);
420 +diff --git a/net/ax25/af_ax25.c b/net/ax25/af_ax25.c
421 +index 64fede18aa33f..f4c8567e91b38 100644
422 +--- a/net/ax25/af_ax25.c
423 ++++ b/net/ax25/af_ax25.c
424 +@@ -88,8 +88,10 @@ static void ax25_kill_by_device(struct net_device *dev)
425 + again:
426 + ax25_for_each(s, &ax25_list) {
427 + if (s->ax25_dev == ax25_dev) {
428 +- s->ax25_dev = NULL;
429 + spin_unlock_bh(&ax25_list_lock);
430 ++ lock_sock(s->sk);
431 ++ s->ax25_dev = NULL;
432 ++ release_sock(s->sk);
433 + ax25_disconnect(s, ENETUNREACH);
434 + spin_lock_bh(&ax25_list_lock);
435 +
436 +diff --git a/net/phonet/pep.c b/net/phonet/pep.c
437 +index f6aa532bcbf64..1e7945df39928 100644
438 +--- a/net/phonet/pep.c
439 ++++ b/net/phonet/pep.c
440 +@@ -956,6 +956,8 @@ static int pep_ioctl(struct sock *sk, int cmd, unsigned long arg)
441 + ret = -EBUSY;
442 + else if (sk->sk_state == TCP_ESTABLISHED)
443 + ret = -EISCONN;
444 ++ else if (!pn->pn_sk.sobject)
445 ++ ret = -EADDRNOTAVAIL;
446 + else
447 + ret = pep_sock_enable(sk, NULL, 0);
448 + release_sock(sk);
449 +diff --git a/sound/core/jack.c b/sound/core/jack.c
450 +index 7237acbdcbbc8..fcc972fbe8ffd 100644
451 +--- a/sound/core/jack.c
452 ++++ b/sound/core/jack.c
453 +@@ -227,6 +227,10 @@ int snd_jack_new(struct snd_card *card, const char *id, int type,
454 + return -ENOMEM;
455 +
456 + jack->id = kstrdup(id, GFP_KERNEL);
457 ++ if (jack->id == NULL) {
458 ++ kfree(jack);
459 ++ return -ENOMEM;
460 ++ }
461 +
462 + /* don't creat input device for phantom jack */
463 + if (!phantom_jack) {
464 +diff --git a/sound/drivers/opl3/opl3_midi.c b/sound/drivers/opl3/opl3_midi.c
465 +index 7821b07415a78..ff67c4b67e264 100644
466 +--- a/sound/drivers/opl3/opl3_midi.c
467 ++++ b/sound/drivers/opl3/opl3_midi.c
468 +@@ -415,7 +415,7 @@ void snd_opl3_note_on(void *p, int note, int vel, struct snd_midi_channel *chan)
469 + }
470 + if (instr_4op) {
471 + vp2 = &opl3->voices[voice + 3];
472 +- if (vp->state > 0) {
473 ++ if (vp2->state > 0) {
474 + opl3_reg = reg_side | (OPL3_REG_KEYON_BLOCK +
475 + voice_offset + 3);
476 + reg_val = vp->keyon_reg & ~OPL3_KEYON_BIT;