3.0.8-stable review
Subsystems (24)
cover 3.0.8-stable review
This is the start of the stable review cycle for the 3.0.8 release. There are @num@ patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let us know. If anyone is a maintainer of the proper subsystem, and wants to add a Signed-off-by: line to the patch, please respond with it.
Responses should be made by Tuesday, Oct 25 07:00:00 UTC 2011 Anything received after that time might be too late.
The whole patch series can be found in one patch at:
kernel.org/pub/linux/kernel/v3.0/stable-review/patch-3.0.8-rc1.gz
and the diffstat can be found below.
thanks,
greg k-h
Makefile | 4 +- arch/arm/kernel/perf_event_v7.c | 4 +- arch/arm/mm/init.c | 7 ++ crypto/ghash-generic.c | 6 + drivers/firewire/sbp2.c | 4 + drivers/gpu/drm/radeon/atom.c | 15 +++- drivers/gpu/drm/radeon/atom.h | 1 + drivers/gpu/drm/ttm/ttm_bo.c | 10 +- drivers/gpu/drm/ttm/ttm_bo_util.c | 2 +- drivers/hid/hid-ids.h | 3 + drivers/hid/hid-magicmouse.c | 10 ++- drivers/hid/usbhid/hid-quirks.c | 1 + drivers/hwmon/w83627ehf.c | 15 ++- drivers/media/video/uvc/uvc_entity.c | 2 +- drivers/platform/x86/samsung-laptop.c | 10 ++ fs/cifs/cifsfs.c | 10 +- fs/fuse/dev.c | 12 ++- fs/hfsplus/hfsplus_fs.h | 16 +++- fs/hfsplus/part_tbl.c | 32 +++--- fs/hfsplus/super.c | 12 +- fs/hfsplus/wrapper.c | 83 +++++++++++---- fs/namei.c | 24 +++-- fs/xfs/linux-2.6/xfs_linux.h | 2 + fs/xfs/linux-2.6/xfs_super.c | 48 +++------ fs/xfs/quota/xfs_dquot_item.c | 10 ++- fs/xfs/xfs_buf_item.c | 3 +- fs/xfs/xfs_inode_item.c | 10 ++- fs/xfs/xfs_trans.c | 27 ++++- fs/xfs/xfs_trans.h | 2 +- fs/xfs/xfs_trans_ail.c | 192 +++++++++++++++++++++++---------- fs/xfs/xfs_trans_priv.h | 18 ++-- kernel/posix-cpu-timers.c | 7 +- kernel/sys.c | 2 +- mm/migrate.c | 8 +- net/x25/af_x25.c | 3 +- sound/pci/hda/hda_intel.c | 1 + sound/pci/hda/patch_conexant.c | 1 + 37 files changed, 421 insertions(+), 196 deletions(-)
PATCH 1/27 ARM: 7113/1: mm: Align bank start to MAX_ORDER_NR_PAGES
3.0-stable review patch. If anyone has any objections, please let us know.
------------------
From: Linus Walleij <[email protected]>
commit 002ea9eefec98dada56fd5f8e432a4e8570c2a26 upstream.
The VM subsystem assumes that there are valid memmap entries from the bank start aligned to MAX_ORDER_NR_PAGES.
On the Ux500 we have a lot of mem=N arguments on the commandline triggering this bug several times over and causing kernel oops messages.
--- arch/arm/mm/init.c | 7 +++++++ 1 file changed, 7 insertions(+)
arch/arm/mm/init.c +7 -0
@@ -473,6 +473,13 @@ static void __init free_unused_memmap(st*/ bank_start =min (bank_start,ALIGN (prev_bank_end,PAGES_PER_SECTION )); +#else +/* +* Align down here since the VM subsystem insists that the +* memmap entries are valid from the bank start aligned to +* MAX_ORDER_NR_PAGES. +*/ + bank_start =round_down (bank_start,MAX_ORDER_NR_PAGES );#endif /* * If we had a previous bank, and there is a space
PATCH 2/27 ARM: 7117/1: perf: fix HW_CACHE_* events on Cortex-A9
In reply to Greg KH3.0-stable review patch. If anyone has any objections, please let us know.
------------------
From: Will Deacon <[email protected]>
commit 29a541f6c1f6e4a85628bb86071b9e72c9f8be2c upstream.
Using COHERENT_LINE_{MISS,HIT} for cache misses and references respectively is completely wrong. Instead, use the L1D events which are a better and more useful approximation despite ignoring instruction traffic.
--- arch/arm/kernel/perf_event_v7.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
arch/arm/kernel/perf_event_v7.c +2 -2
@@ -264,8 +264,8 @@ static const unsigned armv7_a9_perf_map[ [PERF_COUNT_HW_CPU_CYCLES] = ARMV7_PERFCTR_CPU_CYCLES, [PERF_COUNT_HW_INSTRUCTIONS ] = ARMV7_PERFCTR_INST_OUT_OF_RENAME_STAGE, - [PERF_COUNT_HW_CACHE_REFERENCES] = ARMV7_PERFCTR_COHERENT_LINE_HIT, - [PERF_COUNT_HW_CACHE_MISSES] = ARMV7_PERFCTR_COHERENT_LINE_MISS, + [PERF_COUNT_HW_CACHE_REFERENCES] = ARMV7_PERFCTR_DCACHE_ACCESS, + [PERF_COUNT_HW_CACHE_MISSES] = ARMV7_PERFCTR_DCACHE_REFILL, [PERF_COUNT_HW_BRANCH_INSTRUCTIONS] = ARMV7_PERFCTR_PC_WRITE, [PERF_COUNT_HW_BRANCH_MISSES] = ARMV7_PERFCTR_PC_BRANCH_MIS_PRED, [PERF_COUNT_HW_BUS_CYCLES] = ARMV7_PERFCTR_CLOCK_CYCLES,
PATCH 3/27 HID: usbhid: Add support for SiGma Micro chip
In reply to Greg KH3.0-stable review patch. If anyone has any objections, please let us know.
------------------
From: Jeremiah Matthey <[email protected]>
commit f5e4282586dc0c9dab8c7d32e6c43aa07f68586b upstream.
Patch to add SiGma Micro-based keyboards (1c4f:0002) to hid-quirks.
These keyboards dont seem to allow the records to be initialized, and hence a timeout occurs when the usbhid driver attempts to initialize them. The patch just adds the signature for these keyboards to the hid-quirks list with the setting HID_QUIRK_NO_INIT_REPORTS. This removes the 5-10 second wait for the timeout to occur.
--- drivers/hid/hid-ids.h | 3 +++ drivers/hid/usbhid/hid-quirks.c | 1 + 2 files changed, 4 insertions(+)
drivers/hid/hid-ids.h +3 -0
@@ -568,6 +568,9 @@#define USB_DEVICE_ID_SAMSUNG_IR_REMOTE 0x0001#define USB_DEVICE_ID_SAMSUNG_WIRELESS_KBD_MOUSE 0x0600 +#define USB_VENDOR_ID_SIGMA_MICRO 0x1c4f +#define USB_DEVICE_ID_SIGMA_MICRO_KEYBOARD 0x0002 +#define USB_VENDOR_ID_SKYCABLE 0x1223#define USB_DEVICE_ID_SKYCABLE_WIRELESS_PRESENTER 0x3F07
drivers/hid/usbhid/hid-quirks.c +1 -0
@@ -89,6 +89,7 @@ static const struct hid_blacklist { { USB_VENDOR_ID_CHICONY, USB_DEVICE_ID_CHICONY_MULTI_TOUCH, HID_QUIRK_MULTI_INPUT }, { USB_VENDOR_ID_CHICONY, USB_DEVICE_ID_CHICONY_WIRELESS, HID_QUIRK_MULTI_INPUT }, + { USB_VENDOR_ID_SIGMA_MICRO, USB_DEVICE_ID_SIGMA_MICRO_KEYBOARD, HID_QUIRK_NO_INIT_REPORTS }, { 0, 0 } };
PATCH 4/27 hwmon: (w83627ehf) Properly report thermal diode sensors
In reply to Greg KH3.0-stable review patch. If anyone has any objections, please let us know.
------------------
From: Jean Delvare <[email protected]>
commit bf164c58e58328c40ebc597a8ac00cc6840f9703 upstream.
The w83627ehf driver is improperly reporting thermal diode sensors as type 2, instead of 3. This caused "sensors" and possibly other monitoring tools to report these sensors as "transistor" instead of "thermal diode".
Furthermore, diode subtype selection (CPU vs. external) is only supported by the original W83627EHF/EHG. All later models only support CPU diode type, and some (NCT6776F) don't even have the register in question so we should avoid reading from it.
--- drivers/hwmon/w83627ehf.c | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-)
drivers/hwmon/w83627ehf.c +11 -4
@@ -1715,7 +1715,8 @@ static void w83627ehf_device_remove_file }/* Get the monitoring functions started */ -static inline void __devinit w83627ehf_init_device (struct w83627ehf_data *data) +static inline void __devinit w83627ehf_init_device (struct w83627ehf_data *data, +enum kinds kind) {int i;u8 tmp, diode;
@@ -1746,10 +1747,16 @@ static inline void __devinit w83627ehf_iw83627ehf_write_value (data,W83627EHF_REG_VBAT , tmp |0x01 );/* Get thermal sensor types */ - diode =w83627ehf_read_value (data,W83627EHF_REG_DIODE ); +switch (kind) { +case w83627ehf: + diode =w83627ehf_read_value (data,W83627EHF_REG_DIODE ); +break ; +default : + diode =0x70 ; + }for (i =0 ; i <3 ; i++) {if ((tmp & (0x02 << i))) - data->temp_type[i] = (diode & (0x10 << i)) ?1 :2 ; + data->temp_type[i] = (diode & (0x10 << i)) ?1 :3 ;else data->temp_type[i] =4 ;/* thermistor */ }
@@ -2016,7 +2023,7 @@ static int __devinit w83627ehf_probe(str }/* Initialize the chip */ -w83627ehf_init_device (data); +w83627ehf_init_device (data, sio_data->kind); data->vrm =vid_which_vrm ();superio_enter (sio_data->sioreg);
PATCH 5/27 Avoid using variable-length arrays in kernel/sys.c
In reply to Greg KH3.0-stable review patch. If anyone has any objections, please let us know.
------------------
From: Linus Torvalds <[email protected]>
commit a84a79e4d369a73c0130b5858199e949432da4c6 upstream.
The size is always valid, but variable-length arrays generate worse code for no good reason (unless the function happens to be inlined and the compiler sees the length for the simple constant it is).
Also, there seems to be some code generation problem on POWER, where Henrik Bakken reports that register r28 can get corrupted under some subtle circumstances (interrupt happening at the wrong time?). That all indicates some seriously broken compiler issues, but since variable length arrays are bad regardless, there's little point in trying to chase it down.
"Just don't do that, then".
--- kernel/sys.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
kernel/sys.c +1 -1
@@ -1135,7 +1135,7 @@ DECLARE_RWSEM(uts_sem);static int override_release (char __user *release,int len) {int ret =0 ; -char buf[len]; +char buf[65 ];if (current->personality &UNAME26 ) {char *rest =UTS_RELEASE ;
PATCH 6/27 drm/radeon/kms/atom: fix handling of FB scratch indices
In reply to Greg KH3.0-stable review patch. If anyone has any objections, please let us know.
------------------
From: Alex Deucher <[email protected]>
commit 5a6e8482a16e61250a9121fc9ec719ab0529e760 upstream.
FB scratch indices are dword indices, but we were treating them as byte indices. As such, we were getting the wrong FB scratch data for non-0 indices. Fix the indices and guard the indexing against indices larger than the scratch allocation.
Fixes memory corruption on some boards if data was written past the end of the FB scratch array.
--- drivers/gpu/drm/radeon/atom.c | 15 +++++++++++++-- drivers/gpu/drm/radeon/atom.h | 1 + 2 files changed, 14 insertions(+), 2 deletions(-)
drivers/gpu/drm/radeon/atom.c +13 -2
@@ -277,7 +277,12 @@ static uint32_t atom_get_src_int(atom_excase ATOM_ARG_FB : idx =U8 (*ptr); (*ptr)++; - val = gctx->scratch[((gctx->fb_base + idx) /4 )]; +if ((gctx->fb_base + (idx *4 )) > gctx->scratch_size_bytes) { +DRM_ERROR ("ATOM: fb read beyond scratch region: %d vs. %d\n" , + gctx->fb_base + (idx *4 ), gctx->scratch_size_bytes); + val =0 ; + }else + val = gctx->scratch[(gctx->fb_base /4 ) + idx];if (print)DEBUG ("FB[0x%02X]" , idx);break ;
@@ -531,7 +536,11 @@ static void atom_put_dst(atom_exec_contecase ATOM_ARG_FB : idx =U8 (*ptr); (*ptr)++; - gctx->scratch[((gctx->fb_base + idx) /4 )] = val; +if ((gctx->fb_base + (idx *4 )) > gctx->scratch_size_bytes) { +DRM_ERROR ("ATOM: fb write beyond scratch region: %d vs. %d\n" , + gctx->fb_base + (idx *4 ), gctx->scratch_size_bytes); + }else + gctx->scratch[(gctx->fb_base /4 ) + idx] = val;DEBUG ("FB[0x%02X]" , idx);break ;case ATOM_ARG_PLL :
@@ -1367,11 +1376,13 @@ int atom_allocate_fb_scratch(struct atom usage_bytes = firmware_usage->asFirmwareVramReserveInfo[0 ].usFirmwareUseInKb *1024 ; } + ctx->scratch_size_bytes =0 ;if (usage_bytes ==0 ) usage_bytes =20 *1024 ;/* allocate some scratch memory */ ctx->scratch =kzalloc (usage_bytes,GFP_KERNEL );if (!ctx->scratch)return -ENOMEM ; + ctx->scratch_size_bytes = usage_bytes;return 0 ; }
drivers/gpu/drm/radeon/atom.h +1 -0
@@ -137,6 +137,7 @@ struct atom_context {int cs_equal, cs_above;int io_mode;uint32_t *scratch; +int scratch_size_bytes; };extern int atom_debug;
PATCH 7/27 cputimer: Cure lock inversion
In reply to Greg KH3.0-stable review patch. If anyone has any objections, please let us know.
------------------
From: Peter Zijlstra <[email protected]>
commit bcd5cff7216f9b2de0a148cc355eac199dc6f1cf upstream.
There's a lock inversion between the cputimer->lock and rq->lock; notably the two callchains involved are:
update_rlimit_cpu()
sighand->siglock
set_process_cpu_timer()
cpu_timer_sample_group()
thread_group_cputimer()
cputimer->lock
thread_group_cputime()
task_sched_runtime()
->pi_lock
rq->lock scheduler_tick()
rq->lock
task_tick_fair()
update_curr()
account_group_exec()
cputimer->lockWhere the first one is enabling a CLOCK_PROCESS_CPUTIME_ID timer, and the second one is keeping up-to-date.
This problem was introduced by e8abccb7193 ("posix-cpu-timers: Cure SMP accounting oddities").
Cure the problem by removing the cputimer->lock and rq->lock nesting, this leaves concurrent enablers doing duplicate work, but the time wasted should be on the same order otherwise wasted spinning on the lock and the greater-than assignment filter should ensure we preserve monotonicity.
--- kernel/posix-cpu-timers.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-)
kernel/posix-cpu-timers.c +4 -3
@@ -274,9 +274,7 @@ void thread_group_cputimer(struct task_sstruct task_cputime sum;unsigned long flags; -spin_lock_irqsave (&cputimer->lock, flags);if (!cputimer->running) { - cputimer->running =1 ;/* * The POSIX timer interface allows for absolute time expiry * values through the TIMER_ABSTIME flag, therefore we have
@@ -284,8 +282,11 @@ void thread_group_cputimer(struct task_s* it. */ thread_group_cputime (tsk, &sum); +spin_lock_irqsave (&cputimer->lock, flags); + cputimer->running =1 ;update_gt_cputime (&cputimer->cputime, &sum); - } + }else +spin_lock_irqsave (&cputimer->lock, flags); *times = cputimer->cputime;spin_unlock_irqrestore (&cputimer->lock, flags); }
PATCH 8/27 fuse: fix memory leak
In reply to Greg KH3.0-stable review patch. If anyone has any objections, please let us know.
------------------
From: Miklos Szeredi <[email protected]>
commit 5dfcc87fd79dfb96ed155b524337dbd0da4f5993 upstream.
kmemleak is reporting that 32 bytes are being leaked by FUSE:
unreferenced object 0xe373b270 (size 32):
comm "fusermount", pid 1207, jiffies 4294707026 (age 2675.187s) hex dump (first 32 bytes):
01 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 ................
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
backtrace:
[<b05517d7>] kmemleak_alloc+0x27/0x50
[<b0196435>] kmem_cache_alloc+0xc5/0x180
[<b02455be>] fuse_alloc_forget+0x1e/0x20
[<b0245670>] fuse_alloc_inode+0xb0/0xd0
[<b01b1a8c>] alloc_inode+0x1c/0x80
[<b01b290f>] iget5_locked+0x8f/0x1a0
[<b0246022>] fuse_iget+0x72/0x1a0
[<b02461da>] fuse_get_root_inode+0x8a/0x90
[<b02465cf>] fuse_fill_super+0x3ef/0x590
[<b019e56f>] mount_nodev+0x3f/0x90
[<b0244e95>] fuse_mount+0x15/0x20
[<b019d1bc>] mount_fs+0x1c/0xc0
[<b01b5811>] vfs_kern_mount+0x41/0x90
[<b01b5af9>] do_kern_mount+0x39/0xd0
[<b01b7585>] do_mount+0x2e5/0x660
[<b01b7966>] sys_mount+0x66/0xa0This leak report is consistent and happens once per boot on 3.1.0-rc5-dirty.
This happens if a FORGET request is queued after the fuse device was released.
--- fs/fuse/dev.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-)
fs/fuse/dev.c +8 -4
@@ -258,10 +258,14 @@ void fuse_queue_forget(struct fuse_conn forget->forget_one.nlookup = nlookup;spin_lock (&fc->lock); - fc->forget_list_tail->next = forget; - fc->forget_list_tail = forget; -wake_up (&fc->waitq); -kill_fasync (&fc->fasync,SIGIO ,POLL_IN ); +if (fc->connected) { + fc->forget_list_tail->next = forget; + fc->forget_list_tail = forget; +wake_up (&fc->waitq); +kill_fasync (&fc->fasync,SIGIO ,POLL_IN ); + }else { +kfree (forget); + }spin_unlock (&fc->lock); }
PATCH 9/27 Platform: fix samsung-laptop DMI identification for N150/N210/220/N230
In reply to Greg KH3.0-stable review patch. If anyone has any objections, please let us know.
------------------
From: Thomas Courbon <[email protected]>
commit 78a7539b881eb557494a7c810625c0307b27296c upstream.
Some samsung latop of the N150/N2{10,20,30} serie are badly detected by the samsung-laptop platform driver, see bug # 36082. It appears that N230 identifies itself as N150/N210/N220/N230 whereas the other identify themselves as N150/N210/220. This patch attemtp fix #36082 allowing correct identification for all the said netbook model.
--- drivers/platform/x86/samsung-laptop.c | 10 ++++++++++ 1 file changed, 10 insertions(+)
drivers/platform/x86/samsung-laptop.c +10 -0
@@ -601,6 +601,16 @@ static struct dmi_system_id __initdata s .callback = dmi_check_cb, }, { + .ident = "N150/N210/N220", + .matches = { +DMI_MATCH (DMI_SYS_VENDOR , +"SAMSUNG ELECTRONICS CO., LTD." ), +DMI_MATCH (DMI_PRODUCT_NAME ,"N150/N210/N220" ), + DMI_MATCH(DMI_BOARD_NAME, "N150/N210/N220"), + }, + .callback = dmi_check_cb, + }, + { .ident ="N150/N210/N220/N230" , .matches = { DMI_MATCH(DMI_SYS_VENDOR,
PATCH 10/27 HID: magicmouse: ignore ivalid report id while switching modes, v2
In reply to Greg KH3.0-stable review patch. If anyone has any objections, please let us know.
------------------
From: Jiri Kosina <[email protected]>
commit 35d851df23b093ee027f827fed2213ae5e88fc7a upstream.
This is basically a more generic respin of 23746a6 ("HID: magicmouse: ignore 'ivalid report id' while switching modes") which got reverted later by c3a492.
It turns out that on some configurations, this is actually still the case and we are not able to detect in runtime.
The device reponds with 'invalid report id' when feature report switching it into multitouch mode is sent to it.
This has been silently ignored before 0825411ade ("HID: bt: Wait for ACK on Sent Reports"), but since this commit, it propagates -EIO from the _raw callback .
So let the driver ignore -EIO as response to 0xd7,0x01 report, as that's how the device reacts in normal mode.
Sad, but following reality.
This fixes https://bugzilla.kernel.org/show_bug.cgi?id=35022
--- drivers/hid/hid-magicmouse.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-)
drivers/hid/hid-magicmouse.c +9 -1
@@ -501,9 +501,17 @@ static int magicmouse_probe(struct hid_d } report->size =6 ; +/* +* Some devices repond with 'invalid report id' when feature +* report switching it into multitouch mode is sent to it. +* +* This results in -EIO from the _raw low-level transport callback, +* but there seems to be no other way of switching the mode. +* Thus the super-ugly hacky success check below. +*/ ret = hdev->hid_output_raw_report (hdev, feature,sizeof (feature),HID_FEATURE_REPORT ); -if (ret !=sizeof (feature)) { +if (ret != -EIO && ret !=sizeof (feature)) {hid_err (hdev,"unable to request touch data (%d)\n" , ret); goto err_stop_hw; }
PATCH 11/27 uvcvideo: Fix crash when linking entities
In reply to Greg KH3.0-stable review patch. If anyone has any objections, please let us know.
------------------
From: Laurent Pinchart <[email protected]>
commit 4d9b2ebd335d83044b9e6656d0e604e8e1300334 upstream.
The uvc_mc_register_entity() function wrongfully selects the media_entity associated with a UVC entity when creating links. This results in access to uninitialized media_entity structures and can hit a BUG_ON statement in media_entity_create_link(). Fix it.
--- drivers/media/video/uvc/uvc_entity.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/media/video/uvc/uvc_entity.c +1 -1
@@ -49,7 +49,7 @@ static int uvc_mc_register_entity(structif (remote ==NULL )return -EINVAL ; - source = (UVC_ENTITY_TYPE (remote) !=UVC_TT_STREAMING ) + source = (UVC_ENTITY_TYPE (remote) ==UVC_TT_STREAMING ) ? (remote->vdev ? &remote->vdev->entity :NULL ) : &remote->subdev.entity;if (source ==NULL )
PATCH 12/27 hfsplus: ensure bio requests are not smaller than the hardware sectors
In reply to Greg KH3.0-stable review patch. If anyone has any objections, please let us know.
------------------
From: Seth Forshee <[email protected]>
commit 6596528e391ad978a6a120142cba97a1d7324cb6 upstream.
Currently all bio requests are 512 bytes, which may fail for media whose physical sector size is larger than this. Ensure these requests are not smaller than the block device logical block size.
--- fs/hfsplus/hfsplus_fs.h | 16 ++++++++- fs/hfsplus/part_tbl.c | 32 ++++++++++-------- fs/hfsplus/super.c | 12 +++--- fs/hfsplus/wrapper.c | 83 ++++++++++++++++++++++++++++++++++++------------ 4 files changed, 101 insertions(+), 42 deletions(-)
fs/hfsplus/hfsplus_fs.h +14 -2
@@ -13,6 +13,7 @@#include <linux/fs.h> #include <linux/mutex.h> #include <linux/buffer_head.h> +#include <linux/blkdev.h> #include "hfsplus_raw.h" #define DBG_BNODE_REFS 0x00000001
@@ -110,7 +111,9 @@ struct hfsplus_vh;struct hfs_btree ;struct hfsplus_sb_info { +void *s_vhdr_buf;struct hfsplus_vh *s_vhdr; +void *s_backup_vhdr_buf;struct hfsplus_vh *s_backup_vhdr;struct hfs_btree *ext_tree;struct hfs_btree *cat_tree;
@@ -258,6 +261,15 @@ struct hfsplus_readdir_data {struct hfsplus_cat_key key; }; +/* +* Find minimum acceptible I/O size for an hfsplus sb. +*/ +static inline unsigned short hfsplus_min_io_size (struct super_block *sb) +{ + return max_t(unsigned short, bdev_logical_block_size(sb->s_bdev), +HFSPLUS_SECTOR_SIZE ); +} +#define hfs_btree_open hfsplus_btree_open#define hfs_btree_close hfsplus_btree_close#define hfs_btree_write hfsplus_btree_write
@@ -436,8 +448,8 @@ int hfsplus_compare_dentry(const struct/* wrapper.c */ int hfsplus_read_wrapper (struct super_block *);int hfs_part_find (struct super_block *,sector_t *,sector_t *); -int hfsplus_submit_bio (struct block_device *bdev,sector_t sector, -void *data,int rw); +int hfsplus_submit_bio (struct super_block *sb,sector_t sector, +void *buf,void **data,int rw);/* time macros */ #define __hfsp_mt2ut (t) (be32_to_cpu(t) - 2082844800U)
fs/hfsplus/part_tbl.c +18 -14
@@ -88,11 +88,12 @@ static int hfs_parse_old_pmap(struct supreturn -ENOENT ; } -static int hfs_parse_new_pmap (struct super_block *sb,struct new_pmap *pm, -sector_t *part_start,sector_t *part_size) +static int hfs_parse_new_pmap (struct super_block *sb,void *buf, +struct new_pmap *pm,sector_t *part_start,sector_t *part_size) {struct hfsplus_sb_info *sbi =HFSPLUS_SB (sb);int size =be32_to_cpu (pm->pmMapBlkCnt); +int buf_size =hfsplus_min_io_size (sb);int res;int i =0 ;
@@ -107,11 +108,14 @@ static int hfs_parse_new_pmap(struct supif (++i >= size)return -ENOENT ; - res =hfsplus_submit_bio (sb->s_bdev, - *part_start +HFS_PMAP_BLK + i, - pm,READ ); -if (res) -return res; + pm = (struct new_pmap *)((u8 *)pm +HFSPLUS_SECTOR_SIZE ); +if ((u8 *)pm - (u8 *)buf >= buf_size) { + res =hfsplus_submit_bio (sb, + *part_start +HFS_PMAP_BLK + i, + buf, (void **)&pm,READ ); +if (res) +return res; + } }while (pm->pmSig ==cpu_to_be16 (HFS_NEW_PMAP_MAGIC ));return -ENOENT ;
@@ -124,15 +128,15 @@ static int hfs_parse_new_pmap(struct supint hfs_part_find (struct super_block *sb,sector_t *part_start,sector_t *part_size) { -void *data; +void *buf, *data;int res; - data =kmalloc (HFSPLUS_SECTOR_SIZE ,GFP_KERNEL ); -if (!data) + buf =kmalloc (hfsplus_min_io_size (sb),GFP_KERNEL ); +if (!buf)return -ENOMEM ; - res =hfsplus_submit_bio (sb->s_bdev, *part_start +HFS_PMAP_BLK , - data,READ ); + res =hfsplus_submit_bio (sb, *part_start +HFS_PMAP_BLK , + buf, &data,READ );if (res) goto out;
@@ -141,13 +145,13 @@ int hfs_part_find(struct super_block *sb res =hfs_parse_old_pmap (sb, data, part_start, part_size);break ;case HFS_NEW_PMAP_MAGIC : - res =hfs_parse_new_pmap (sb, data, part_start, part_size); + res =hfs_parse_new_pmap (sb, buf, data, part_start, part_size);break ;default : res = -ENOENT ;break ; } out: -kfree (data); +kfree (buf);return res; }
fs/hfsplus/super.c +6 -6
@@ -197,17 +197,17 @@ int hfsplus_sync_fs(struct super_block * write_backup =1 ; } - error2 =hfsplus_submit_bio (sb->s_bdev, + error2 =hfsplus_submit_bio (sb, sbi->part_start +HFSPLUS_VOLHEAD_SECTOR , - sbi->s_vhdr,WRITE_SYNC ); + sbi->s_vhdr_buf,NULL ,WRITE_SYNC );if (!error) error = error2;if (!write_backup) goto out; - error2 =hfsplus_submit_bio (sb->s_bdev, + error2 =hfsplus_submit_bio (sb, sbi->part_start + sbi->sect_count -2 , - sbi->s_backup_vhdr,WRITE_SYNC ); + sbi->s_backup_vhdr_buf,NULL ,WRITE_SYNC );if (!error) error2 = error; out:
@@ -251,8 +251,8 @@ static void hfsplus_put_super(struct suphfs_btree_close (sbi->ext_tree);iput (sbi->alloc_file);iput (sbi->hidden_dir); -kfree (sbi->s_vhdr); -kfree (sbi->s_backup_vhdr); +kfree (sbi->s_vhdr_buf); +kfree (sbi->s_backup_vhdr_buf);unload_nls (sbi->nls);kfree (sb->s_fs_info); sb->s_fs_info =NULL ;
fs/hfsplus/wrapper.c +63 -20
122 lines not on this page · raw message
PATCH 13/27 drm/ttm: ensure ttm for new node is bound before calling move_notify()
In reply to Greg KH3.0-stable review patch. If anyone has any objections, please let us know.
------------------
From: Ben Skeggs <[email protected]>
commit 8d3bb23609d4ae22803a15d232289fc09a7b61c4 upstream.
This was true for new TTM_PL_SYSTEM and new TTM_PL_TT cases, but wasn't the case on TTM_PL_SYSTEM<->TTM_PL_TT moves, which causes trouble on some paths as nouveau's move_notify() hook requires that the dma addresses be valid at this point.
--- drivers/gpu/drm/ttm/ttm_bo.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-)
drivers/gpu/drm/ttm/ttm_bo.c +6 -4
@@ -392,10 +392,12 @@ static int ttm_bo_handle_move_mem(struct* Create and bind a ttm if required. */ -if (!(new_man->flags &TTM_MEMTYPE_FLAG_FIXED ) && (bo->ttm ==NULL )) { - ret =ttm_bo_add_ttm (bo, false); -if (ret) - goto out_err; +if (!(new_man->flags &TTM_MEMTYPE_FLAG_FIXED )) { +if (bo->ttm ==NULL ) { + ret =ttm_bo_add_ttm (bo, false); +if (ret) + goto out_err; + } ret =ttm_tt_set_placement_caching (bo->ttm, mem->placement);if (ret)
PATCH 14/27 drm/ttm: unbind ttm before destroying node in accel move cleanup
In reply to Greg KH3.0-stable review patch. If anyone has any objections, please let us know.
------------------
From: Ben Skeggs <[email protected]>
commit eac2095398668f989a3dd8d00be1b87850d78c01 upstream.
Nouveau makes the assumption that if a TTM is bound there will be a mm_node around for it and the backwards ordering here resulted in a use-after-free on some eviction paths.
--- drivers/gpu/drm/ttm/ttm_bo_util.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/ttm/ttm_bo_util.c +1 -1
@@ -635,13 +635,13 @@ int ttm_bo_move_accel_cleanup(struct ttmif (ret)return ret; -ttm_bo_free_old_node (bo);if ((man->flags &TTM_MEMTYPE_FLAG_FIXED ) && (bo->ttm !=NULL )) {ttm_tt_unbind (bo->ttm);ttm_tt_destroy (bo->ttm); bo->ttm =NULL ; } +ttm_bo_free_old_node (bo); }else {/** * This should help pipeline ordinary buffer moves.
PATCH 15/27 CIFS: Fix ERR_PTR dereference in cifs_get_root
In reply to Greg KH3.0-stable review patch. If anyone has any objections, please let us know.
------------------
From: Pavel Shilovsky <[email protected]>
commit 5b980b01212199833ee8023770fa4cbf1b85e9f4 upstream.
move it to the beginning of the loop.
--- fs/cifs/cifsfs.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-)
fs/cifs/cifsfs.c +6 -4
@@ -566,6 +566,12 @@ cifs_get_root(struct smb_vol *vol, strucstruct inode *dir = dentry->d_inode;struct dentry *child; +if (!dir) { +dput (dentry); + dentry =ERR_PTR (-ENOENT ); +break ; + } +/* skip separators */ while (*s == sep) s++;
@@ -581,10 +587,6 @@ cifs_get_root(struct smb_vol *vol, strucmutex_unlock (&dir->i_mutex);dput (dentry); dentry = child; -if (!dentry->d_inode) { -dput (dentry); - dentry =ERR_PTR (-ENOENT ); - } }while (!IS_ERR (dentry));_FreeXid (xid);kfree (full_path);
PATCH 16/27 xfs: start periodic workers later
In reply to Greg KH3.0-stable review patch. If anyone has any objections, please let us know.
------------------
From: Christoph Hellwig <[email protected]>
commit 2bcf6e970f5a88fa05dced5eeb0326e13d93c4a1 upstream
Start the periodic sync workers only after we have finished xfs_mountfs and thus fully set up the filesystem structures. Without this we can call into xfs_qm_sync before the quotainfo strucute is set up if the mount takes unusually long, and probably hit other incomplete states as well.
Also clean up the xfs_fs_fill_super error path by using consistent label names, and removing an impossible to reach case.
--- fs/xfs/linux-2.6/xfs_super.c | 35 ++++++++++++++--------------------- 1 file changed, 14 insertions(+), 21 deletions(-)
fs/xfs/linux-2.6/xfs_super.c +14 -21
@@ -1412,37 +1412,35 @@ xfs_fs_fill_super( sb->s_time_gran =1 ;set_posix_acl_flag (sb); - error =xfs_syncd_init (mp); -if (error) - goto out_filestream_unmount; -xfs_inode_shrinker_register (mp); error =xfs_mountfs (mp);if (error) - goto out_syncd_stop; + goto out_filestream_unmount; + + error =xfs_syncd_init (mp); +if (error) + goto out_unmount; root =igrab (VFS_I (mp->m_rootip));if (!root) { error =ENOENT ; - goto fail_unmount; + goto out_syncd_stop; }if (is_bad_inode (root)) { error =EINVAL ; - goto fail_vnrele; + goto out_syncd_stop; } sb->s_root =d_alloc_root (root);if (!sb->s_root) { error =ENOMEM ; - goto fail_vnrele; + goto out_iput; }return 0 ; - out_syncd_stop: -xfs_inode_shrinker_unregister (mp); -xfs_syncd_stop (mp); out_filestream_unmount: +xfs_inode_shrinker_unregister (mp);xfs_filestream_unmount (mp); out_free_sb:xfs_freesb (mp);
@@ -1456,17 +1454,12 @@ xfs_fs_fill_super( out:return -error; - fail_vnrele: -if (sb->s_root) { -dput (sb->s_root); - sb->s_root =NULL ; - }else { -iput (root); - } - - fail_unmount: -xfs_inode_shrinker_unregister (mp); + out_iput: +iput (root); + out_syncd_stop:xfs_syncd_stop (mp); + out_unmount: +xfs_inode_shrinker_unregister (mp);/* * Blow away any referenced inode in the filestreams cache.
PATCH 17/27 xfs: use a cursor for bulk AIL insertion
In reply to Greg KH3.0-stable review patch. If anyone has any objections, please let us know.
------------------
From: Dave Chinner <[email protected]>
commit 1d8c95a363bf8cd4d4182dd19c01693b635311c2 upstream
xfs: use a cursor for bulk AIL insertion
Delayed logging can insert tens of thousands of log items into the AIL at the same LSN. When the committing of log commit records occur, we can get insertions occurring at an LSN that is not at the end of the AIL. If there are thousands of items in the AIL on the tail LSN, each insertion has to walk the AIL to find the correct place to insert the new item into the AIL. This can consume large amounts of CPU time and block other operations from occurring while the traversals are in progress.
To avoid this repeated walk, use a AIL cursor to record where we should be inserting the new items into the AIL without having to repeat the walk. The cursor infrastructure already provides this functionality for push walks, so is a simple extension of existing code. While this will not avoid the initial walk, it will avoid repeating it tens of thousands of times during a single checkpoint commit.
This version includes logic improvements from Christoph Hellwig.
--- fs/xfs/xfs_trans.c | 27 ++++++++++- fs/xfs/xfs_trans_ail.c | 109 ++++++++++++++++++++++++++++++++++++++---------- fs/xfs/xfs_trans_priv.h | 10 +++- 3 files changed, 118 insertions(+), 28 deletions(-)
fs/xfs/xfs_trans.c +23 -4
@@ -1426,6 +1426,7 @@ xfs_trans_committed(static inline void xfs_log_item_batch_insert (struct xfs_ail *ailp, +struct xfs_ail_cursor *cur,struct xfs_log_item **log_items,int nr_items,xfs_lsn_t commit_lsn)
@@ -1434,7 +1435,7 @@ xfs_log_item_batch_insert(spin_lock (&ailp->xa_lock);/* xfs_trans_ail_update_bulk drops ailp->xa_lock */ -xfs_trans_ail_update_bulk (ailp, log_items, nr_items, commit_lsn); +xfs_trans_ail_update_bulk (ailp, cur, log_items, nr_items, commit_lsn);for (i =0 ; i < nr_items; i++)IOP_UNPIN (log_items[i],0 );
@@ -1452,6 +1453,13 @@ xfs_log_item_batch_insert(* as an iclog write error even though we haven't started any IO yet. Hence in * this case all we need to do is IOP_COMMITTED processing, followed by an * IOP_UNPIN(aborted) call. +* +* The AIL cursor is used to optimise the insert process. If commit_lsn is not +* at the end of the AIL, the insert cursor avoids the need to walk +* the AIL to find the insertion point on every xfs_log_item_batch_insert() +* call. This saves a lot of needless list walking and is a net win, even +* though it slightly increases that amount of AIL lock traffic to set it up +* and tear it down. */ void xfs_trans_committed_bulk(
@@ -1463,8 +1471,13 @@ xfs_trans_committed_bulk(#define LOG_ITEM_BATCH_SIZE 32struct xfs_log_item *log_items[LOG_ITEM_BATCH_SIZE ];struct xfs_log_vec *lv; +struct xfs_ail_cursor cur;int i =0 ; +spin_lock (&ailp->xa_lock); +xfs_trans_ail_cursor_last (ailp, &cur, commit_lsn); +spin_unlock (&ailp->xa_lock); +/* unpin all the log items */ for (lv = log_vector; lv; lv = lv->lv_next ) {struct xfs_log_item *lip = lv->lv_item;
@@ -1493,7 +1506,9 @@ xfs_trans_committed_bulk(/* * Not a bulk update option due to unusual item_lsn. * Push into AIL immediately, rechecking the lsn once -* we have the ail lock. Then unpin the item. +* we have the ail lock. Then unpin the item. This does +* not affect the AIL cursor the bulk insert path is +* using. */ spin_lock (&ailp->xa_lock);if (XFS_LSN_CMP (item_lsn, lip->li_lsn) >0 )
@@ -1507,7 +1522,7 @@ xfs_trans_committed_bulk(/* Item is a candidate for bulk AIL insert. */ log_items[i++] = lv->lv_item;if (i >=LOG_ITEM_BATCH_SIZE ) { -xfs_log_item_batch_insert (ailp, log_items, +xfs_log_item_batch_insert (ailp, &cur, log_items,LOG_ITEM_BATCH_SIZE , commit_lsn); i =0 ; }
@@ -1515,7 +1530,11 @@ xfs_trans_committed_bulk(/* make sure we insert the remainder! */ if (i) -xfs_log_item_batch_insert (ailp, log_items, i, commit_lsn); +xfs_log_item_batch_insert (ailp, &cur, log_items, i, commit_lsn); + +spin_lock (&ailp->xa_lock); +xfs_trans_ail_cursor_done (ailp, &cur); +spin_unlock (&ailp->xa_lock); }/*
fs/xfs/xfs_trans_ail.c +88 -21
141 lines not on this page · raw message
fs/xfs/xfs_trans_priv.h +7 -3
@@ -82,6 +82,7 @@ struct xfs_ail {extern struct workqueue_struct *xfs_ail_wq;/* AIL workqueue */ void xfs_trans_ail_update_bulk(struct xfs_ail *ailp, + struct xfs_ail_cursor *cur, struct xfs_log_item **log_items, int nr_items, xfs_lsn_t lsn) __releases(ailp->xa_lock); static inline void
@@ -90,7 +91,7 @@ xfs_trans_ail_update(struct xfs_log_item *lip, xfs_lsn_t lsn) __releases(ailp->xa_lock) { - xfs_trans_ail_update_bulk(ailp, &lip, 1, lsn); + xfs_trans_ail_update_bulk(ailp, NULL, &lip, 1, lsn); } void xfs_trans_ail_delete_bulk(struct xfs_ail *ailp,
@@ -111,10 +112,13 @@ xfs_lsn_t xfs_ail_min_lsn(struct xfs_aivoid xfs_trans_unlocked_item (struct xfs_ail *,xfs_log_item_t *); -struct xfs_log_item *xfs_trans_ail_cursor_first (struct xfs_ail *ailp, +struct xfs_log_item *xfs_trans_ail_cursor_first (struct xfs_ail *ailp,struct xfs_ail_cursor *cur,xfs_lsn_t lsn); -struct xfs_log_item *xfs_trans_ail_cursor_next (struct xfs_ail *ailp, +struct xfs_log_item *xfs_trans_ail_cursor_last (struct xfs_ail *ailp, +struct xfs_ail_cursor *cur, +xfs_lsn_t lsn); +struct xfs_log_item *xfs_trans_ail_cursor_next (struct xfs_ail *ailp,struct xfs_ail_cursor *cur);void xfs_trans_ail_cursor_done (struct xfs_ail *ailp,struct xfs_ail_cursor *cur);
PATCH 18/27 xfs: do not update xa_last_pushed_lsn for locked items
In reply to Greg KH3.0-stable review patch. If anyone has any objections, please let us know.
------------------
From: Christoph Hellwig <[email protected]>
commit bc6e588a8971aa74c02e42db4d6e0248679f3738 upstream
If an item was locked we should not update xa_last_pushed_lsn and thus skip it when restarting the AIL scan as we need to be able to lock and write it out as soon as possible. Otherwise heavy lock contention might starve AIL pushing too easily, especially given the larger backoff once we moved xa_last_pushed_lsn all the way to the target lsn.
--- fs/xfs/xfs_trans_ail.c | 1 - 1 file changed, 1 deletion(-)
fs/xfs/xfs_trans_ail.c +0 -1
@@ -491,7 +491,6 @@ xfs_ail_worker(case XFS_ITEM_LOCKED :XFS_STATS_INC (xs_push_ail_locked); - ailp->xa_last_pushed_lsn = lsn; stuck++;break ;
PATCH 19/27 xfs: force the log if we encounter pinned buffers in .iop_pushbuf
In reply to Greg KH3.0-stable review patch. If anyone has any objections, please let us know.
------------------
From: Christoph Hellwig <[email protected]>
commit 17b38471c3c07a49f0bbc2ecc2e92050c164e226 upstream
We need to check for pinned buffers even in .iop_pushbuf given that inode items flush into the same buffers that may be pinned directly due operations on the unlinked inode list operating directly on buffers. To do this add a return value to .iop_pushbuf that tells the AIL push about this and use the existing log force mechanisms to unpin it.
--- fs/xfs/quota/xfs_dquot_item.c | 10 +++++++--- fs/xfs/xfs_buf_item.c | 3 ++- fs/xfs/xfs_inode_item.c | 10 +++++++--- fs/xfs/xfs_trans.h | 2 +- fs/xfs/xfs_trans_ail.c | 9 +++++++-- 5 files changed, 24 insertions(+), 10 deletions(-)
fs/xfs/quota/xfs_dquot_item.c +7 -3
@@ -183,13 +183,14 @@ xfs_qm_dqunpin_wait(* search the buffer cache can be a time consuming thing, and AIL lock is a * spinlock. */ -STATIC void +STATIC boolxfs_qm_dquot_logitem_pushbuf (struct xfs_log_item *lip) {struct xfs_dq_logitem *qlip =DQUOT_ITEM (lip);struct xfs_dquot *dqp = qlip->qli_dquot;struct xfs_buf *bp; +bool ret = true;ASSERT (XFS_DQ_IS_LOCKED (dqp));
@@ -201,17 +202,20 @@ xfs_qm_dquot_logitem_pushbuf(if (completion_done (&dqp->q_flush) || !(lip->li_flags &XFS_LI_IN_AIL )) {xfs_dqunlock (dqp); -return ; +return true; } bp =xfs_incore (dqp->q_mount->m_ddev_targp, qlip->qli_format.qlf_blkno, dqp->q_mount->m_quotainfo->qi_dqchunklen,XBF_TRYLOCK );xfs_dqunlock (dqp);if (!bp) -return ; +return true;if (XFS_BUF_ISDELAYWRITE (bp))xfs_buf_delwri_promote (bp); +if (XFS_BUF_ISPINNED (bp)) + ret = false;xfs_buf_relse (bp); +return ret; }/*
fs/xfs/xfs_buf_item.c +2 -1
@@ -632,7 +632,7 @@ xfs_buf_item_push(* the xfsbufd to get this buffer written. We have to unlock the buffer * to allow the xfsbufd to write it, too. */ -STATIC void +STATIC boolxfs_buf_item_pushbuf (struct xfs_log_item *lip) {
@@ -646,6 +646,7 @@ xfs_buf_item_pushbuf(xfs_buf_delwri_promote (bp);xfs_buf_relse (bp); +return true; }STATIC void
fs/xfs/xfs_inode_item.c +7 -3
@@ -713,13 +713,14 @@ xfs_inode_item_committed(* marked delayed write. If that's the case, we'll promote it and that will * allow the caller to write the buffer by triggering the xfsbufd to run. */ -STATIC void +STATIC boolxfs_inode_item_pushbuf (struct xfs_log_item *lip) {struct xfs_inode_log_item *iip =INODE_ITEM (lip);struct xfs_inode *ip = iip->ili_inode;struct xfs_buf *bp; +bool ret = true;ASSERT (xfs_isilocked (ip,XFS_ILOCK_SHARED ));
@@ -730,7 +731,7 @@ xfs_inode_item_pushbuf(if (completion_done (&ip->i_flush) || !(lip->li_flags &XFS_LI_IN_AIL )) {xfs_iunlock (ip,XFS_ILOCK_SHARED ); -return ; +return true; } bp = xfs_incore(ip->i_mount->m_ddev_targp, iip->ili_format.ilf_blkno,
@@ -738,10 +739,13 @@ xfs_inode_item_pushbuf(xfs_iunlock (ip,XFS_ILOCK_SHARED );if (!bp) -return ; +return true;if (XFS_BUF_ISDELAYWRITE (bp))xfs_buf_delwri_promote (bp); +if (XFS_BUF_ISPINNED (bp)) + ret = false;xfs_buf_relse (bp); +return ret; }/*
fs/xfs/xfs_trans.h +1 -1
@@ -350,7 +350,7 @@ typedef struct xfs_item_ops {void (*iop_unlock)(xfs_log_item_t *);xfs_lsn_t (*iop_committed)(xfs_log_item_t *,xfs_lsn_t );void (*iop_push)(xfs_log_item_t *); -void (*iop_pushbuf)(xfs_log_item_t *); +bool (*iop_pushbuf)(xfs_log_item_t *);void (*iop_committing)(xfs_log_item_t *,xfs_lsn_t ); } xfs_item_ops_t;
fs/xfs/xfs_trans_ail.c +7 -2
@@ -478,8 +478,13 @@ xfs_ail_worker(case XFS_ITEM_PUSHBUF :XFS_STATS_INC (xs_push_ail_pushbuf); -IOP_PUSHBUF (lip); - ailp->xa_last_pushed_lsn = lsn; + +if (!IOP_PUSHBUF (lip)) { + stuck++; + flush_log =1 ; + }else { + ailp->xa_last_pushed_lsn = lsn; + } push_xfsbufd =1 ;break ;
PATCH 20/27 xfs: revert to using a kthread for AIL pushing
In reply to Greg KH3.0-stable review patch. If anyone has any objections, please let us know.
------------------
From: Christoph Hellwig <[email protected]>
commit 0030807c66f058230bcb20d2573bcaf28852e804 upstream
Currently we have a few issues with the way the workqueue code is used to implement AIL pushing:
- it accidentally uses the same workqueue as the syncer action, and thus can be prevented from running if there are enough sync actions active in the system.
- it doesn't use the HIGHPRI flag to queue at the head of the queue of work items
At this point I'm not confident enough in getting all the workqueue flags and tweaks right to provide a perfectly reliable execution context for AIL pushing, which is the most important piece in XFS to make forward progress when the log fills.
Revert back to use a kthread per filesystem which fixes all the above issues at the cost of having a task struct and stack around for each mounted filesystem. In addition this also gives us much better ways to diagnose any issues involving hung AIL pushing and removes a small amount of code.
--- fs/xfs/linux-2.6/xfs_linux.h | 2 + fs/xfs/linux-2.6/xfs_super.c | 13 ------- fs/xfs/xfs_trans_ail.c | 73 ++++++++++++++++++++++++------------------- fs/xfs/xfs_trans_priv.h | 8 ---- 4 files changed, 45 insertions(+), 51 deletions(-)
fs/xfs/linux-2.6/xfs_linux.h +2 -0
@@ -70,6 +70,8 @@#include <linux/ctype.h> #include <linux/writeback.h> #include <linux/capability.h> +#include <linux/kthread.h> +#include <linux/freezer.h> #include <linux/list_sort.h> #include <asm/page.h>
fs/xfs/linux-2.6/xfs_super.c +1 -12
@@ -1660,24 +1660,13 @@ xfs_init_workqueues(void)*/ xfs_syncd_wq =alloc_workqueue ("xfssyncd" ,WQ_CPU_INTENSIVE ,8 );if (!xfs_syncd_wq) - goto out; - - xfs_ail_wq =alloc_workqueue ("xfsail" ,WQ_CPU_INTENSIVE ,8 ); -if (!xfs_ail_wq) - goto out_destroy_syncd; - +return -ENOMEM ;return 0 ; - -out_destroy_syncd: -destroy_workqueue (xfs_syncd_wq); -out: -return -ENOMEM ; } STATIC voidxfs_destroy_workqueues (void ) { -destroy_workqueue (xfs_ail_wq);destroy_workqueue (xfs_syncd_wq); }
fs/xfs/xfs_trans_ail.c +41 -32
117 lines not on this page · raw message
fs/xfs/xfs_trans_priv.h +1 -7
@@ -64,23 +64,17 @@ struct xfs_ail_cursor {*/ struct xfs_ail {struct xfs_mount *xa_mount; +struct task_struct *xa_task;struct list_head xa_ail;xfs_lsn_t xa_target;struct xfs_ail_cursor xa_cursors;spinlock_t xa_lock; -struct delayed_work xa_work;xfs_lsn_t xa_last_pushed_lsn; -unsigned long xa_flags; }; -#define XFS_AIL_PUSHING_BIT 0 -/* * From xfs_trans_ail.c */ - -extern struct workqueue_struct *xfs_ail_wq;/* AIL workqueue */ - void xfs_trans_ail_update_bulk(struct xfs_ail *ailp, struct xfs_ail_cursor *cur, struct xfs_log_item **log_items, int nr_items,
PATCH 21/27 firewire: sbp2: fix panic after rmmod with slow targets
In reply to Greg KH3.0-stable review patch. If anyone has any objections, please let us know.
------------------
From: Chris Boot <[email protected]>
commit 0278ccd9d53e07c4e699432b2fed9de6c56f506c upstream.
If firewire-sbp2 starts a login to a target that doesn't complete ORBs in a timely manner (and has to retry the login), and the module is removed before the operation times out, you end up with a null-pointer dereference and a kernel panic.
[SR: This happens because sbp2_target_get/put() do not maintain module references. scsi_device_get/put() do, but at occasions like Chris describes one, nobody holds a reference to an SBP-2 sdev.]
This patch cancels pending work for each unit in sbp2_remove(), which hopefully means there are no extra references around that prevent us from unloading. This fixes my crash.
--- drivers/firewire/sbp2.c | 4 ++++ 1 file changed, 4 insertions(+)
drivers/firewire/sbp2.c +4 -0
@@ -1198,6 +1198,10 @@ static int sbp2_remove(struct device *de {struct fw_unit *unit =fw_unit (dev);struct sbp2_target *tgt =dev_get_drvdata (&unit->device); +struct sbp2_logical_unit *lu; + +list_for_each_entry (lu, &tgt->lu_list, link) +cancel_delayed_work_sync (&lu->work);sbp2_target_put (tgt);return 0 ;
PATCH 22/27 VFS: Fix automount for negative autofs dentries
In reply to Greg KH3.0-stable review patch. If anyone has any objections, please let us know.
------------------
From: David Howells <[email protected]>
commit 5a30d8a2b8ddd5102c440c7e5a7c8e1fd729c818 upstream.
[ backport for 3.0.x: LOOKUP_PARENT => LOOKUP_CONTINUE by Chuck Ebbert <[email protected]> ]
Autofs may set the DCACHE_NEED_AUTOMOUNT flag on negative dentries. These need attention from the automounter daemon regardless of the LOOKUP_FOLLOW flag.
--- fs/namei.c | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-)
fs/namei.c +15 -9
@@ -779,19 +779,25 @@ static int follow_automount(struct pathif ((flags &LOOKUP_NO_AUTOMOUNT ) && !(flags &LOOKUP_CONTINUE ))return -EISDIR ;/* we actually want to stop here */ -/* We want to mount if someone is trying to open/create a file of any -* type under the mountpoint, wants to traverse through the mountpoint -* or wants to open the mounted directory. -* +/* * We don't want to mount if someone's just doing a stat and they've * set AT_SYMLINK_NOFOLLOW - unless they're stat'ing a directory and * appended a '/' to the name. */ -if (!(flags &LOOKUP_FOLLOW ) && - !(flags & (LOOKUP_CONTINUE |LOOKUP_DIRECTORY | -LOOKUP_OPEN |LOOKUP_CREATE ))) -return -EISDIR ; - +if (!(flags &LOOKUP_FOLLOW )) { +/* We do, however, want to mount if someone wants to open or +* create a file of any type under the mountpoint, wants to +* traverse through the mountpoint or wants to open the mounted +* directory. +* Also, autofs may mark negative dentries as being automount +* points. These will need the attentions of the daemon to +* instantiate them before they can be used. +*/ +if (!(flags & (LOOKUP_PARENT |LOOKUP_DIRECTORY | +LOOKUP_OPEN |LOOKUP_CREATE )) && + path->dentry->d_inode) +return -EISDIR ; + } current->total_link_count++;if (current->total_link_count >=40 )return -ELOOP ;
Re: [22/27] VFS: Fix automount for negative autofs dentries
This one is debatable.
I think it also wants
- commit 0ec26fd0698285b31248e34bf1abb022c00f23d6 (withLOOKUP_PARENT->LOOKUP_CONTINUE too)
- commit d94c177beeb4469cd4f6e83354ab0223353e98ed (to get the few
other cases right too)
anything else I missed?
Linus
Quoted 63 lines · Greg KH
3.0-stable review patch. If anyone has any objections, please let us know.
------------------
From: David Howells <[email protected]>
commit
5a30d8a2b8ddd5102c440c7e5a7c8e1fd729c818upstream.
[ backport for 3.0.x:LOOKUP_PARENT=>LOOKUP_CONTINUEby Chuck Ebbert <[email protected]> ]Autofs may set the
DCACHE_NEED_AUTOMOUNTflag on negative dentries. These need attention from the automounter daemon regardless of theLOOKUP_FOLLOWflag.Signed-off-by David Howells <[email protected]>Acked-by Ian Kent <[email protected]>Signed-off-by Al Viro <[email protected]>Cc Chuck Ebbert <[email protected]>Signed-off-by Greg Kroah-Hartman <[email protected]>---
fs/namei.c | 24 +++++++++++++++---------1 file changed, 15 insertions(+), 9 deletions(-)fs/namei.c +0
-0@@ -779,19 +779,25 @@ static int follow_automount(struct path if ((flags & LOOKUP_NO_AUTOMOUNT) && !(flags & LOOKUP_CONTINUE))return
-EISDIR; /* we actually want to stop here */- /* We want to mount if someone is trying to open/create a file of any
- * type under the mountpoint, wants to traverse through the mountpoint
- * or wants to open the mounted directory.
- *
+ /*
* We don't want to mount if someone's just doing a stat and they've
* setAT_SYMLINK_NOFOLLOW- unless they're stat'ing a directory and
* appended a '/' to the name.
*/
- if (!(flags &LOOKUP_FOLLOW) &&
- !(flags & (LOOKUP_CONTINUE|LOOKUP_DIRECTORY|
- LOOKUP_OPEN |LOOKUP_CREATE)))
- return-EISDIR;
-
+ if (!(flags &LOOKUP_FOLLOW)) {
+ /* We do, however, want to mount if someone wants to open or
+ * create a file of any type under the mountpoint, wants to
+ * traverse through the mountpoint or wants to open the mounted
+ * directory.
+ * Also, autofs may mark negative dentries as being automount
+ * points. These will need the attentions of the daemon to
+ * instantiate them before they can be used.
+ */
+ if (!(flags & (LOOKUP_PARENT|LOOKUP_DIRECTORY|
+ LOOKUP_OPEN |LOOKUP_CREATE)) &&
+path->dentry->d_inode)
+ return-EISDIR;
+ }
current->total_link_count++;
if (current->total_link_count>= 40)
return-ELOOP;
Re: [22/27] VFS: Fix automount for negative autofs dentries
Quoted 6 lines · Linus Torvalds
This one is debatable.
I think it also wants
- commit
0ec26fd0698285b31248e34bf1abb022c00f23d6(withLOOKUP_PARENT->LOOKUP_CONTINUEtoo)
Really? I thought I dropped this one from the last stable release due to problems with it, or does this patch here, and the one you mention below, resolve those issues?
Quoted 4 lines
- commit
d94c177beeb4469cd4f6e83354ab0223353e98ed(to get the few
other cases right too)anything else I missed?
Ok, that makes a bit more sense, I'll add these if David and Miklos agree that they are ok to add here. David and Miklos?
greg k-h
Miklos Szeredi
maintainerRe: [22/27] VFS: Fix automount for negative autofs dentries
Quoted 12 lines · Greg KH
Quoted 6 lines · Linus Torvalds
This one is debatable.
I think it also wants
- commit
0ec26fd0698285b31248e34bf1abb022c00f23d6(withLOOKUP_PARENT->LOOKUP_CONTINUEtoo)Really? I thought I dropped this one from the last stable release due to problems with it, or does this patch here, and the one you mention below, resolve those issues?
Quoted 7 lines
Quoted 4 lines
- commit
d94c177beeb4469cd4f6e83354ab0223353e98ed(to get the few
other cases right too)anything else I missed?
Ok, that makes a bit more sense, I'll add these if David and Miklos agree that they are ok to add here. David and Miklos?
IMO they are OK to add as long as they are both added.
Last time the first one had to be backed out because Linus wasn't totally comfortable with the other one going into -stable until it got some testing in 3.1. Or at least that's how I understood (or misunderstood).
Thanks,
Miklos
Re: [22/27] VFS: Fix automount for negative autofs dentries
Quoted 22 lines · Miklos Szeredi
Quoted 12 lines · Greg KH
Quoted 6 lines · Linus Torvalds
This one is debatable.
I think it also wants
- commit
0ec26fd0698285b31248e34bf1abb022c00f23d6(withLOOKUP_PARENT->LOOKUP_CONTINUEtoo)Really? I thought I dropped this one from the last stable release due to problems with it, or does this patch here, and the one you mention below, resolve those issues?
Quoted 7 lines
Quoted 4 lines
- commit
d94c177beeb4469cd4f6e83354ab0223353e98ed(to get the few
other cases right too)anything else I missed?
Ok, that makes a bit more sense, I'll add these if David and Miklos agree that they are ok to add here. David and Miklos?
Quoted 6 lines
IMO they are OK to add as long as they are both added.
Last time the first one had to be backed out because Linus wasn't totally comfortable with the other one going into -stable until it got some testing in 3.1. Or at least that's how I understood (or misunderstood).
Ok, I tried applying these patches, but they didn't apply. I tried digging the patches out of the suse kernel tree, but they didn't seem to include all of the needed ones here.
So, I'm going to drop this patch from the 3.0.8 release, can someone please send me the needed patches, backported to 3.0, so that I know they are working properly?
thanks,
greg k-h
Re: [22/27] VFS: Fix automount for negative autofs dentries
In reply to Greg KHQuoted 2 lines · Greg KH
Ok, that makes a bit more sense, I'll add these if David and Miklos agree that they are ok to add here. David and Miklos?
Sure.
David
Re: [22/27] VFS: Fix automount for negative autofs dentries
In reply to Linus TorvaldsQuoted 3 lines · Linus Torvalds
This one is debatable.
I think it also wants
Mmm .. I find myself caught by essentially the same mistake twice in one day, ;)
Quoted 3 lines
- commit
0ec26fd0698285b31248e34bf1abb022c00f23d6(withLOOKUP_PARENT->LOOKUP_CONTINUEtoo)
Oh right "vfs: automount should ignore LOOKUP_FOLLOW", yes.
Quoted 3 lines
- commit
d94c177beeb4469cd4f6e83354ab0223353e98ed(to get the few
other cases right too)
And probably 815d405ceff0d6964683f033e18b9b23a88fba87 as well as b6c8069d3577481390b3f24a8434ad72a3235594. But I'd need to check that would be OK.
That should bring 3.0 inline with 3.1.
Quoted 69 lines
anything else I missed?
Linus
Quoted 63 lines · Greg KH
3.0-stable review patch. If anyone has any objections, please let us know.
------------------
From: David Howells <[email protected]>
commit
5a30d8a2b8ddd5102c440c7e5a7c8e1fd729c818upstream.
[ backport for 3.0.x:LOOKUP_PARENT=>LOOKUP_CONTINUEby Chuck Ebbert <[email protected]> ]Autofs may set the
DCACHE_NEED_AUTOMOUNTflag on negative dentries. These need attention from the automounter daemon regardless of theLOOKUP_FOLLOWflag.Signed-off-by David Howells <[email protected]>Acked-by Ian Kent <[email protected]>Signed-off-by Al Viro <[email protected]>Cc Chuck Ebbert <[email protected]>Signed-off-by Greg Kroah-Hartman <[email protected]>--- fs/namei.c | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-)fs/namei.c +15
-9@@ -779,19 +779,25 @@ static int follow_automount(struct pathif ((flags &LOOKUP_NO_AUTOMOUNT ) && !(flags &LOOKUP_CONTINUE ))return -EISDIR ;/* we actually want to stop here */ -/* We want to mount if someone is trying to open/create a file of any -* type under the mountpoint, wants to traverse through the mountpoint -* or wants to open the mounted directory. -* +/* * We don't want to mount if someone's just doing a stat and they've * set AT_SYMLINK_NOFOLLOW - unless they're stat'ing a directory and * appended a '/' to the name. */ -if (!(flags &LOOKUP_FOLLOW ) && - !(flags & (LOOKUP_CONTINUE |LOOKUP_DIRECTORY | -LOOKUP_OPEN |LOOKUP_CREATE ))) -return -EISDIR ; - +if (!(flags &LOOKUP_FOLLOW )) { +/* We do, however, want to mount if someone wants to open or +* create a file of any type under the mountpoint, wants to +* traverse through the mountpoint or wants to open the mounted +* directory. +* Also, autofs may mark negative dentries as being automount +* points. These will need the attentions of the daemon to +* instantiate them before they can be used. +*/ +if (!(flags & (LOOKUP_PARENT |LOOKUP_DIRECTORY | +LOOKUP_OPEN |LOOKUP_CREATE )) && + path->dentry->d_inode) +return -EISDIR ; + } current->total_link_count++;if (current->total_link_count >=40 )return -ELOOP ;
Re: [22/27] VFS: Fix automount for negative autofs dentries
In reply to Greg KHQuoted 1 line · Greg KH
3.0-stable review patch. If anyone has any objections, please let us know.
Yes, as others point out, either the patch needs to be correctly backported or the dependent patches need to be pulled in.
I can do either of these, what would you prefer?
Quoted 61 lines
------------------
From: David Howells <[email protected]>
commit
5a30d8a2b8ddd5102c440c7e5a7c8e1fd729c818upstream.
[ backport for 3.0.x:LOOKUP_PARENT=>LOOKUP_CONTINUEby Chuck Ebbert <[email protected]> ]Autofs may set the
DCACHE_NEED_AUTOMOUNTflag on negative dentries. These need attention from the automounter daemon regardless of theLOOKUP_FOLLOWflag.Signed-off-by David Howells <[email protected]>Acked-by Ian Kent <[email protected]>Signed-off-by Al Viro <[email protected]>Cc Chuck Ebbert <[email protected]>Signed-off-by Greg Kroah-Hartman <[email protected]>--- fs/namei.c | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-)fs/namei.c +15
-9@@ -779,19 +779,25 @@ static int follow_automount(struct pathif ((flags &LOOKUP_NO_AUTOMOUNT ) && !(flags &LOOKUP_CONTINUE ))return -EISDIR ;/* we actually want to stop here */ -/* We want to mount if someone is trying to open/create a file of any -* type under the mountpoint, wants to traverse through the mountpoint -* or wants to open the mounted directory. -* +/* * We don't want to mount if someone's just doing a stat and they've * set AT_SYMLINK_NOFOLLOW - unless they're stat'ing a directory and * appended a '/' to the name. */ -if (!(flags &LOOKUP_FOLLOW ) && - !(flags & (LOOKUP_CONTINUE |LOOKUP_DIRECTORY | -LOOKUP_OPEN |LOOKUP_CREATE ))) -return -EISDIR ; - +if (!(flags &LOOKUP_FOLLOW )) { +/* We do, however, want to mount if someone wants to open or +* create a file of any type under the mountpoint, wants to +* traverse through the mountpoint or wants to open the mounted +* directory. +* Also, autofs may mark negative dentries as being automount +* points. These will need the attentions of the daemon to +* instantiate them before they can be used. +*/ +if (!(flags & (LOOKUP_PARENT |LOOKUP_DIRECTORY | +LOOKUP_OPEN |LOOKUP_CREATE )) && + path->dentry->d_inode) +return -EISDIR ; + } current->total_link_count++;if (current->total_link_count >=40 )return -ELOOP ;
Re: [22/27] VFS: Fix automount for negative autofs dentries
Quoted 7 lines · Ian Kent
Quoted 1 line · Greg KH
3.0-stable review patch. If anyone has any objections, please let us know.
Yes, as others point out, either the patch needs to be correctly backported or the dependent patches need to be pulled in.
I can do either of these, what would you prefer?
I'd prefer to take the dependant patches, as that would make things sync up with what is in Linus's tree, I just wanted to get Miklos's and David's acks that this is the way to go before I did it.
thanks,
greg k-h
Re: [22/27] VFS: Fix automount for negative autofs dentries
Quoted 4 lines · Greg KH
Quoted 3 lines · Ian Kent
Quoted 1 line · Greg KH
3.0-stable review patch. If anyone has any objections, please let us know.
Quoted 8 lines
Quoted 4 lines
Yes, as others point out, either the patch needs to be correctly backported or the dependent patches need to be pulled in.
I can do either of these, what would you prefer?
I'd prefer to take the dependant patches, as that would make things sync up with what is in Linus's tree, I just wanted to get Miklos's and David's acks that this is the way to go before I did it.
Sure, just let me know if you want me to do any of the leg work (or keyboard work in this case, ;)).
Ian
PATCH 23/27 mm: fix race between mremap and removing migration entry
In reply to Greg KH3.0-stable review patch. If anyone has any objections, please let us know.
------------------
From: Hugh Dickins <[email protected]>
commit 486cf46f3f9be5f2a966016c1a8fe01e32cde09e upstream.
I don't usually pay much attention to the stale "? " addresses in stack backtraces, but this lucky report from Pawel Sikora hints that mremap's move_ptes() has inadequate locking against page migration.
3.0 BUG_ON(!PageLocked(p)) in migration_entry_to_page():
kernel BUG at include/linux/swapops.h:105!
RIP: 0010:[<ffffffff81127b76>] [<ffffffff81127b76>]
migration_entry_wait+0x156/0x160
[<ffffffff811016a1>] handle_pte_fault+0xae1/0xaf0
[<ffffffff810feee2>] ? __pte_alloc+0x42/0x120
[<ffffffff8112c26b>] ? do_huge_pmd_anonymous_page+0xab/0x310
[<ffffffff81102a31>] handle_mm_fault+0x181/0x310
[<ffffffff81106097>] ? vma_adjust+0x537/0x570
[<ffffffff81424bed>] do_page_fault+0x11d/0x4e0
[<ffffffff81109a05>] ? do_mremap+0x2d5/0x570
[<ffffffff81421d5f>] page_fault+0x1f/0x30mremap's down_write of mmap_sem, together with i_mmap_mutex or lock, and pagetable locks, were good enough before page migration (with its requirement that every migration entry be found) came in, and enough while migration always held mmap_sem; but not enough nowadays, when there's memory hotremove and compaction.
The danger is that move_ptes() lets a migration entry dodge around behind remove_migration_pte()'s back, so it's in the old location when looking at the new, then in the new location when looking at the old.
Either mremap's move_ptes() must additionally take anon_vma lock(), or migration's remove_migration_pte() must stop peeking for is_swap_entry() before it takes pagetable lock.
Consensus chooses the latter: we prefer to add overhead to migration than to mremapping, which gets used by JVMs and by exec stack setup.
--- mm/migrate.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
mm/migrate.c +4 -4
@@ -120,10 +120,10 @@ static int remove_migration_pte(struct p ptep =pte_offset_map (pmd, addr); -if (!is_swap_pte (*ptep)) { -pte_unmap (ptep); - goto out; - } +/* +* Peek to check is_swap_pte() before taking ptlock? No, we +* can race mremap's move_ptes(), which skips anon_vma lock. +*/ ptl =pte_lockptr (mm, pmd); }
PATCH 24/27 x25: Prevent skb overreads when checking call user data
In reply to Greg KH3.0-stable review patch. If anyone has any objections, please let us know.
------------------
From: Matthew Daley <[email protected]>
commit 7f81e25befdfb3272345a2e775f520e1d515fa20 upstream.
x25_find_listener does not check that the amount of call user data given in the skb is big enough in per-socket comparisons, hence buffer overreads may occur. Fix this by adding a check.
--- net/x25/af_x25.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
net/x25/af_x25.c +2 -1
@@ -295,7 +295,8 @@ static struct sock *x25_find_listener(st* Found a listening socket, now check the incoming * call user data vs this sockets call user data */ -if (skb->len >0 &&x25_sk (s)->cudmatchlength >0 ) { +if (x25_sk (s)->cudmatchlength >0 && + skb->len >=x25_sk (s)->cudmatchlength) {if ((memcmp (x25_sk (s)->calluserdata.cuddata, skb->data,x25_sk (s)->cudmatchlength)) ==0 ) {
PATCH 25/27 crypto: ghash - Avoid null pointer dereference if no key is set
In reply to Greg KH3.0-stable review patch. If anyone has any objections, please let us know.
------------------
From: Nick Bowler <[email protected]>
commit 7ed47b7d142ec99ad6880bbbec51e9f12b3af74c upstream.
The ghash_update function passes a pointer to gf128mul_4k_lle which will be NULL if ghash_setkey is not called or if the most recent call to ghash_setkey failed to allocate memory. This causes an oops. Fix this up by returning an error code in the null case.
This is trivially triggered from unprivileged userspace through the AF_ALG interface by simply writing to the socket without setting a key.
The ghash_final function has a similar issue, but triggering it requires a memory allocation failure in ghash_setkey _after_ at least one successful call to ghash_update.
BUG: unable to handle kernel NULL pointer dereference at 00000670 IP: [<d88c92d4>] gf128mul_4k_lle+0x23/0x60 [gf128mul] *pde = 00000000 Oops: 0000 [#1] PREEMPT SMP Modules linked in: ghash_generic gf128mul algif_hash af_alg nfs lockd nfs_acl sunrpc bridge ipv6 stp llc
Pid: 1502, comm: hashatron Tainted: G W 3.1.0-rc9-00085-ge9308cf #32 Bochs Bochs
EIP: 0060:[<d88c92d4>] EFLAGS: 00000202 CPU: 0
EIP is at gf128mul_4k_lle+0x23/0x60 [gf128mul]
EAX: d69db1f0 EBX: d6b8ddac ECX: 00000004 EDX: 00000000
ESI: 00000670 EDI: d6b8ddac EBP: d6b8ddc8 ESP: d6b8dda4
DS: 007b ES: 007b FS: 00d8 GS: 0033 SS: 0068
Process hashatron (pid: 1502, ti=d6b8c000 task=d6810000 task.ti=d6b8c000)
Stack: 00000000 d69db1f0 00000163 00000000 d6b8ddc8 c101a520 d69db1f0 d52aa000 00000ff0 d6b8dde8 d88d310f d6b8a3f8 d52aa000 00001000 d88d502c d6b8ddfc 00001000 d6b8ddf4 c11676ed d69db1e8 d6b8de24 c11679ad d52aa000 00000000 Call Trace: [<c101a520>] ? kmap_atomic_prot+0x37/0xa6 [<d88d310f>] ghash_update+0x85/0xbe [ghash_generic] [<c11676ed>] crypto_shash_update+0x18/0x1b [<c11679ad>] shash_ahash_update+0x22/0x36 [<c11679cc>] shash_async_update+0xb/0xd [<d88ce0ba>] hash_sendpage+0xba/0xf2 [algif_hash] [<c121b24c>] kernel_sendpage+0x39/0x4e [<d88ce000>] ? 0xd88cdfff [<c121b298>] sock_sendpage+0x37/0x3e [<c121b261>] ? kernel_sendpage+0x4e/0x4e [<c10b4dbc>] pipe_to_sendpage+0x56/0x61 [<c10b4e1f>] splice_from_pipe_feed+0x58/0xcd [<c10b4d66>] ? splice_from_pipe_begin+0x10/0x10 [<c10b51f5>] __splice_from_pipe+0x36/0x55 [<c10b4d66>] ? splice_from_pipe_begin+0x10/0x10 [<c10b6383>] splice_from_pipe+0x51/0x64 [<c10b63c2>] ? default_file_splice_write+0x2c/0x2c [<c10b63d5>] generic_splice_sendpage+0x13/0x15 [<c10b4d66>] ? splice_from_pipe_begin+0x10/0x10 [<c10b527f>] do_splice_from+0x5d/0x67 [<c10b6865>] sys_splice+0x2bf/0x363 [<c129373b>] ? sysenter_exit+0xf/0x16 [<c104dc1e>] ? trace_hardirqs_on_caller+0x10e/0x13f [<c129370c>] sysenter_do_call+0x12/0x32 Code: 83 c4 0c 5b 5e 5f c9 c3 55 b9 04 00 00 00 89 e5 57 8d 7d e4 56 53 8d 5d e4 83 ec 18 89 45 e0 89 55 dc 0f b6 70 0f c1 e6 04 01 d6 <f3> a5 be 0f 00 00 00 4e 89 d8 e8 48 ff ff ff 8b 45 e0 89 da 0f EIP: [<d88c92d4>] gf128mul_4k_lle+0x23/0x60 [gf128mul] SS:ESP 0068:d6b8dda4 CR2: 0000000000000670 ---[ end trace 4eaa2a86a8e2da24 ]--- note: hashatron[1502] exited with preempt_count 1 BUG: scheduling while atomic: hashatron/1502/0x10000002 INFO: lockdep is turned off. [...]
--- crypto/ghash-generic.c | 6 ++++++ 1 file changed, 6 insertions(+)
crypto/ghash-generic.c +6 -0
@@ -67,6 +67,9 @@ static int ghash_update(struct shash_desstruct ghash_ctx *ctx =crypto_shash_ctx (desc->tfm);u8 *dst = dctx->buffer; +if (!ctx->gf128) +return -ENOKEY ; +if (dctx->bytes) {int n =min (srclen, dctx->bytes);u8 *pos = dst + (GHASH_BLOCK_SIZE - dctx->bytes);
@@ -119,6 +122,9 @@ static int ghash_final(struct shash_descstruct ghash_ctx *ctx =crypto_shash_ctx (desc->tfm);u8 *buf = dctx->buffer; +if (!ctx->gf128) +return -ENOKEY ; +ghash_flush (ctx, dctx);memcpy (dst, buf,GHASH_BLOCK_SIZE );
PATCH 26/27 ALSA: HDA: conexant support for Lenovo T520/W520
In reply to Greg KH3.0-stable review patch. If anyone has any objections, please let us know.
------------------
From: Daniel Suchy <[email protected]>
commit ca201c096269ee2d40037fea96a59fd0695888c4 upstream.
This is patch for Conexant codec of Intel HDA driver, adding new quirk for Lenovo Thinkpad T520 and W520. Conexant autodetection works fine for T520 (similar subsystem ID is used also in W520 model) and detects more mixer features compared to generic (fallback) Lenovo quirk with hardcoded options in Conexant codec.
Patch was activelly tested with Linux 3.0.4, 3.0.6 and 3.0.7 without any problems.
--- sound/pci/hda/patch_conexant.c | 1 + 1 file changed, 1 insertion(+)
sound/pci/hda/patch_conexant.c +1 -0
@@ -3097,6 +3097,7 @@ static const struct snd_pci_quirk cxt506SND_PCI_QUIRK (0x17aa ,0x21c5 ,"Thinkpad Edge 13" ,CXT5066_THINKPAD ),SND_PCI_QUIRK (0x17aa ,0x21c6 ,"Thinkpad Edge 13" ,CXT5066_ASUS ),SND_PCI_QUIRK (0x17aa ,0x215e ,"Lenovo Thinkpad" ,CXT5066_THINKPAD ), +SND_PCI_QUIRK (0x17aa ,0x21cf ,"Lenovo T520 & W520" ,CXT5066_AUTO ),SND_PCI_QUIRK (0x17aa ,0x21da ,"Lenovo X220" ,CXT5066_THINKPAD ),SND_PCI_QUIRK (0x17aa ,0x21db ,"Lenovo X220-tablet" ,CXT5066_THINKPAD ), SND_PCI_QUIRK(0x17aa, 0x3a0d, "Lenovo U350", CXT5066_ASUS),
PATCH 27/27 ALSA: hda - Add position_fix quirk for Dell Inspiron 1010
In reply to Greg KH3.0-stable review patch. If anyone has any objections, please let us know.
------------------
From: Takashi Iwai <[email protected]>
commit 051a8cb6550d917225ead1cd008b5966350f6d53 upstream.
The previous fix for the position-buffer check gives yet another regression on a Dell laptop. The safest fix right now is to add a static quirk for this device (and better to apply it for stable kernels too).
--- sound/pci/hda/hda_intel.c | 1 + 1 file changed, 1 insertion(+)
sound/pci/hda/hda_intel.c +1 -0
@@ -2352,6 +2352,7 @@ static struct snd_pci_quirk position_fixSND_PCI_QUIRK (0x1028 ,0x01cc ,"Dell D820" ,POS_FIX_LPIB ),SND_PCI_QUIRK (0x1028 ,0x01de ,"Dell Precision 390" ,POS_FIX_LPIB ),SND_PCI_QUIRK (0x1028 ,0x01f6 ,"Dell Latitude 131L" ,POS_FIX_LPIB ), +SND_PCI_QUIRK (0x1028 ,0x02c6 ,"Dell Inspiron 1010" ,POS_FIX_LPIB ),SND_PCI_QUIRK (0x1028 ,0x0470 ,"Dell Inspiron 1120" ,POS_FIX_LPIB ),SND_PCI_QUIRK (0x103c ,0x306d ,"HP dv3" ,POS_FIX_LPIB ), SND_PCI_QUIRK(0x1043, 0x813d, "ASUS P5AD2", POS_FIX_LPIB),