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, 21 Nov 2018 15:02:34
Message-Id: 1542812467.afa2193eb1429235ff8be67c8ede22f599df5b49.mpagano@gentoo
1 commit: afa2193eb1429235ff8be67c8ede22f599df5b49
2 Author: Mike Pagano <mpagano <AT> gentoo <DOT> org>
3 AuthorDate: Thu Aug 9 10:49:24 2018 +0000
4 Commit: Mike Pagano <mpagano <AT> gentoo <DOT> org>
5 CommitDate: Wed Nov 21 15:01:07 2018 +0000
6 URL: https://gitweb.gentoo.org/proj/linux-patches.git/commit/?id=afa2193e
7
8 Linux patch 4.4.147
9
10 Signed-off-by: Mike Pagano <mpagano <AT> gentoo.org>
11
12 0000_README | 4 +
13 1146_linux-4.4.147.patch | 254 +++++++++++++++++++++++++++++++++++++++++++++++
14 2 files changed, 258 insertions(+)
15
16 diff --git a/0000_README b/0000_README
17 index 330fae0..84033e9 100644
18 --- a/0000_README
19 +++ b/0000_README
20 @@ -627,6 +627,10 @@ Patch: 1145_linux-4.4.146.patch
21 From: http://www.kernel.org
22 Desc: Linux 4.4.146
23
24 +Patch: 1146_linux-4.4.147.patch
25 +From: http://www.kernel.org
26 +Desc: Linux 4.4.147
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/1146_linux-4.4.147.patch b/1146_linux-4.4.147.patch
33 new file mode 100644
34 index 0000000..5731153
35 --- /dev/null
36 +++ b/1146_linux-4.4.147.patch
37 @@ -0,0 +1,254 @@
38 +diff --git a/Makefile b/Makefile
39 +index 030f5af05f4e..ee92a12e3a4b 100644
40 +--- a/Makefile
41 ++++ b/Makefile
42 +@@ -1,6 +1,6 @@
43 + VERSION = 4
44 + PATCHLEVEL = 4
45 +-SUBLEVEL = 146
46 ++SUBLEVEL = 147
47 + EXTRAVERSION =
48 + NAME = Blurry Fish Butt
49 +
50 +diff --git a/drivers/i2c/busses/i2c-imx.c b/drivers/i2c/busses/i2c-imx.c
51 +index d4d853680ae4..a4abf7dc9576 100644
52 +--- a/drivers/i2c/busses/i2c-imx.c
53 ++++ b/drivers/i2c/busses/i2c-imx.c
54 +@@ -382,6 +382,7 @@ static int i2c_imx_dma_xfer(struct imx_i2c_struct *i2c_imx,
55 + goto err_desc;
56 + }
57 +
58 ++ reinit_completion(&dma->cmd_complete);
59 + txdesc->callback = i2c_imx_dma_callback;
60 + txdesc->callback_param = i2c_imx;
61 + if (dma_submit_error(dmaengine_submit(txdesc))) {
62 +@@ -631,7 +632,6 @@ static int i2c_imx_dma_write(struct imx_i2c_struct *i2c_imx,
63 + * The first byte must be transmitted by the CPU.
64 + */
65 + imx_i2c_write_reg(msgs->addr << 1, i2c_imx, IMX_I2C_I2DR);
66 +- reinit_completion(&i2c_imx->dma->cmd_complete);
67 + time_left = wait_for_completion_timeout(
68 + &i2c_imx->dma->cmd_complete,
69 + msecs_to_jiffies(DMA_TIMEOUT));
70 +@@ -690,7 +690,6 @@ static int i2c_imx_dma_read(struct imx_i2c_struct *i2c_imx,
71 + if (result)
72 + return result;
73 +
74 +- reinit_completion(&i2c_imx->dma->cmd_complete);
75 + time_left = wait_for_completion_timeout(
76 + &i2c_imx->dma->cmd_complete,
77 + msecs_to_jiffies(DMA_TIMEOUT));
78 +diff --git a/drivers/pci/pci-acpi.c b/drivers/pci/pci-acpi.c
79 +index a32ba753e413..afaf13474796 100644
80 +--- a/drivers/pci/pci-acpi.c
81 ++++ b/drivers/pci/pci-acpi.c
82 +@@ -543,7 +543,7 @@ void acpi_pci_add_bus(struct pci_bus *bus)
83 + union acpi_object *obj;
84 + struct pci_host_bridge *bridge;
85 +
86 +- if (acpi_pci_disabled || !bus->bridge)
87 ++ if (acpi_pci_disabled || !bus->bridge || !ACPI_HANDLE(bus->bridge))
88 + return;
89 +
90 + acpi_pci_slot_enumerate(bus);
91 +diff --git a/drivers/scsi/qla2xxx/qla_init.c b/drivers/scsi/qla2xxx/qla_init.c
92 +index a9eb3cd453be..41a646696bab 100644
93 +--- a/drivers/scsi/qla2xxx/qla_init.c
94 ++++ b/drivers/scsi/qla2xxx/qla_init.c
95 +@@ -325,11 +325,10 @@ qla2x00_async_tm_cmd(fc_port_t *fcport, uint32_t flags, uint32_t lun,
96 +
97 + wait_for_completion(&tm_iocb->u.tmf.comp);
98 +
99 +- rval = tm_iocb->u.tmf.comp_status == CS_COMPLETE ?
100 +- QLA_SUCCESS : QLA_FUNCTION_FAILED;
101 ++ rval = tm_iocb->u.tmf.data;
102 +
103 +- if ((rval != QLA_SUCCESS) || tm_iocb->u.tmf.data) {
104 +- ql_dbg(ql_dbg_taskm, vha, 0x8030,
105 ++ if (rval != QLA_SUCCESS) {
106 ++ ql_log(ql_log_warn, vha, 0x8030,
107 + "TM IOCB failed (%x).\n", rval);
108 + }
109 +
110 +diff --git a/drivers/scsi/qla2xxx/qla_os.c b/drivers/scsi/qla2xxx/qla_os.c
111 +index 5cbf20ab94aa..18b19744398a 100644
112 +--- a/drivers/scsi/qla2xxx/qla_os.c
113 ++++ b/drivers/scsi/qla2xxx/qla_os.c
114 +@@ -4938,8 +4938,9 @@ qla2x00_do_dpc(void *data)
115 + }
116 + }
117 +
118 +- if (test_and_clear_bit(ISP_ABORT_NEEDED,
119 +- &base_vha->dpc_flags)) {
120 ++ if (test_and_clear_bit
121 ++ (ISP_ABORT_NEEDED, &base_vha->dpc_flags) &&
122 ++ !test_bit(UNLOADING, &base_vha->dpc_flags)) {
123 +
124 + ql_dbg(ql_dbg_dpc, base_vha, 0x4007,
125 + "ISP abort scheduled.\n");
126 +diff --git a/fs/ext4/super.c b/fs/ext4/super.c
127 +index 49af3c50b263..3e4d8ac1974e 100644
128 +--- a/fs/ext4/super.c
129 ++++ b/fs/ext4/super.c
130 +@@ -2102,7 +2102,7 @@ static int ext4_check_descriptors(struct super_block *sb,
131 + struct ext4_sb_info *sbi = EXT4_SB(sb);
132 + ext4_fsblk_t first_block = le32_to_cpu(sbi->s_es->s_first_data_block);
133 + ext4_fsblk_t last_block;
134 +- ext4_fsblk_t last_bg_block = sb_block + ext4_bg_num_gdb(sb, 0) + 1;
135 ++ ext4_fsblk_t last_bg_block = sb_block + ext4_bg_num_gdb(sb, 0);
136 + ext4_fsblk_t block_bitmap;
137 + ext4_fsblk_t inode_bitmap;
138 + ext4_fsblk_t inode_table;
139 +@@ -3777,13 +3777,13 @@ static int ext4_fill_super(struct super_block *sb, void *data, int silent)
140 + goto failed_mount2;
141 + }
142 + }
143 ++ sbi->s_gdb_count = db_count;
144 + if (!ext4_check_descriptors(sb, logical_sb_block, &first_not_zeroed)) {
145 + ext4_msg(sb, KERN_ERR, "group descriptors corrupted!");
146 + ret = -EFSCORRUPTED;
147 + goto failed_mount2;
148 + }
149 +
150 +- sbi->s_gdb_count = db_count;
151 + get_random_bytes(&sbi->s_next_generation, sizeof(u32));
152 + spin_lock_init(&sbi->s_next_gen_lock);
153 +
154 +diff --git a/fs/jfs/xattr.c b/fs/jfs/xattr.c
155 +index 48b15a6e5558..40a26a542341 100644
156 +--- a/fs/jfs/xattr.c
157 ++++ b/fs/jfs/xattr.c
158 +@@ -493,15 +493,17 @@ static int ea_get(struct inode *inode, struct ea_buffer *ea_buf, int min_size)
159 + if (size > PSIZE) {
160 + /*
161 + * To keep the rest of the code simple. Allocate a
162 +- * contiguous buffer to work with
163 ++ * contiguous buffer to work with. Make the buffer large
164 ++ * enough to make use of the whole extent.
165 + */
166 +- ea_buf->xattr = kmalloc(size, GFP_KERNEL);
167 ++ ea_buf->max_size = (size + sb->s_blocksize - 1) &
168 ++ ~(sb->s_blocksize - 1);
169 ++
170 ++ ea_buf->xattr = kmalloc(ea_buf->max_size, GFP_KERNEL);
171 + if (ea_buf->xattr == NULL)
172 + return -ENOMEM;
173 +
174 + ea_buf->flag = EA_MALLOC;
175 +- ea_buf->max_size = (size + sb->s_blocksize - 1) &
176 +- ~(sb->s_blocksize - 1);
177 +
178 + if (ea_size == 0)
179 + return 0;
180 +diff --git a/include/linux/ring_buffer.h b/include/linux/ring_buffer.h
181 +index 4acc552e9279..19d0778ec382 100644
182 +--- a/include/linux/ring_buffer.h
183 ++++ b/include/linux/ring_buffer.h
184 +@@ -162,6 +162,7 @@ void ring_buffer_record_enable(struct ring_buffer *buffer);
185 + void ring_buffer_record_off(struct ring_buffer *buffer);
186 + void ring_buffer_record_on(struct ring_buffer *buffer);
187 + int ring_buffer_record_is_on(struct ring_buffer *buffer);
188 ++int ring_buffer_record_is_set_on(struct ring_buffer *buffer);
189 + void ring_buffer_record_disable_cpu(struct ring_buffer *buffer, int cpu);
190 + void ring_buffer_record_enable_cpu(struct ring_buffer *buffer, int cpu);
191 +
192 +diff --git a/kernel/irq/manage.c b/kernel/irq/manage.c
193 +index 5f55a8bf5264..0df2b44dac7c 100644
194 +--- a/kernel/irq/manage.c
195 ++++ b/kernel/irq/manage.c
196 +@@ -1012,6 +1012,13 @@ static int irq_setup_forced_threading(struct irqaction *new)
197 + if (new->flags & (IRQF_NO_THREAD | IRQF_PERCPU | IRQF_ONESHOT))
198 + return 0;
199 +
200 ++ /*
201 ++ * No further action required for interrupts which are requested as
202 ++ * threaded interrupts already
203 ++ */
204 ++ if (new->handler == irq_default_primary_handler)
205 ++ return 0;
206 ++
207 + new->flags |= IRQF_ONESHOT;
208 +
209 + /*
210 +@@ -1019,7 +1026,7 @@ static int irq_setup_forced_threading(struct irqaction *new)
211 + * thread handler. We force thread them as well by creating a
212 + * secondary action.
213 + */
214 +- if (new->handler != irq_default_primary_handler && new->thread_fn) {
215 ++ if (new->handler && new->thread_fn) {
216 + /* Allocate the secondary action */
217 + new->secondary = kzalloc(sizeof(struct irqaction), GFP_KERNEL);
218 + if (!new->secondary)
219 +diff --git a/kernel/time/tick-sched.c b/kernel/time/tick-sched.c
220 +index e5d228f7224c..5ad2e852e9f6 100644
221 +--- a/kernel/time/tick-sched.c
222 ++++ b/kernel/time/tick-sched.c
223 +@@ -570,7 +570,7 @@ static void tick_nohz_restart(struct tick_sched *ts, ktime_t now)
224 +
225 + static inline bool local_timer_softirq_pending(void)
226 + {
227 +- return local_softirq_pending() & TIMER_SOFTIRQ;
228 ++ return local_softirq_pending() & BIT(TIMER_SOFTIRQ);
229 + }
230 +
231 + static ktime_t tick_nohz_stop_sched_tick(struct tick_sched *ts,
232 +diff --git a/kernel/trace/ring_buffer.c b/kernel/trace/ring_buffer.c
233 +index d9cd6191760b..fdaa88f38aec 100644
234 +--- a/kernel/trace/ring_buffer.c
235 ++++ b/kernel/trace/ring_buffer.c
236 +@@ -3141,6 +3141,22 @@ int ring_buffer_record_is_on(struct ring_buffer *buffer)
237 + return !atomic_read(&buffer->record_disabled);
238 + }
239 +
240 ++/**
241 ++ * ring_buffer_record_is_set_on - return true if the ring buffer is set writable
242 ++ * @buffer: The ring buffer to see if write is set enabled
243 ++ *
244 ++ * Returns true if the ring buffer is set writable by ring_buffer_record_on().
245 ++ * Note that this does NOT mean it is in a writable state.
246 ++ *
247 ++ * It may return true when the ring buffer has been disabled by
248 ++ * ring_buffer_record_disable(), as that is a temporary disabling of
249 ++ * the ring buffer.
250 ++ */
251 ++int ring_buffer_record_is_set_on(struct ring_buffer *buffer)
252 ++{
253 ++ return !(atomic_read(&buffer->record_disabled) & RB_BUFFER_OFF);
254 ++}
255 ++
256 + /**
257 + * ring_buffer_record_disable_cpu - stop all writes into the cpu_buffer
258 + * @buffer: The ring buffer to stop writes to.
259 +diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c
260 +index 8aef4e63ac57..1b980a8ef791 100644
261 +--- a/kernel/trace/trace.c
262 ++++ b/kernel/trace/trace.c
263 +@@ -1088,6 +1088,12 @@ update_max_tr(struct trace_array *tr, struct task_struct *tsk, int cpu)
264 +
265 + arch_spin_lock(&tr->max_lock);
266 +
267 ++ /* Inherit the recordable setting from trace_buffer */
268 ++ if (ring_buffer_record_is_set_on(tr->trace_buffer.buffer))
269 ++ ring_buffer_record_on(tr->max_buffer.buffer);
270 ++ else
271 ++ ring_buffer_record_off(tr->max_buffer.buffer);
272 ++
273 + buf = tr->trace_buffer.buffer;
274 + tr->trace_buffer.buffer = tr->max_buffer.buffer;
275 + tr->max_buffer.buffer = buf;
276 +diff --git a/net/netlink/af_netlink.c b/net/netlink/af_netlink.c
277 +index 9708fff318d5..bf292010760a 100644
278 +--- a/net/netlink/af_netlink.c
279 ++++ b/net/netlink/af_netlink.c
280 +@@ -986,6 +986,11 @@ static int netlink_bind(struct socket *sock, struct sockaddr *addr,
281 + return err;
282 + }
283 +
284 ++ if (nlk->ngroups == 0)
285 ++ groups = 0;
286 ++ else if (nlk->ngroups < 8*sizeof(groups))
287 ++ groups &= (1UL << nlk->ngroups) - 1;
288 ++
289 + bound = nlk->bound;
290 + if (bound) {
291 + /* Ensure nlk->portid is up-to-date. */